Exemplo n.º 1
0
 public void Dispose()
 {
     lock (this.object_0)
     {
         if (this.thread_0 != null)
         {
             try
             {
                 this.bool_0 = true;
                 if (this.intptr_0 != IntPtr.Zero)
                 {
                     Class162.waveOutReset(this.intptr_0);
                 }
                 this.thread_0.Join();
                 this.delegate3_0 = null;
                 this.method_8();
                 if (this.intptr_0 != IntPtr.Zero)
                 {
                     AudioPlayer.Class161 @class = new AudioPlayer.Class161();
                     @class.class159_0 = this;
                     @class.intptr_0   = this.intptr_0;
                     ThreadPool.QueueUserWorkItem(new WaitCallback(@class.method_0));
                 }
             }
             finally
             {
                 this.thread_0 = null;
                 this.intptr_0 = IntPtr.Zero;
             }
         }
     }
     GC.SuppressFinalize(this);
 }
Exemplo n.º 2
0
        public void StopPlaying()
        {
            if (Thread.CurrentThread.ManagedThreadId != this.thread_0.ManagedThreadId)
            {
                lock (this.queue_1)
                {
                    this.queue_1.Enqueue(new WaveOutput.Class164(WaveOutput.Enum19.const_1, null));
                    this.autoResetEvent_0.Set();
                }
                return;
            }
            this.enum1_0 = AudioStatus.ShouldStopAudio;
            this.bool_0  = false;
            Enum18 @enum;

            lock (this.object_0)
            {
                @enum = Class162.waveOutReset(this.intptr_0);
            }
            if (@enum != Enum18.const_0)
            {
                throw new Exception4(@enum, "waveOutReset");
            }
            this.stopwatch_0.Reset();
        }