Playing sound from memory

by rookie1_1998 » Tue, 28 Apr 2009 11:03:24 GMT

Sponsored Links
 I need a way to play a short sound clip repeatedly very fast, with
precise timing for musical purpose.  I looked around, and it seems
like MediaPlayer and SoundPool don't guarantee lag-free playing.  Is
there anyway I could load the sound to memory myself and play from
memory (edit the stream)?

I know in Java I can do something with ByteArrayInputStream but so far
I couldn't find any way to do this in Android...


Playing sound from memory

by niko20 » Tue, 28 Apr 2009 19:17:34 GMT

 Hi, You can use the AudioTrack class to stream raw PCM data.


Sponsored Links

Playing sound from memory

by Marco Nelissen » Tue, 28 Apr 2009 23:28:00 GMT

 On Mon, Apr 27, 2009 at 5:50 PM, rookie1_1998

That's what SoundPool does: it loads the sound in to memory.
If you really want to copy the bytes yourself, then you should use


Playing sound from memory

by Dave Sparks » Wed, 29 Apr 2009 09:07:16 GMT

 SoundPool has too much jitter for a serious music application. If you
want to control the jitter, you need to output to a single AudioTrack.


Other Threads

1. Email ,Wifi settings

I am working on a application from which i need to  ADD,Delete ,Change Email
and Wifi Settings. I even need to add new Email Accounts .
Can you please give me some pointers where i can start this .

In Android, Are there APIs i can directly call for this or should it use
content provider to do the same.?



2. Active Sync support for android

Is  there a active-sync support in Android just like how we see in Windows
Mobile . If so how can i programatically set configuration parameters



3. URGENT ...How to get MCC , MNC, LAC of neighboring cells

4. JDBC Driver for SQLiteDatabase

5. onKeyDown() functionality issue

6. Threading in activity and AsyncTask problem

7. Android Icon Templates Pack - Menu Icons PSD Corrupted?