I'm willing to start playing with Rpi and node.js soon. Is there a reason 
you're using  0.6 and not 0.10 ? is there a limitation ?

On Friday, 5 July 2013 07:04:17 UTC+2, psema4 wrote:
>
> Hi all, 
>
> I'm trying to work around the lack of web audio on a Raspberry Pi + 
> Chromium project and have run into a bit of trouble: I need to play a 
> short sound when express responds to a route.  The app is currently 
> running on node v0.6.19 & express 3.0.6. 
>
> If I run the aplay command (below) from bash, the sound card is 
> detected and the file is played.  When run from the express route 
> handler, the sound card is not detected and no sound is played.  (It's 
> the same user in both cases.) 
>
> I'm not sure where the issue is - any pointers would be most appreciated. 
>
> [-- example server.js starts --] 
> var server = require('express')() 
>   , exec = require('child_process').exec 
>   , util = require('util') 
> ; 
>
> function puts(error, stdout, stderr) { 
>     util.puts(stdout); 
>     util.puts(stderr); 
> } 
>
> server.get('/sound', function(req, res) { 
>     // env not sanitized for debugging purposes 
>     exec("/usr/bin/aplay /tmp/testsound.wav" 
>         , { cwd: process.env.pwd, env: process.env } 
>         , function(error, stdout, stderr) { 
>             puts(error, stdout, stderr); 
>             res.send('ok'); 
>         }); 
> }); 
>
> server.listen(5151); 
> [-- example server.js ends --] 
>
> -- 
>   Scott Elcomb 
>   @psema4 on Twitter / Identi.ca / Github & more 
>
>   Atomic OS: Self Contained Microsystems 
>   http://code.google.com/p/atomos/ 
>
>   Member of the Pirate Party of Canada 
>   http://www.pirateparty.ca/ 
>

-- 
-- 
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

--- 
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 nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to