E/AudioTrack(32581): AudioFlinger could not create track, status: -12

608 views
Skip to first unread message

Gulfas

unread,
Apr 18, 2014, 7:35:05 AM4/18/14
to andro...@googlegroups.com
Hi,

I'm having some problems with OpenSL ES. My game is based in the native-activity sample and also uses OpenSL ES to stream ogg/vorbis and play uncompressed PCM data.

As it doesn't seem to be possible to reuse the AudioPlayer object and setup a new sound source to play different sound effects, I'm calling to CreateAudioPlayer() each time I want to play a new sound effect. 

Then when my callback for that sound effect gets called I call to the Destroy() method

(* mBqPlayerObject)->Destroy( mBqPlayerObject );

There is never more than one sound effect playing at the same time.

Eventually after playing a few sound effects the game fails while trying to create a new AudioPlayer, the call that fails is the one below:

result = (* mBqPlayerObject)->Realize( mBqPlayerObject, SL_BOOLEAN_FALSE );

In logcat I can see the following:

E/AudioFlinger(  190): no more track names available
E/AudioTrack(32581): AudioFlinger could not create track, status: -12
E/libOpenSLES(32581): AudioTrack::initCheck status 4294967284
W/libOpenSLES(32581): Leaving Object::Realize (SL_RESULT_CONTENT_UNSUPPORTED)


I don't understand why the system runs out of tracks because I am destroying the mBqPlayerObject every time I play a sound effect. Isn't that enough to release the tracks? 


I'd appreciate any feedback.



Reply all
Reply to author
Forward
0 new messages