Trying to play a sound right after i load it
<p>I have a sound board and I'm trying to load the sound, if it has not been loaded, then play it.
 The first time some one presses a button to play the sound, it loads it, plays it but there is no sound.  When they click the button a second time, the sound does not load and just plays.
When i step through the debugger, it worked, I'm assuming that the sound is loading in the bacground, and the dubber gives the sound enough time to load??</p>

<p>code:
    if (iSoundIdList[i]==0)
        {
        Parent.LoadSound(i);
        }
          Parent.StartSound(i);</p>

<pre><code>     public void LoadSound(int i)
       {
           cGlobals.iSoundIdList[i]=soundPool.load(this, cGlobals.mSounds[i], 1);  
       }

     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 = actualVolume / maxVolume;

            float volume=(float) ( .01*(double)cGlobals.iVol);


            // Is the sound loaded already?
            if (nLastSound!=0)
                soundPool.stop(nLastSound);


                int t=soundPool.play(id, volume, volume, 1, 0, 1f);
                nLastSound=t;
       }  
</code></pre>
