private void DisposeXAudio()
 {
     if (XAudio != null)
     {
         XAudio.Dispose();
     }
     XAudio = null;
 }
예제 #2
0
        /// <summary>
        /// Used to notify when audio processing stops (so that the timing calculator can be reset).
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Event_PlaybackStopped(object sender, StoppedEventArgs e)
        {
            isRunning = isPaused = false;
            if (xAudio == null)
            {
                ResetBufferToZero(); return;
            }

            XAudio.Dispose();
            xAudio = null;
            ResetBufferToZero();
        }
예제 #3
0
 public void Dispose()
 {
     MasteringVoice.Dispose();
     XAudio.Dispose();
 }