Hey everyone,

I'm making a node module <https://github.com/jussi-kalliokoski/node-cubeb>for 
libcubeb <https://github.com/kinetiknz/cubeb>, an audio playback by 
Mozilla. I'm trying to expose the library's C API as close to original as 
possible and build a JavaScript abstraction on top of that. The library is 
giving me a C buffer in a callback, and I want to pass that to a JS 
callback as an ArrayBuffer.

How should I go about implementing this? Everything else is pretty much 
ready, except for this. Optimally, this would include no memory copying and 
it would expose the C buffer directly. The reason I want to go with 
ArrayBuffers is that in the library you can choose in which format the 
samples are read from the buffer.

Any help appreciated! Also, this is my first serious native node module, 
and I'm not very good at C++, so if you see any potential bugs in my code, 
you're most welcome to report them!

Cheers,
Jussi

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to