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
Loading

Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jun 9, 2011, 5:19 AM EDT
They are defining a class called WaveNative which imports the methods from winmm.dll.
If you are interested to learn C# very well then read some c# books and practice by doing project in C#.
if this reply helps you then mark it as Correct answer.
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jun 9, 2011, 3:39 AM EDT
They are calculating the Bytes of wave stream for one second.
sawass sawass36 reputationPosted Jun 9, 2011, 4:07 AM EDT
I dont know exactly what this function do: