sawass sawass

sawass sawass

  • NA
  • 36
  • 23.7k

Explain Class

Jun 9 2011 7:19 AM
Hi,
Is someone can help me what is the role of this class:
 public class WaveFormatStream
    {
        public short wFormatTag;
        public short nChannels;
        public int nSamplesPerSec;
        public int nAvgBytesPerSec;
        public short nBlockAlign;
        public short wBitsPerSample;
        public short cbSize;


        public WaveFormatStream(int rate, int bits, int channels)
        {
            wFormatTag = (short)WaveFormatts.Pcm;
            nChannels = (short)channels;
            nSamplesPerSec = rate;
            wBitsPerSample = (short)bits;
            cbSize = 0;


            nBlockAlign = (short)(channels * (bits / 8));
            nAvgBytesPerSec = nSamplesPerSec * nBlockAlign;
        }
    }
Thanks for your help



Answers (3)