I'm trying to record wav files. My app needs to allow the user to choose between different sample rates and bit depths. No matter what syntax I try though, I always get files with the same bit rate. Can someone please tell me what I'm doing wrong?
[DllImport("winmm.dll")]
private static extern long mciSendString(string command, StringBuilder retstring, int returnLength, IntPtr callback);
...
private void btnRecord_Click(object sender, EventArgs e)
{
mciSendString("Open new Type waveaudio alias recSound", null, 0, IntPtr.Zero);
mciSendString("setaudio recSound algorithm pcm", null, 0, IntPtr.Zero);
mciSendString("setaudio recSound samplespersec to 44100", null, 0, IntPtr.Zero);
DisableRecordingButtons();
mciSendString("Record recSound", null, 0, IntPtr.Zero);
}