public Class109(GenericAudioStream stream1_1, Device device_1, int int_5) { this.stream1_0 = new Stream4(stream1_1, 16); this.int_1 = this.stream1_0.vmethod_0().method_0(int_5); this.int_1 -= this.int_1 % 5; this.int_0 = this.int_1 / 5; this.double_0 = (double)this.stream1_0.vmethod_0().int_0 * (double)this.stream1_0.vmethod_0().short_1 / 1000.0; this.byte_0 = new byte[this.int_0]; this.device_0 = device_1; if (this.device_0 == null) { this.device_0 = new Device(); this.device_0.SetCooperativeLevel(Class109.GetDesktopWindow(), CooperativeLevel.Normal); this.bool_0 = true; } this.secondaryBuffer_0 = new SecondaryBuffer(new BufferDescription { BufferBytes = this.int_1, ControlPositionNotify = true, CanGetCurrentPosition = true, ControlVolume = true, GlobalFocus = true, StickyFocus = true, Format = Class109.smethod_0(this.stream1_0.vmethod_0()) }, this.device_0); this.secondaryBuffer_0.SetCurrentPosition(0); this.int_2 = 0; this.secondaryBuffer_0.Volume = 0; this.autoResetEvent_0 = new AutoResetEvent(false); this.bufferPositionNotify_1[0].EventNotifyHandle = this.autoResetEvent_0.Handle; this.enum1_0 = Enum1.const_0; }
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 static Interface6 smethod_0(Enum25 enum25_0, GenericAudioStream audioStream) { switch (enum25_0) { case Enum25.const_1: return new Class163(audioStream); case Enum25.const_2: return new Class155(audioStream); case Enum25.const_3: return new Class163(audioStream); case Enum25.const_5: return new Class163(audioStream); } bool flag = Type.GetType("Mono.Runtime") != null; int platform = (int)Environment.OSVersion.Platform; switch (platform) { case 0: case 1: case 2: case 3: { Interface6 result; try { result = new Class163(audioStream); } catch { result = new Class109(audioStream); } return result; } case 4: case 6: goto IL_F4; case 5: break; default: if (platform == 128) { goto IL_F4; } break; } throw new PlatformNotSupportedException(string.Concat(new object[] { flag ? "" : "Not ", "Running Mono. PlatformID: ", (int)Environment.OSVersion.Platform, " | ", Environment.OSVersion.Platform })); IL_F4: return new Class117(audioStream); }
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 = Enum1.const_0; }
public Class163(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<Class163.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 = Enum1.const_0; this.method_0(stream1_1); }
public Stream2(Enum2 enum2_1, ushort ushort_0, GenericAudioStream stream1_0, Interface5[] interface5_0) : base() { this.list_0 = new List <GenericAudioStream>(); this.class12_0 = new Class12(new Interface5[0]); //base..ctor(); this.enum2_0 = enum2_1; this.bool_1 = false; this.waveFormat_0 = new WaveFormat(stream1_0.vmethod_0().int_0, (ushort_0 != 0) ? ((int)ushort_0) : Math.Min((int)stream1_0.vmethod_0().short_0, Stream2.smethod_0(this.enum2_0))); this.list_0.Add(stream1_0); this.long_1 = 0L; stream1_0.Position = 0L; this.long_0 = Convert.ToInt64((double)(this.waveFormat_0.int_0 * (int)this.waveFormat_0.short_1) * stream1_0.vmethod_1().timeSpan_0.TotalSeconds); this.method_0(interface5_0); this.bool_0 = (stream1_0.vmethod_0().short_0 == 1 && ushort_0 < 2); this.int_2 = (int)this.waveFormat_0.short_0 << 2; }
public Class155(GenericAudioStream stream1_1, bool bool_1) { if (stream1_1.Length <= 0L) { throw new Exception("WinMM2Player: Invalid Stream."); } this.class16_0 = stream1_1.vmethod_1(); if (this.class16_0.waveFormat_0.waveFormatTag_0 != WaveFormatTag.PCM && this.class16_0.waveFormat_0.waveFormatTag_0 != WaveFormatTag.IEEEFloat) { throw new Exception("WinMM2Player: Only PCM is supported."); } this.stream1_0 = stream1_1; this.bool_0 = bool_1; this.imethod_2(0); this.enum1_0 = Enum1.const_0; }
public Stream2(Enum2 enum2_1, ushort ushort_0, GenericAudioStream stream1_0, Interface5[] interface5_0) : base() { this.list_0 = new List<GenericAudioStream>(); this.class12_0 = new Class12(new Interface5[0]); //base..ctor(); this.enum2_0 = enum2_1; this.bool_1 = false; this.waveFormat_0 = new WaveFormat(stream1_0.vmethod_0().int_0, (ushort_0 != 0) ? ((int)ushort_0) : Math.Min((int)stream1_0.vmethod_0().short_0, Stream2.smethod_0(this.enum2_0))); this.list_0.Add(stream1_0); this.long_1 = 0L; stream1_0.Position = 0L; this.long_0 = Convert.ToInt64((double)(this.waveFormat_0.int_0 * (int)this.waveFormat_0.short_1) * stream1_0.vmethod_1().timeSpan_0.TotalSeconds); this.method_0(interface5_0); this.bool_0 = (stream1_0.vmethod_0().short_0 == 1 && ushort_0 < 2); this.int_2 = (int)this.waveFormat_0.short_0 << 2; }
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"); } }
public Stream3(GenericAudioStream stream1_1, long long_3, long long_4) : this(stream1_1) { if (0L > long_3) { throw new ArgumentException("Start Offset is out of range."); } if (stream1_1.Length < long_4) { throw new ArgumentException("End Offset is out of range."); } if (long_3 >= long_4) { throw new ArgumentException("Start/End Offset are out of range."); } this.long_1 = long_4 - long_3; Stream arg_63_0 = this.stream1_0; this.long_0 = long_3; this.long_2 = long_3; arg_63_0.Position = long_3; }
public FSBStream(FSBClass1 class167_0) { switch (class167_0.method_33().Count) { case 0: throw new Exception5("FSB Stream: No subfiles."); case 1: this.fileStream = (this.stream1_0 = FSBStream.smethod_0(class167_0.method_33()[0])); break; default: { List<GenericAudioStream> list = new List<GenericAudioStream>(); foreach (Class168 current in class167_0.method_33()) { list.Add(FSBStream.smethod_0(current)); } this.fileStream = (this.stream1_0 = new Stream2(list.ToArray())); break; } } this.waveFormat_0 = this.stream1_0.vmethod_0(); }
public Stream2(Enum2 enum2_1, ushort ushort_0, bool bool_2, GenericAudioStream[] stream1_0) : base() { this.list_0 = new List <GenericAudioStream>(); this.class12_0 = new Class12(new Interface5[0]); //base..ctor(); this.enum2_0 = enum2_1; this.bool_1 = bool_2; this.list_0.AddRange(stream1_0); this.bool_0 = (stream1_0.Length == 1 && stream1_0[0].vmethod_0().short_0 == 1 && ushort_0 < 2); this.long_1 = 0L; this.long_0 = stream1_0[0].Length; int val = 0; int num = 0; for (int i = 0; i < stream1_0.Length; i++) { GenericAudioStream stream = stream1_0[i]; val = Math.Max(val, stream.vmethod_0().int_0); if (this.bool_1) { num += (int)stream.vmethod_0().short_0; } else { num = Math.Max(num, (int)stream.vmethod_0().short_0); } stream.Position = this.long_1; } this.waveFormat_0 = new WaveFormat(val, (ushort_0 != 0) ? ((int)ushort_0) : Math.Min(num, Stream2.smethod_0(this.enum2_0) * (this.bool_1 ? stream1_0.Length : 1))); for (int j = 0; j < stream1_0.Length; j++) { GenericAudioStream stream2 = stream1_0[j]; this.long_0 = Math.Max(this.long_0, Convert.ToInt64((double)(this.waveFormat_0.int_0 * (int)this.waveFormat_0.short_1) * stream2.vmethod_1().timeSpan_0.TotalSeconds)); } this.int_2 = (int)this.waveFormat_0.short_0 << 2; }
public Stream2(Enum2 enum2_1, ushort ushort_0, bool bool_2, GenericAudioStream[] stream1_0) : base() { this.list_0 = new List<GenericAudioStream>(); this.class12_0 = new Class12(new Interface5[0]); //base..ctor(); this.enum2_0 = enum2_1; this.bool_1 = bool_2; this.list_0.AddRange(stream1_0); this.bool_0 = (stream1_0.Length == 1 && stream1_0[0].vmethod_0().short_0 == 1 && ushort_0 < 2); this.long_1 = 0L; this.long_0 = stream1_0[0].Length; int val = 0; int num = 0; for (int i = 0; i < stream1_0.Length; i++) { GenericAudioStream stream = stream1_0[i]; val = Math.Max(val, stream.vmethod_0().int_0); if (this.bool_1) { num += (int)stream.vmethod_0().short_0; } else { num = Math.Max(num, (int)stream.vmethod_0().short_0); } stream.Position = this.long_1; } this.waveFormat_0 = new WaveFormat(val, (ushort_0 != 0) ? ((int)ushort_0) : Math.Min(num, Stream2.smethod_0(this.enum2_0) * (this.bool_1 ? stream1_0.Length : 1))); for (int j = 0; j < stream1_0.Length; j++) { GenericAudioStream stream2 = stream1_0[j]; this.long_0 = Math.Max(this.long_0, Convert.ToInt64((double)(this.waveFormat_0.int_0 * (int)this.waveFormat_0.short_1) * stream2.vmethod_1().timeSpan_0.TotalSeconds)); } this.int_2 = (int)this.waveFormat_0.short_0 << 2; }
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)) { }
public Class163(GenericAudioStream stream1_1) : this(stream1_1, -1, 300) { }
public Stream2(Enum2 enum2_1, GenericAudioStream[] stream1_0) : this(enum2_1, 0, false, stream1_0) { }
public Class155(GenericAudioStream stream1_1) : this(stream1_1, false) { }
public Class109(GenericAudioStream stream1_1) : this(stream1_1, null, 500) { }
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 Stream2(Enum2 enum2_1, GenericAudioStream stream1_0, Interface5[] interface5_0) : this(enum2_1, 0, stream1_0, interface5_0) { }
public Stream2(GenericAudioStream stream1_0, Interface5[] interface5_0) : this(Enum2.flag_26, stream1_0, interface5_0) { }
private Stream3(GenericAudioStream stream1_1) { this.stream1_0 = stream1_1; this.fileStream = stream1_1; this.waveFormat_0 = stream1_1.vmethod_0(); }
public void method_1(bool bool_1) { this.imethod_5(); if (bool_1 && this.stream1_0 != null) { try { this.stream1_0.Dispose(); } finally { this.stream1_0 = null; } } }
public void method_0(GenericAudioStream stream1_1) { if (Thread.CurrentThread.ManagedThreadId != this.thread_0.ManagedThreadId) { lock (this.queue_1) { this.queue_1.Enqueue(new Class163.Class164(Class163.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 Stream2(GenericAudioStream[] stream1_0) : this(Enum2.flag_26, stream1_0) { }