Stop sound running through infinite loop
<p>I am playing a sound infinite time using following code  </p>

<pre><code>SoundPool sounds = new SoundPool(10, AudioManager.STREAM_MUSIC, 0);  
beepSound = sounds.load(this, R.raw.beep, 1);  
beepSoundStream = sounds.play(beepSound, 1.0f, 1.0f, 0,-1, 1.5f);  
</code></pre>

<p>On some event i want to stop the sound. I am trying  </p>

<pre><code>sounds.stop(beepSoundStream);  
</code></pre>

<p>I have also tried</p>

<pre><code>sounds.stop(beepSound)  
</code></pre>

<p>But it is not working.</p>
