Exemplo n.º 1
0
            public byte[] SerializeHeader()
            {
                List <byte> data = new List <byte>();

                data.AddRange(RiffHeader);
                data.AddRange(ChunkSize.GetBytesLE());
                data.AddRange(WaveHeader);

                data.AddRange(FmtHeader);
                data.AddRange(Subchunk1Size.GetBytesLE());
                data.AddRange(AudioFormat.GetBytesLE());
                data.AddRange(NumChannels.GetBytesLE());
                data.AddRange(SampleRate.GetBytesLE());
                data.AddRange(ByteRate.GetBytesLE());
                data.AddRange(BlockAlign.GetBytesLE());
                data.AddRange(BitsPerSample.GetBytesLE());

                data.AddRange(DataHeader);
                data.AddRange(Subchunk2Size.GetBytesLE());

                return(data.ToArray());
            }