Play custom audio format ?

by Derek » Wed, 05 Nov 2008 06:58:03 GMT

Sponsored Links
 Hi all,

Thanks the MediaPlayer, it's possible to play MP3 and OGG. However,
how can we play other audio formats ? We have many audio decoders in
Java (jSpeex, Monkey Audio ...) that can convert (on fly) an encoded
audio stream to PCM stream. It means that we can have an PCM
InputStream but we don't see any method with InputStream as parameter
in MediaPlayer class ?

Would it be possible ?


Play custom audio format ?

by David Given » Wed, 05 Nov 2008 19:41:31 GMT



This seems not to be really possible right now.

It *is* possible to hack things together that you can do this --- for
example, you can create a local socket, tell the MediaPlayer to stream
from the socket, and then write data to the other end --- it's very slow
and Dalvik isn't really up to the task of synthesising audio data on the
fly, so the results are very unsatisfactory.

Hopefully we'll get more codecs in a future version...

David Given


Sponsored Links

Play custom audio format ?

by Guillaume Perrot » Wed, 05 Nov 2008 21:45:02 GMT

 You can also play audio files which uses the amr audio codec (amr,


Other Threads


USB drivers available through the SDK do not support  XOOM



2. How to change animation velocity on SlidingDrawer

Hey everyone. I'm using a sliding drawer and I just want to change
animation velocity.
But how ?
How I can do that ?
I don't see public attributes and parameters to change animation
Anybody can help ?


3. paging om arya mada

4. App auto response

5. Broadcast in WiFi ad-hoc mode

6. Tablet ZTE @ booth 3 MBC Jakarta Convention Centre

7. Need help: Passing a value to a view via inflate OR dealing with style resources