示例#1
0
 private void method_9(int int_4)
 {
     lock (this.object_0)
     {
         Exception4.smethod_1(Class162.waveOutSetVolume(this.intptr_0, int_4), "waveOutSetVolume");
     }
 }
示例#2
0
        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);
        }
示例#3
0
 private void method_9(int int4)
 {
     lock (_object0)
     {
         Exception4.smethod_1(Class162.waveOutSetVolume(_intptr0, int4), "waveOutSetVolume");
     }
 }
示例#4
0
 public Class165(IntPtr intptr_1, int int_0)
 {
     this.intptr_0            = intptr_1;
     this.gchandle_0          = GCHandle.Alloc(this.struct66_0, GCHandleType.Pinned);
     this.struct66_0.intptr_1 = (IntPtr)GCHandle.Alloc(this);
     this.byte_0              = new byte[int_0];
     this.gchandle_1          = GCHandle.Alloc(this.byte_0, GCHandleType.Pinned);
     this.struct66_0.intptr_0 = this.gchandle_1.AddrOfPinnedObject();
     this.struct66_0.int_0    = int_0;
     Exception4.smethod_1(Class162.waveOutPrepareHeader(this.intptr_0, ref this.struct66_0, Marshal.SizeOf(this.struct66_0)), "waveOutPrepareHeader");
 }
示例#5
0
 public Class165(IntPtr intptr1, int int0)
 {
     _intptr0           = intptr1;
     _gchandle0         = GCHandle.Alloc(_struct660, GCHandleType.Pinned);
     _struct660.Intptr1 = (IntPtr)GCHandle.Alloc(this);
     _byte0             = new byte[int0];
     _gchandle1         = GCHandle.Alloc(_byte0, GCHandleType.Pinned);
     _struct660.Intptr0 = _gchandle1.AddrOfPinnedObject();
     _struct660.Int0    = int0;
     Exception4.smethod_1(Class162.waveOutPrepareHeader(_intptr0, ref _struct660, Marshal.SizeOf(_struct660)),
                          "waveOutPrepareHeader");
 }
示例#6
0
 public Class158(IntPtr intptr_1, int int_1, GenericAudioStream stream1_1, object object_1)
 {
     this.int_0               = int_1;
     this.class17_0           = new Class17(int_1);
     this.gchandle_0          = GCHandle.Alloc(this.class17_0.method_0(), GCHandleType.Pinned);
     this.intptr_0            = intptr_1;
     this.stream1_0           = stream1_1;
     this.object_0            = object_1;
     this.struct66_0          = default(Struct66);
     this.gchandle_1          = GCHandle.Alloc(this.struct66_0);
     this.struct66_0.intptr_0 = this.gchandle_0.AddrOfPinnedObject();
     this.struct66_0.int_0    = int_1;
     this.struct66_0.int_2    = 1;
     this.gchandle_2          = GCHandle.Alloc(this);
     this.struct66_0.intptr_1 = (IntPtr)this.gchandle_2;
     lock (object_1)
     {
         Exception4.smethod_1(Class162.waveOutPrepareHeader(intptr_1, ref this.struct66_0, Marshal.SizeOf(this.struct66_0)), "waveOutPrepareHeader");
     }
 }
示例#7
0
 public Class158(IntPtr intptr1, int int1, GenericAudioStream stream11, object object1)
 {
     _int0              = int1;
     _class170          = new Class17(int1);
     _gchandle0         = GCHandle.Alloc(_class170.method_0(), GCHandleType.Pinned);
     _intptr0           = intptr1;
     _stream10          = stream11;
     _object0           = object1;
     _struct660         = default(Struct66);
     _gchandle1         = GCHandle.Alloc(_struct660);
     _struct660.Intptr0 = _gchandle0.AddrOfPinnedObject();
     _struct660.Int0    = int1;
     _struct660.Int2    = 1;
     _gchandle2         = GCHandle.Alloc(this);
     _struct660.Intptr1 = (IntPtr)_gchandle2;
     lock (object1)
     {
         Exception4.smethod_1(Class162.waveOutPrepareHeader(intptr1, ref _struct660, Marshal.SizeOf(_struct660)),
                              "waveOutPrepareHeader");
     }
 }
示例#8
0
 public void method_0(GenericAudioStream stream1_1)
 {
     if (Thread.CurrentThread.ManagedThreadId != this.thread_0.ManagedThreadId)
     {
         lock (this.queue_1)
         {
             this.queue_1.Enqueue(new WaveOutput.Class164(WaveOutput.Enum19.const_0, this.stream1_0));
             this.autoResetEvent_0.Set();
         }
         return;
     }
     this.stream1_0 = stream1_1;
     this.int_0     = stream1_1.vmethod_0().method_0(this.int_2 / 5);
     Exception4.smethod_1(Class162.waveOutOpen(out this.intptr_0, this.int_1, this.stream1_0.vmethod_0(), this.delegate4_0, 0, Class162.Enum17.const_3), "waveOutOpen");
     this.stream1_0.Position = (long)this.vmethod_0();
     this.class158_0         = new Class158[5];
     for (int i = 0; i < 5; i++)
     {
         this.class158_0[i] = new Class158(this.intptr_0, this.int_0, this.stream1_0, this.object_0);
     }
     this.bool_0 = false;
 }
示例#9
0
        public AudioPlayer(int int_0, WaveFormat waveFormat_0, int int_1, float Volume, bool bool_3, Delegate3 delegate3_1) : base()
        {
            WaitCallback waitCallback = null;

            AudioPlayer.VolumeListener volumeListener = new AudioPlayer.VolumeListener();
            volumeListener.Volume = Volume;
            this.delegate4_0      = new Class162.Delegate4(Class165.smethod_0);
            this.object_0         = new object();
            //base..ctor();
            volumeListener.audioPlayer = this;
            this.bool_2      = bool_3;
            this.byte_0      = (byte)((waveFormat_0.short_2 == 8) ? 128 : 0);
            this.delegate3_0 = delegate3_1;
            Exception4.smethod_1(Class162.waveOutOpen(out this.intptr_0, int_0, waveFormat_0, this.delegate4_0, 0, Class162.Enum17.const_3), "waveOutOpen");
            this.method_7(waveFormat_0.method_0(int_1 / 5), 5);
            this.thread_0 = new Thread(new ThreadStart(this.method_6));
            this.SetVolume(0f);
            this.thread_0.Start();
            if (waitCallback == null)
            {
                waitCallback = new WaitCallback(volumeListener.StartListener);
            }
            ThreadPool.QueueUserWorkItem(waitCallback);
        }
示例#10
0
 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;
 }