Example #1
0
 /// <summary>
 /// Resume playing after a pause from the same position
 /// </summary>
 public void Resume()
 {
     if (playbackState == PlaybackState.Paused)
     {
         MmResult result;
         lock (waveOutLock)
         {
             result = WaveInterop.waveOutRestart(hWaveOut);
         }
         if (result != MmResult.NoError)
         {
             throw new MmException(result, "waveOutRestart");
         }
         playbackState = PlaybackState.Playing;
     }
 }
Example #2
0
 /// <summary>
 /// Resume playing after a pause from the same position
 /// </summary>
 // Token: 0x06000A15 RID: 2581 RVA: 0x0001D4EC File Offset: 0x0001B6EC
 private void Resume()
 {
     if (this.playbackState == PlaybackState.Paused)
     {
         MmResult mmResult;
         lock (this.waveOutLock)
         {
             mmResult = WaveInterop.waveOutRestart(this.hWaveOut);
         }
         if (mmResult != MmResult.NoError)
         {
             throw new MmException(mmResult, "waveOutRestart");
         }
         this.playbackState = PlaybackState.Playing;
     }
 }
Example #3
0
        /// <summary>
        /// Resume playing after a pause from the same position
        /// </summary>
        public void Resume()
        {
            if (Thread.CurrentThread.ManagedThreadId != waveOutThread.ManagedThreadId)
            {
                lock (actionQueue)
                {
                    actionQueue.Enqueue(new WaveOutAction(WaveOutFunction.Resume, null));
                    workAvailable.Set();
                }
                return;
            }

            MmResult result = WaveInterop.waveOutRestart(hWaveOut);

            if (result != MmResult.NoError)
            {
                throw new MmException(result, "waveOutRestart");
            }
            playbackState = PlaybackState.Playing;
        }