Link to home
Start Free TrialLog in
Avatar of Shahzad_mca
Shahzad_mca

asked on

Recording throug Mic or Line_In

How record from Mic or Line In or CDaudio in wav format ?
Please help me out..
Avatar of nil_dib
nil_dib

you can use low level function of MCI.

low level :
waveInOpen etc.

or send mci command string such as
wsprintf(lpstrCommand, "record %s %s %s", lpszDeviceID, lpszRecordFlags,
    lpszFlags);
and then call
MCIERROR mciSendCommand(  MCIDEVICEID IDDevice,    UINT uMsg,            
  DWORD fdwCommand,        DWORD dwParam          );

record through mciWnd is a easy way.
you can create a record window as a child
HWND MCIWndCreate(  HWND hwndParent,        HINSTANCE hInstance,  
  DWORD dwStyle,          LPSTR szFile          );
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The following article talks about Waveform Audio functions.

Recording and Playing Waveform Audio
http://msdn.microsoft.com/library/techart/msdn_spellit.htm
Avatar of Shahzad_mca

ASKER

I'll try this & let you know. U can contact me at shahzad@xlnce.com
Pl. provide Ur mailId
the Link which U've provided me ,when coded in my appliaction gives lots of error. Can U please provide me with the correct code for recording from Mic/Line_In,Please...
Which link? What error messages?
Now I can Record the sound either through Mic or Line In ,but the problem is that I don't have the control over selection of Mic or Line In.I have to run JukeBox player to assign recording source as Mic or Line In. I wan't to implement it in my application. Is there any ,which can do that...
Yes, you can control it by using Audio Mixers functions. It is a little tough. Take a look at some articles about Audio Mixers at CodeGuru.

http://www.codeguru.com/multimedia/

Also, check out the Platform SDK sample MixApp.
I'm unable to connect to codeguru I think its dead.Please provide some useful code for it if U can access it.
It was down. Now it is up.