Recording throug Mic or Line_In

How record from Mic or Line In or CDaudio in wav format ?
Please help me out..
Shahzad_mcaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nil_dibCommented:
0
wyy_cqCommented:
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          );
0
chensuCommented:
1. MCIWnd Window Class

Recording with MCIWnd Controls
http://msdn.microsoft.com/library/psdk/multimed/mciwnd_0e43.htm

2. MCI

Recording with a Waveform-Audio Device
http://msdn.microsoft.com/library/psdk/multimed/mci_4wpx.htm

3. Waveform Audio

Example of Writing Waveform Data
http://msdn.microsoft.com/library/psdk/multimed/wave_8rj5.htm

4. DirectSound

Tutorial 2: Capturing a Sound
http://msdn.microsoft.com/library/psdk/directx/dstut_9ox0.htm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

chensuCommented:
The following article talks about Waveform Audio functions.

Recording and Playing Waveform Audio
http://msdn.microsoft.com/library/techart/msdn_spellit.htm
0
Shahzad_mcaAuthor Commented:
I'll try this & let you know. U can contact me at shahzad@xlnce.com
Pl. provide Ur mailId
0
Shahzad_mcaAuthor Commented:
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...
0
chensuCommented:
Which link? What error messages?
0
Shahzad_mcaAuthor Commented:
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...
0
chensuCommented:
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.
0
Shahzad_mcaAuthor Commented:
I'm unable to connect to codeguru I think its dead.Please provide some useful code for it if U can access it.
0
chensuCommented:
It was down. Now it is up.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.