Esempio n. 1
0
 public static byte[] smethod_4(Struct8 struct80)
 {
     return(new[]
     {
         struct80.byte_0,
         struct80.byte_1,
         struct80.byte_2
     });
 }
Esempio n. 2
0
 public static int smethod_0(Struct8 struct80)
 {
     return(BitConverter.ToInt32(new[]
     {
         struct80.byte_0,
         struct80.byte_1,
         struct80.byte_2,
         (struct80.byte_2 > 127) ? (byte)255 : (byte)0
     }, 0));
 }
Esempio n. 3
0
        public static Struct8 smethod_6(Struct8 struct80, int int2)
        {
            var array = new byte[4];

            array[0] = struct80.byte_0;
            array[1] = struct80.byte_1;
            array[2] = struct80.byte_2;
            var num = BitConverter.ToInt32(array, 0);

            num <<= int2;
            return(smethod_1(num));
        }
Esempio n. 4
0
        public virtual int vmethod_4(float[] float0, int int2, int int3)
        {
            var num    = vmethod_0().short_2 + 7 >> 3;
            var array  = new byte[num * int3];
            var num2   = Read(array, num * int2, array.Length) / num;
            var num3   = int2 + num2;
            var short_ = vmethod_0().short_2;

            if (short_ <= 16)
            {
                if (short_ == 8)
                {
                    for (var i = 0; i < num3; i++)
                    {
                        float0[int2 + i] = Class11.smethod_3(array[i]);
                    }
                    return(num2);
                }
                if (short_ == 16)
                {
                    var num4 = 0;
                    while (int2 < num3)
                    {
                        float0[int2] = Class11.smethod_7(BitConverter.ToInt16(array, num4));
                        num4        += num;
                        int2++;
                    }
                    return(num2);
                }
            }
            else
            {
                if (short_ == 24)
                {
                    var num5 = 0;
                    while (int2 < num3)
                    {
                        float0[int2] = Class11.smethod_11(Struct8.smethod_2(array, num5));
                        num5        += num;
                        int2++;
                    }
                    return(num2);
                }
                if (short_ != 32)
                {
                    if (short_ == 64)
                    {
                        if (vmethod_0().waveFormatTag_0 == WaveFormatTag.IeeeFloat)
                        {
                            var num6 = 0;
                            while (int2 < num3)
                            {
                                float0[int2] = Class11.smethod_26(BitConverter.ToDouble(array, num6));
                                num6        += num;
                                int2++;
                            }
                            return(num2);
                        }
                    }
                }
                else
                {
                    if (vmethod_0().waveFormatTag_0 == WaveFormatTag.IeeeFloat)
                    {
                        Buffer.BlockCopy(array, 0, float0, int2 << 2, num2);
                        return(num2);
                    }
                    var num7 = 0;
                    while (int2 < num3)
                    {
                        float0[int2] = Class11.smethod_15(BitConverter.ToInt32(array, num7));
                        num7        += num;
                        int2++;
                    }
                    return(num2);
                }
            }
            throw new ArrayTypeMismatchException();
        }
Esempio n. 5
0
 public static Struct8 smethod_14(int int0)
 {
     return(Struct8.smethod_1(int0 >> 8));
 }
