我正在尝试录制 wav 文件。我的应用程序需要允许用户在不同的采样率和位深度之间进行选择。不管我尝试什么语法,我总是得到相同比特率的文件。有人可以告诉我我做错了什么吗?
[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);
}