Hello, it may not seems so, but it is important that you specify against 
which version of node you are trying to build your addon.

for the 0.10 branch, I have some code in node-libspotify that can help you 
out. It gets sound data chunks and stores them in a queue. this 
function<https://github.com/Floby/node-libspotify/blob/master/src/player.cc#L102>
 reads 
it occasionally and pushed the data to a JS callback. Hope it helps you.

On Monday, 16 December 2013 15:41:20 UTC+1, [email protected] wrote:
>
> Hi,
>
> I'm trying to create a native module in order to receive data from a kind 
> of sensor. To get updated, I need to provide 2 implementations of the same 
> interface, which consists of a single method with the signature
> void receiveData(const Data& data).
>
> My problem is that I haven't been able to figure out how to pass the data 
> forward to JavaScript. I suppose this requires the use of Handle, 
> HandleScope etc. but how exactly would I make the call from receiveData to 
> another object to do the necessary wrapping? Any example or sketch would be 
> very helpful.
>
> Thanks,
> Miikka
>
>

-- 
-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to