I use several Sound.loop , Sound.stop methods on one particular OGG file when I start and stop a level . It works fine for a while but as time advances it sometimes fails and I don't hear the sound anymore. LOGCAT:
AudioFlinger could not create track, status: -12
Error creating AudioTrack
It only happens on an older phone. How can I reset the sound memory system (sound pool) each time I restart the level so this doesn't happen?
I saved the ogg files to the minimum memory capacity in Audacity so I don't think this is the pb.
I had the exact same issue. My workaround was to use the Music class instead of Sound.
To initialize it:
Music note = Gdx.audio.newMusic(Gdx.files.internal("sounds/myfile.wav"));
note.setLooping(true);
Then just call .play() and .stop() as needed on the instance. Remember to call .dispose() when you no longer need it.
This worked for me and has the same practical effect than .loop() in a Sound instance.