コード例 #1
0
        private void PlatformResume()
        {
            if (!hasSourceId)
            {
                Play();
                return;
            }

            if (soundState == SoundState.Paused)
            {
                controller.ResumeSound(soundBuffer);
            }
            soundState = SoundState.Playing;
        }
コード例 #2
0
 /// <summary>
 /// When the sound state is paused, and the source is available, then the sound
 /// is played using the ResumeSound method from the OpenALSoundController. Otherwise,
 /// the sound is played using the Play() method. Upon success, the sound state should
 /// be SoundState.Playing.
 /// </summary>
 public void Resume()
 {
     if (hasSourceId)
     {
         if (soundState == SoundState.Paused)
         {
             controller.ResumeSound(soundBuffer);
             soundState = SoundState.Playing;
         }
     }
     else
     {
         Play();
     }
 }