public OggOutput(GenericAudioStream stream11, Device device1, int int5) { _stream10 = new Stream4(stream11, 16); _int1 = _stream10.vmethod_0().method_0(int5); _int1 -= _int1 % 5; _int0 = _int1 / 5; _double0 = _stream10.vmethod_0().int_0 *(double)_stream10.vmethod_0().short_1 / 1000.0; _byte0 = new byte[_int0]; _device0 = device1; if (_device0 == null) { _device0 = new Device(); _device0.SetCooperativeLevel(GetDesktopWindow(), CooperativeLevel.Normal); _bool0 = true; } _secondaryBuffer0 = new SecondaryBuffer(new BufferDescription { BufferBytes = _int1, ControlPositionNotify = true, CanGetCurrentPosition = true, ControlVolume = true, GlobalFocus = true, StickyFocus = true, Format = smethod_0(_stream10.vmethod_0()) }, _device0); _secondaryBuffer0.SetCurrentPosition(0); _int2 = 0; _secondaryBuffer0.Volume = 0; _autoResetEvent0 = new AutoResetEvent(false); _bufferPositionNotify1[0].EventNotifyHandle = _autoResetEvent0.Handle; _enum10 = AudioStatus.ShouldStopAudio; }
public Class117(GenericAudioStream stream1_1) { this.stream1_0 = stream1_1; this.class120_0 = (Class120.smethod_2() ?? new Class120()); this.enum12_0 = Class119.smethod_10(stream1_1.vmethod_0()); this.int_0 = stream1_1.vmethod_0().int_0; this.double_0 = (double)stream1_1.vmethod_0().int_0 *(double)stream1_1.vmethod_0().short_1 / 1000.0; this.int_1 = stream1_1.vmethod_0().method_0(80); this.int_2 = 5; this.intptr_0 = Marshal.AllocHGlobal(this.int_1); this.intptr_1 = Class119.smethod_2(); this.intptr_2 = Class119.smethod_8(this.int_2); this.enum1_0 = AudioStatus.ShouldStopAudio; }
public Class117(GenericAudioStream stream11) { _stream10 = stream11; _class1200 = (Class120.smethod_2() ?? new Class120()); _enum120 = Class119.smethod_10(stream11.vmethod_0()); _int0 = stream11.vmethod_0().int_0; _double0 = stream11.vmethod_0().int_0 *(double)stream11.vmethod_0().short_1 / 1000.0; _int1 = stream11.vmethod_0().method_0(80); _int2 = 5; _intptr0 = Marshal.AllocHGlobal(_int1); _intptr1 = Class119.smethod_2(); _intptr2 = Class119.smethod_8(_int2); _enum10 = AudioStatus.ShouldStopAudio; }
public static Class16 smethod_0(GenericAudioStream stream1_0, Stream stream_1, int int_3, int int_4) { WaveFormat waveFormat = stream1_0.vmethod_0(); if (waveFormat.waveFormatTag_0 != WaveFormatTag.PCM || waveFormat.short_2 != 16) { stream1_0 = new Stream4(stream1_0, 16); waveFormat = stream1_0.vmethod_0(); } Stream16 stream = new Stream16(stream_1, waveFormat, (waveFormat.int_0 == int_3) ? new BE_CONFIG(waveFormat, (uint)int_4) : new BE_CONFIG(waveFormat, (uint)int_4, (uint)int_3)); uint uint_ = (uint)stream.vmethod_1().Position; byte[] array = new byte[stream.method_0() * 2]; Class16 result; try { int count; while ((count = stream1_0.Read(array, 0, array.Length)) > 0) { stream.Write(array, 0, count); } result = new Class16(new WaveFormat(int_3, (int)waveFormat.short_0), uint_, (uint)stream.vmethod_1().Length, int_4 * 1000); } finally { stream.method_1(); } return(result); }
public WaveOutput(GenericAudioStream stream11, int int4, int int5) { _stream10 = stream11; _int1 = int4; _int2 = int5; _double0 = stream11.vmethod_0().int_0 *(double)stream11.vmethod_0().short_1 / 1000.0; _delegate40 = method_2; _queue1 = new Queue <Class164>(); _queue0 = new Queue <Class158>(5); _autoResetEvent0 = new AutoResetEvent(false); _object0 = new object(); _thread0 = new Thread(method_1); _thread0.Start(); _enum10 = AudioStatus.ShouldStopAudio; method_0(stream11); }
public WaveOutput(GenericAudioStream stream1_1, int int_4, int int_5) { this.stream1_0 = stream1_1; this.int_1 = int_4; this.int_2 = int_5; this.double_0 = (double)stream1_1.vmethod_0().int_0 *(double)stream1_1.vmethod_0().short_1 / 1000.0; this.delegate4_0 = new Class162.Delegate4(this.method_2); this.queue_1 = new Queue <WaveOutput.Class164>(); this.queue_0 = new Queue <Class158>(5); this.autoResetEvent_0 = new AutoResetEvent(false); this.object_0 = new object(); this.thread_0 = new Thread(new ThreadStart(this.method_1)); this.thread_0.Start(); this.enum1_0 = AudioStatus.ShouldStopAudio; this.method_0(stream1_1); }
public static Class16 smethod_0(GenericAudioStream stream10, Stream stream1, int int3, int int4) { var waveFormat = stream10.vmethod_0(); if (waveFormat.waveFormatTag_0 != WaveFormatTag.Pcm || waveFormat.short_2 != 16) { stream10 = new Stream4(stream10, 16); waveFormat = stream10.vmethod_0(); } var stream = new Stream16(stream1, waveFormat, (waveFormat.int_0 == int3) ? new BeConfig(waveFormat, (uint)int4) : new BeConfig(waveFormat, (uint)int4, (uint)int3)); var uint_ = (uint)stream.vmethod_1().Position; var array = new byte[stream.method_0() * 2]; Class16 result; try { int count; while ((count = stream10.Read(array, 0, array.Length)) > 0) { stream.Write(array, 0, count); } result = new Class16(new WaveFormat(int3, waveFormat.short_0), uint_, (uint)stream.vmethod_1().Length, int4 * 1000); } finally { stream.method_1(); } return(result); }
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; }
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; }
public WaveFormat GetWaveFormat() { return(_stream10.vmethod_0()); }
public Stream4(GenericAudioStream stream1_1, int int_4) { this.stream1_0 = stream1_1; this.fileStream = stream1_1; this.waveFormat_0 = stream1_1.vmethod_0(); this.int_3 = int_4 + 7 >> 3; this.int_2 = this.waveFormat_0.short_2 + 7 >> 3; this.bool_1 = (this.waveFormat_0.waveFormatTag_0 == WaveFormatTag.IEEEFloat); this.bool_0 = (this.waveFormat_0.waveFormatTag_0 != WaveFormatTag.PCM || this.int_2 != this.int_3); if (!this.bool_0) { this.delegate1_0 = new Stream4.Delegate1(this.stream1_0.Read); this.long_0 = stream1_1.Length; return; } this.waveFormat_0 = new WaveFormat(stream1_1.vmethod_0().int_0, int_4, (int)stream1_1.vmethod_0().short_0); this.double_0 = (double)this.int_3 / (double)this.int_2; this.long_0 = (long)((double)stream1_1.Length * this.double_0); if (!this.bool_1) { switch (this.int_3) { case 1: switch (this.int_2) { case 2: this.delegate1_0 = new Stream4.Delegate1(this.method_2); return; case 3: this.delegate1_0 = new Stream4.Delegate1(this.method_1); return; case 4: this.delegate1_0 = new Stream4.Delegate1(this.method_0); return; default: return; } break; case 2: switch (this.int_2) { case 1: this.delegate0_0 = new Stream4.Delegate0(Stream4.smethod_8); break; case 3: this.delegate0_0 = new Stream4.Delegate0(Stream4.smethod_7); break; case 4: this.delegate0_0 = new Stream4.Delegate0(Stream4.smethod_6); break; } break; case 3: switch (this.int_2) { case 1: this.delegate0_0 = new Stream4.Delegate0(Stream4.smethod_5); break; case 2: this.delegate0_0 = new Stream4.Delegate0(Stream4.smethod_4); break; case 4: this.delegate0_0 = new Stream4.Delegate0(Stream4.smethod_3); break; } break; case 4: switch (this.int_2) { case 1: this.delegate0_0 = new Stream4.Delegate0(Stream4.smethod_2); break; case 2: this.delegate0_0 = new Stream4.Delegate0(Stream4.smethod_1); break; case 3: this.delegate0_0 = new Stream4.Delegate0(Stream4.smethod_0); break; } break; } this.delegate1_0 = new Stream4.Delegate1(this.method_3); return; } switch (this.int_3) { case 1: this.delegate1_0 = new Stream4.Delegate1(this.method_7); return; case 2: this.delegate1_0 = new Stream4.Delegate1(this.method_6); return; case 3: this.delegate1_0 = new Stream4.Delegate1(this.method_5); return; case 4: this.delegate1_0 = new Stream4.Delegate1(this.method_4); return; default: return; } }
public SharpAudio.ASC.WaveFormat GetWaveFormat() { return(_stream10.vmethod_0()); }
public Stream3(GenericAudioStream stream1_1, TimeSpan timeSpan_0, TimeSpan timeSpan_1) : this(stream1_1, (long)Convert.ToInt32((double)(stream1_1.vmethod_0().int_0 *(int)stream1_1.vmethod_0().short_1) * timeSpan_0.TotalSeconds), (long)Convert.ToInt32((double)(stream1_1.vmethod_0().int_0 *(int)stream1_1.vmethod_0().short_1) * timeSpan_1.TotalSeconds)) { }
private Stream3(GenericAudioStream stream1_1) { this.stream1_0 = stream1_1; this.fileStream = stream1_1; this.waveFormat_0 = stream1_1.vmethod_0(); }