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

1. Checking whether DB Exists


I would like to check whether there is any direct API available to check
whether a particular Database exists or not ?

Currently, to initialize data for the first time (not repeatedly), we try of
open the db and if it fails we know the database does not exists otherwise
it is already created and initialized.

Is there any simple API available to check whether DB exists or not ?

Thank You.
Kumar    _/|\_
"making a profound difference with knowledge and creativity..."


2. the ISSUE of canvas.drawBitmap API

Hello everyone:

i drawed Bitmap by API drawBitmap(Bitmap bitmap, float left, float
top, Paint paint) in canvas,
when i moved the bitmap  by changing the left(float) value by array
{56.6, 56.7, 56.8, 56.9, 60, 60.1, 60.2, 60.3, 60.4}

But,the bimap dont move any pixel,it seems THIS API dont support float
number or i need set some thing value for it!
please tell me if anyone know the answer.



3. AlertDialog buttons not following the currently installed theme!

4. How come the accelrometers maximum sampling rate are so low?

5. Connection refused

6. edit view stretches too far.

7. Do the applications keep/manage their own SQLite databases (files)?