I am writting a sound board. I would like it so when a person presses the button to play the sound, it would first see if a sound is stil playing. So it can then stop that sound and start the new one.
Is thier a way to see if a sound id still playing, I'm jsing the following code to start my sound
// Sound code
void StartSound(int id)
{
AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
float actualVolume = (float) audioManager
.getStreamVolume(AudioManager.STREAM_MUSIC);
float maxVolume = (float) audioManager
.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
float volume=(float) ((float)cGlobals.gVol/100.00);
// Is the sound loaded already?
soundPool.play(id, volume, volume, 1, 0, 1f);
}