Skip to content Skip to sidebar Skip to footer

Soundpool Error: No More Track Names Available

I'm having troubles with the soundpool class. Here it goes: In my game app (music app btw) I need to reproduce at least 32 short sounds at the same time, so I declare my soundpool

Solution 1:

see this (in android group)

For audio, there's a hard limit of 32 active AudioTrack objects per device (not per app: you need to share those 32 with rest of the system),

Solution 2:

A couple of thoughts here. One: the first parameter to the SoundPool constructor is not the number of sounds you want to load into it, it's the maximum number of simultaneous streams that you'll be playing. Second, SoundPool has limited memory for sounds, about 1MB. So I wouldn't be at all surprised if you hit some undocumented limit to the number of tracks you can load in at one time. Notice that 80 sounds times 55k per sound is definitely over 1MB. And that limit is for after the mp3s have been uncompressed into audio data inside SoundPool.

Post a Comment for "Soundpool Error: No More Track Names Available"