Пример #1
0
        public WaveFile(WAVEFORMATEX format)
        {
            WaveHeader        = new WAVEHEADER();
            WaveHeader.dwRiff = BitConverter.ToUInt32(RIFF, 0);
            WaveHeader.dwWave = BitConverter.ToUInt32(WAVE, 0);
            WaveHeader.dwFmt  = BitConverter.ToUInt32(fmt, 0);

            WaveFormatEx = format;
        }
Пример #2
0
        public WaveFile(WAVEFORMATEX format)
        {
            WaveHeader = new WAVEHEADER();
            WaveHeader.dwRiff = BitConverter.ToUInt32(RIFF, 0);
            WaveHeader.dwWave = BitConverter.ToUInt32(WAVE, 0);
            WaveHeader.dwFmt = BitConverter.ToUInt32(fmt, 0);

            WaveFormatEx = format;
        }
Пример #3
0
        public WaveFile()
        {
            WaveHeder        = new WAVEHEADER();
            WaveHeder.dwRiff = BitConverter.ToUInt32(RIFF, 0);
            WaveHeder.dwWave = BitConverter.ToUInt32(WAVE, 0);
            WaveHeder.dwFmt  = BitConverter.ToUInt32(fmt, 0);

            WaveFormatEx                 = new WAVEFORMATEX();
            WaveFormatEx.wFormatTag      = 3;
            WaveFormatEx.nChannels       = 1;
            WaveFormatEx.nSamplesPerSec  = 16000;
            WaveFormatEx.wBitsPerSample  = 32;
            WaveFormatEx.nBlockAlign     = (ushort)(WaveFormatEx.nChannels * WaveFormatEx.wBitsPerSample / 8);
            WaveFormatEx.nAvgBytesPerSec = WaveFormatEx.nSamplesPerSec * WaveFormatEx.nBlockAlign;
            WaveFormatEx.cbSize          = 0;
        }
Пример #4
0
        public WaveFile()
        {
            WaveHeder = new WAVEHEADER();
            WaveHeder.dwRiff = BitConverter.ToUInt32( RIFF, 0 );
            WaveHeder.dwWave = BitConverter.ToUInt32( WAVE, 0 );
            WaveHeder.dwFmt = BitConverter.ToUInt32( fmt, 0 );

            WaveFormatEx = new WAVEFORMATEX();
            WaveFormatEx.wFormatTag = 3;
            WaveFormatEx.nChannels = 1;
            WaveFormatEx.nSamplesPerSec = 16000;
            WaveFormatEx.wBitsPerSample = 32;
            WaveFormatEx.nBlockAlign = (ushort)(WaveFormatEx.nChannels * WaveFormatEx.wBitsPerSample / 8);
            WaveFormatEx.nAvgBytesPerSec = WaveFormatEx.nSamplesPerSec * WaveFormatEx.nBlockAlign;
            WaveFormatEx.cbSize = 0;
        }