Author Topic: Recording Audio?  (Read 3016 times)

billfrog

  • Newbie
  • *
  • Posts: 5
Recording Audio?
« on: June 25, 2013, 05:21:11 am »
OK, I've been through the technical database, and worked through the Parrot script as listed below:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Sample~code+Parrot~Script~to~Playback~Recorded~Wave~File.txt

But I am uncertain as to how to adjust various parameters of the PlayMedia command. In particular, I want to increase the quality of the audio. I've looked through documentation on the MCISendString command, but am still uncertain as to how to change the quality in the Parrot.wbt script. By default it seems to record at 8 bits, mono, 11kHz. What would I have to alter in order to record at, say 16 bits stereo 44100kHz (CD Quality)?




IJRobson

  • Jr. Member
  • **
  • Posts: 94
Re: Recording Audio?
« Reply #1 on: June 25, 2013, 06:17:40 am »
You could try the setaudio command string that appears to change quality settings:

http://msdn.microsoft.com/en-gb/library/windows/desktop/dd743572%28v=vs.85%29.aspx

I have not used the PlayMedia interface so I am not sure how you use the command?

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Recording Audio?
« Reply #2 on: June 25, 2013, 08:34:54 am »
The set command establishes control settings for the device. Reference: http://msdn.microsoft.com/en-us/library/windows/desktop/dd798661(v=vs.85).aspx

Maybe give this a try:
Code: Winbatch
; samplespersec options:    
; 11025 low quality 4 to 1 compression ratio    
; 22050  medium quality compression 8 to 1 (12%)    
; 44100   (CD music quality)compression 16 to 1 (6%)file size bigger    
; bitspersample: 16 or 8    
; Channels: (mono) or 2 (stereo)    
PlayMedia( "seek capture to start" )           ; Always start at the beginning    
PlayMedia( "set capture samplespersec 44100" ) ; CD Quality    
PlayMedia( "set capture bitspersample 16" )    ; 16 bits for better sound    
PlayMedia( "set capture channels 2" )          ; 2 channels for stereo    
PlayMedia( "record capture" )  
 
Deana F.
Technical Support
Wilson WindowWare Inc.