MCI - record sound
MCI - record sound
Are there MCI commands to record from "Wave" or "Stereo Mix" from the sound card?
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
I put this together back in February 2002 (found on PureProject.net website)...
Code: Select all
Global buffer$
buffer$=Space(256)
Procedure MCI(command.s)
result=mciSendString_(command,@buffer$,256,0)
ProcedureReturn result
EndProcedure
;---------------------------------------------------------------------
clip.s="C:\Test.wav" ;file to save to disk
Alignment=4
bits=16 ;16bit wave file
channels=2 ;1=mono 2=stero
samples=44100 ;44.1kHz sample rate
reclength=5 ;length of audio to record (this example records 5 seconds)
InitGadget(2)
If OpenWindow(0,10,10,200,100,#PB_Window_SystemMenu,"Record Audio")=0:End:EndIf
If CreateGadgetList(WindowID())=0:End:EndIf
TextGadget(0,10,10,100,20,"")
MCI("open new type waveaudio alias recsound")
MCI("set recsound time format ms")
MCI("set recsound alignment "+Str(Alignment)+" bitspersample "+Str(bits)+" samplespersec "+Str(samples)+" channels "+Str(channels)+" bytespersec "+Str(samples*Alignment) )
MCI("record recsound")
While elapsed < reclength*1000
MCI("status recsound position")
elapsed=Val(buffer$)
SetGadgetText(0,"Recorded: "+Str(elapsed/1000)+" secs.")
Delay(20)
Wend
MCI("save recsound "+clip)
MCI("close recsound")
End
1.Double click on the Speaker on TaskBar, this will brings Volume Control window.
2.Choose menu Options>Properties
3.Select the Record radio button. Check the Stero Mix and uncheck Microphone item.
4.Now when you use MCI command to record sounds, you are recording from the soundboard.
Hope this give you some help.
2.Choose menu Options>Properties
3.Select the Record radio button. Check the Stero Mix and uncheck Microphone item.
4.Now when you use MCI command to record sounds, you are recording from the soundboard.
Hope this give you some help.

Hello, Everyone.
Thanks for your help.
Thanks for your help.
Thanks Paul!Paul wrote:I put this together back in February 2002 (found on PureProject.net website)...
Doesn't seem to work. I can barely hear the recorded wav. Tried to turn up the input and output levels but still barely able to hear it.goomoo wrote:1.Double click on the Speaker on TaskBar, this will brings Volume Control window.
2.Choose menu Options>Properties
3.Select the Record radio button. Check the Stero Mix and uncheck Microphone item.
4.Now when you use MCI command to record sounds, you are recording from the soundboard.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
i wrote (used code from the archive) a small program to do the same thing...using mci commands, it'll record anything my soundcard plays. it worked fine on my main computer but when i tried it out on a laptop it wouldn't work. same symptoms - very faint audio. i kept fiddling with the sound settings in the control panel and got it to work. don't give up, keep on clicking...
long time lurker,
mike
long time lurker,
mike
I got it, just had to mess around with my control panel some more, thanks!
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
One more question...
Why can't the wav be saved anywhere else beside C:\, such as?
Doesn't seem to work for me.
Why can't the wav be saved anywhere else beside C:\, such as?
Code: Select all
clip.s="C:\Documents And Settings\Owner\Desktop\Test.wav"
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
If you are using long path names with spaces, try:
Code: Select all
clip.s=Chr(34)+"C:\Documents and Settings\Owner\Desktop\Test.wav"+Chr(34)
Thanks alot Paul!Paul wrote:If you are using long path names with spaces, try:Code: Select all
clip.s=Chr(34)+"C:\Documents and Settings\Owner\Desktop\Test.wav"+Chr(34)

www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.