Esempio n. 6
0
        public virtual float[][] vmethod_5(int int2)
        {
            var num   = vmethod_0().short_2 + 7 >> 3;
            var array = new byte[num * int2 * WaveFormat0.short_0];
            var num2  = Read(array, 0, array.Length) / num / WaveFormat0.short_0;

            if (num2 <= 0)
            {
                return(null);
            }
            int short_ = WaveFormat0.short_0;
            var num3   = num * short_;
            var array2 = new float[short_][];
            var short2 = vmethod_0().short_2;

            if (short2 <= 16)
            {
                if (short2 == 8)
                {
                    for (var i = 0; i < short_; i++)
                    {
                        var array3 = array2[i] = new float[num2];
                        var j      = 0;
                        var num4   = i;
                        while (j < array3.Length)
                        {
                            array3[j] = Class11.smethod_3(array[num4]);
                            j++;
                            num4 += short_;
                        }
                    }
                    return(array2);
                }
                if (short2 == 16)
                {
                    for (var k = 0; k < short_; k++)
                    {
                        var array4 = array2[k] = new float[num2];
                        var l      = 0;
                        var num5   = num * k;
                        while (l < array4.Length)
                        {
                            array4[l] = Class11.smethod_7(BitConverter.ToInt16(array, num5));
                            l++;
                            num5 += num3;
                        }
                    }
                    return(array2);
                }
            }
            else
            {
                if (short2 == 24)
                {
                    for (var m = 0; m < short_; m++)
                    {
                        var array5 = array2[m] = new float[num2];
                        var n      = 0;
                        var num6   = num * m;
                        while (n < array5.Length)
                        {
                            array5[n] = Class11.smethod_11(Struct8.smethod_2(array, num6));
                            n++;
                            num6 += num3;
                        }
                    }
                    return(array2);
                }
                if (short2 != 32)
                {
                    if (short2 == 64)
                    {
                        if (vmethod_0().waveFormatTag_0 == WaveFormatTag.IeeeFloat)
                        {
                            for (var num7 = 0; num7 < short_; num7++)
                            {
                                var array6 = array2[num7] = new float[num2];
                                var num8   = 0;
                                var num9   = num * num7;
                                while (num8 < array6.Length)
                                {
                                    array6[num8] = Class11.smethod_26(BitConverter.ToDouble(array, num9));
                                    num8++;
                                    num9 += num3;
                                }
                            }
                            return(array2);
                        }
                    }
                }
                else
                {
                    if (vmethod_0().waveFormatTag_0 != WaveFormatTag.IeeeFloat)
                    {
                        for (var num10 = 0; num10 < short_; num10++)
                        {
                            var array7 = array2[num10] = new float[num2];
                            var num11  = 0;
                            var num12  = num * num10;
                            while (num11 < array7.Length)
                            {
                                array7[num11] = Class11.smethod_15(BitConverter.ToInt32(array, num12));
                                num11++;
                                num12 += num3;
                            }
                        }
                        return(array2);
                    }
                    if (short_ == 1)
                    {
                        Buffer.BlockCopy(array, 0, array2[0], 0, array.Length);
                        return(array2);
                    }
                    for (var num13 = 0; num13 < short_; num13++)
                    {
                        var array8 = array2[num13] = new float[num2];
                        var num14  = 0;
                        var num15  = num * num13;
                        while (num14 < array8.Length)
                        {
                            array8[num14] = BitConverter.ToSingle(array, num15);
                            num14++;
                            num15 += num3;
                        }
                    }
                    return(array2);
                }
            }
            throw new ArrayTypeMismatchException();
        }
Esempio n. 7
0
 public static int smethod_10(Struct8 struct80)
 {
     return(Struct8.smethod_0(Struct8.smethod_6(struct80, 8)));
 }
Esempio n. 8
0
 public static float smethod_11(Struct8 struct80)
 {
     return(Struct8.smethod_0(struct80) * 1f / 8388608f);
 }
Esempio n. 9
0
 public static short smethod_9(Struct8 struct80)
 {
     return((short)Struct8.smethod_0(Struct8.smethod_5(struct80, 8)));
 }
Esempio n. 10
0
 public static byte smethod_8(Struct8 struct80)
 {
     return((byte)(Struct8.smethod_0(Struct8.smethod_5(struct80, 16)) + 128));
 }
Esempio n. 11
0
 public static Struct8 smethod_5(short short0)
 {
     return(Struct8.smethod_1(short0 << 8));
 }
Esempio n. 12
0
        public static Struct8 smethod_22(double double0)
        {
            var num = Math.Round(double0 * 8388607.0);

            return(Struct8.smethod_1((num > 8388607.0) ? 8388607 : ((num < -8388608.0) ? -8388608 : ((int)num))));
        }
Esempio n. 13
0
 public static Struct8 smethod_1(byte byte0)
 {
     return(Struct8.smethod_1(byte0 - 128 << 16));
 }