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 BantheswaranPosted Jun 9, 2011, 9:19 AM
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.
sawass sawassPosted Jun 9, 2011, 8:07 AM
I dont know exactly what this function do:
Jaganathan BantheswaranPosted Jun 9, 2011, 7:39 AM
They are calculating the Bytes of wave stream for one second.