Streaming audio

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

Streaming audio

Postby gloomyandy » Wed Jan 27, 2010 1:29 pm

Folks,
as a result of this thread:
viewtopic.php?t=1813

I put together some code to allow streaming of audio to the NXT over USB and Bluetooth. Here is a quick clip of the program running:
http://www.youtube.com/watch?v=AxD0qeLHEpM

The required audio functions should be available in the next release of leJOS and if people are interested I may add the NXT and PC programs as samples to the release...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4114
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby aapo » Thu Feb 11, 2010 9:44 pm

Hi, I would like to see this code in samples.

I checked code from svn but it's not there yet.
aapo
New User
 
Posts: 1
Joined: Thu Feb 11, 2010 9:41 pm

Postby pEhrlich » Fri Feb 12, 2010 5:03 pm

thats awesome! I always thought it would be fantastic to be able to use the NXT as a remote stereo controller; I even brought my NXT to school with me with that in mind. (Right, we all know how much free time there is when in school.) So of course the next steps are of course waveform graphs on the screen, live mp3 decoding, and a physical audio jack to control speakers, right? :wink:

Cheers!

PS. great song choice.
User avatar
pEhrlich
Advanced Member
 
Posts: 158
Joined: Fri Jan 04, 2008 1:38 am

Re: Streaming audio

Postby SavedCoder » Wed Nov 09, 2011 6:52 pm

Hi Andy,

Could you post the code for this? I'd really like to see it. Or is it already in the samples and I just missed it?

SavedCoder
To God be the glory, great things He has done;
So loved He the world that He gave us His Son,
Who yielded His life an atonement for sin,
And opened the life gate that all may go in.
SavedCoder
New User
 
Posts: 3
Joined: Mon May 16, 2011 1:10 pm
Location: /dev/null

Re: Streaming audio

Postby schippi » Tue Nov 15, 2011 9:58 am

hi andy,

i'd be really interested in your sample as well, thought about programming it too but i google'd it and found this thread.
thanks in advance!
schippi
New User
 
Posts: 1
Joined: Tue Nov 15, 2011 9:51 am

Re: Streaming audio

Postby gloomyandy » Tue Nov 15, 2011 9:12 pm

Unfortunately I no longer have that code. It was very simple though I based it on a combination of the BTSend and BTReceive sample programs. On the PC side the code simply connects to the NXT, opens the sound file and reads blocks of data from it (can't remember the buffer size I used, possible 4K), and then writes them to the NXT as fast as possible. On the NXT the code accepts the connection and then reads data blocks from it writing the data as queued samples to the sound device... I seem to remember that I used the low level read/write (from NXtConnection) calls rather than a data stream, and you may have to fine tune the buffer sizes used...

Good luck

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4114
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 0 guests

more stuff