MicrophoneAudioSource.java - no javax.sound

331 views
Skip to first unread message

Ryan

unread,
Nov 6, 2008, 12:15:34 PM11/6/08
to TuneDroid
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.TargetDataLine;

I got errors about the javax.sound so I googled and it appears they
removed it from the SDK. What is there to do about this?

http://code.google.com/p/android/issues/detail?id=60


Ryan

unread,
Nov 6, 2008, 9:09:40 PM11/6/08
to TuneDroid
Here is a link describing the android Media API.

http://code.google.com/android/toolbox/apis/media.html
Message has been deleted

Ryan

unread,
Nov 19, 2008, 12:09:25 AM11/19/08
to TuneDroid
Here is a pastebin of the full MicrophoneAudioSource.java:
http://pastebin.com/m30138a6a

An irc discussion about the media api brought me to this:
(11:05:39 PM) d0netsFN: im interested in his method, so you think it
would work?
(11:05:47 PM) d0netsFN: all i have read is complaints about the media
api
(11:05:57 PM) d0netsFN: and people wanting javax.sound
(11:06:40 PM) andyross: d0nets: it works fine. It's a native thing,
so you need to get a native build environment working. But the
AudioTrack API is really simple: create the object and register a
callback. The library spawns a thread to fetch buffers and hand them
to the callback to fill as needed.

Ryan

unread,
Nov 19, 2008, 12:13:42 AM11/19/08
to TuneDroid
(11:09:39 PM) andyross: Here's the audio code example: http://pastebin.ca/1260555
(11:09:39 PM) andyross: A sample native rig (an OpenGL performance
test and state enumerator) is in http://plausible.org/andy/Game1.tar.gz
Reply all
Reply to author
Forward
0 new messages