When you use the play method with soundPool, does the method automatically create a separate thread for playing the sound (especially if you put it to loop indefinitely), or does it use the UI thread to play the sound?
I'm only asking because my application crashes randomly and I think it's because I over work the UI thread. Considering putting my soundPool loop on a service with its own process.
SoundPool may create several threads, depending on how it's configured. Look at the set of threads present while your app is running (using adb shell ps -t
or DDMS' thread view). You'll see "SoundPool", "SoundPoolThread", and "AudioTrack".
"Overworking" a thread isn't really a crash cause. You may want to post a new question here with crash details in it (esp. the logcat output); maybe someone can spot why it's failing.