public AudioPlayer(int int0, WaveFormat waveFormat0, int int1, float volume, bool bool3, Delegate3 delegate31) { WaitCallback waitCallback = null; var volumeListener = new VolumeListener(); volumeListener.Volume = volume; _delegate40 = Class165.smethod_0; _object0 = new object(); //base..ctor(); volumeListener.AudioPlayer = this; _bool2 = bool3; _byte0 = (byte)((waveFormat0.short_2 == 8) ? 128 : 0); _delegate30 = delegate31; Exception4.smethod_1( Class162.waveOutOpen(out _intptr0, int0, waveFormat0, _delegate40, 0, Class162.Enum17.Const3), "waveOutOpen"); method_7(waveFormat0.method_0(int1 / 5), 5); _thread0 = new Thread(method_6); SetVolume(0f); _thread0.Start(); if (waitCallback == null) { waitCallback = volumeListener.StartListener; } ThreadPool.QueueUserWorkItem(waitCallback); }
public void method_0(GenericAudioStream stream11) { if (Thread.CurrentThread.ManagedThreadId != _thread0.ManagedThreadId) { lock (_queue1) { _queue1.Enqueue(new Class164(Enum19.Const0, _stream10)); _autoResetEvent0.Set(); } return; } _stream10 = stream11; _int0 = stream11.vmethod_0().method_0(_int2 / 5); Exception4.smethod_1( Class162.waveOutOpen(out _intptr0, _int1, _stream10.vmethod_0(), _delegate40, 0, Class162.Enum17.Const3), "waveOutOpen"); _stream10.Position = vmethod_0(); _class1580 = new Class158[5]; for (var i = 0; i < 5; i++) { _class1580[i] = new Class158(_intptr0, _int0, _stream10, _object0); } _bool0 = false; }