Problem with MCI command for voice recording

61 views
Skip to first unread message

Jacky Tom

unread,
May 15, 1998, 3:00:00 AM5/15/98
to

Hello,
I am writing a program with MCI API commands. As I set the recording quality
to 44kHz, 16 bit stereo, it doesn't work and gives an error message "
invalid value ". Moreover, as I want to get the realtime recording level, it
shows "Device is busy."

my program structure is listed below :-

open c:\demo alias sound
set sound bitspersample 16
set sound bytespersec 44.1
set sound channels 2
record sound < ------------- Error will be displayed and the recording
sound in 8bit 11kHz mono format.
:
:
status sound level <--------- Error will be displayed.


Can anybody help me ???

Thanks !!!

my email : jack...@netvigator.com

Jacky Tom

unread,
May 15, 1998, 3:00:00 AM5/15/98
to

Jacky Tom wrote in message ...

Brad Johnson

unread,
May 15, 1998, 3:00:00 AM5/15/98
to Jacky Tom


Try something like:

open new type waveAudio alias aWave wait
set aWave time format milliseconds
set aWave format tag pcm
set aWave input mapper
set aWave output mapper
set aWave bitspersample 16 bytespersec 176400 samplespersec 44100
channels 2 alignment 2
record aWave

-- wait until you've recorded the sound

save aWave filename.wav wait
close aWave

Note that you open a 'new type waveaudio' file rather than an existing
file, and later save the file to disk. The recorded sound is buffered
in your temp folder - so have plenty of room.

You have to set all the rate parameters in the same mci string command,
otherwise the driver thinks they don't match and resets to 8bit 11 khz
mono.

Good luck,

Brad Johnson
Liafail, Inc.

Reply all
Reply to author
Forward
0 new messages