0

I'm recording sound from my Microphone, using the mciSendString() API function. My code is very similar to the code which is written in this link: http://blog.hansentech.com/mhblog_2011_02_26.html

Unfortunately, when I'm listening to the output record (I'm saving the output in .wav file) I can hear noises which interfering to listen to the record itself.

I searched about this problem on the internet and I found this question, which has been asked in this website in the past. (link: Noise reduction and compression in streaming audio) From this link, I'm understood that the problem is the bit depth (8 bits). I also understood that if I will change the bit depth to 16 bits, the problem should be solved.

Does anybody know how can I change the bit depth of my records through API Functions? Which function can do this work?

Community
  • 1
  • 1
Aviv
  • 456
  • 1
  • 7
  • 16

2 Answers2

3

Seems like you want to send a setaudio command with the proper parameters.

You'll probably want to experiment with the algorithm, bitspersample, bytespersec, and quality values.

See also MCI_SETAUDIO.

Jim Mischel
  • 131,090
  • 20
  • 188
  • 351
2

Though it's been a while I believe you can specify the sampling rate with the SetAudio command.