Exemple #1
0
 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;
 }
Exemple #2
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;
        }
Exemple #3
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;
 }
Exemple #4
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;
 }