This may be impossible but is there any way that I can get a smaller
buffer size
for AudioTrack than what is provided by getMinBufferSize method?
This is how I am instantiating AudioTrack right now:
SR = 44100;
bufSize = AudioTrack.getMinBufferSize(SR,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT);
audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, SR,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT, bufSize,
AudioTrack.MODE_STREAM);
With sample rate of 44100, getMinBufferSize always returns 4800.
If I try to make the buffer size smaller than 4800 then I get the
following error message:
E/AudioTrack( 318): Invalid buffer size: minFrameCount 1200,
frameCount 600
E/AudioTrack-JNI( 318): Error initializing AudioTrack
E/AudioTrack-Java( 318): [ android.media.AudioTrack ] Error code -20
when initializing AudioTrack.
D/AndroidRuntime( 318): Shutting down VM
W/dalvikvm( 318): threadid=3: thread exiting with uncaught exception
(group=0x4000fe70)
E/AndroidRuntime( 318): Uncaught handler: thread main exiting due to
uncaught exception
I/CheckinService( 59): From server: Intent
{ action=android.server.checkin.FOTA_CANCEL }
E/AndroidRuntime( 318): java.lang.RuntimeException: Unable to start
activity
Does anyone has any ideas how to over come this problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---