예제 #1
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);
        }
예제 #2
0
파일: Stream16.cs 프로젝트: uwx/Open-GHTCP
        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);
        }