Gordonp
asked on
Playing Microphone Input.
I'm looking for code to read in the audio input from the Microphone and play it out again throught the soundcard.
I believe it can be done using the waveIn* and waveOut* api calls but I cant suss out the buffer stuff.
Thanks in advance
Gordon
I believe it can be done using the waveIn* and waveOut* api calls but I cant suss out the buffer stuff.
Thanks in advance
Gordon
And here are some info you need:
some samples:
Audio Mixer Functions Demo
http://www.codeguru.com/multimedia/ADMixer.shtml
http://msdn.microsoft.com/workshop/c-frame.htm?944437056110#/workshop/imedia/windowsmedia/sdk/wmsdk_fmt.asp
And if you want to use waveinxxx waveoutxx .I can write another sample but it will take some time.First check above info.
Regards
W.Yinan
some samples:
Audio Mixer Functions Demo
http://www.codeguru.com/multimedia/ADMixer.shtml
http://msdn.microsoft.com/workshop/c-frame.htm?944437056110#/workshop/imedia/windowsmedia/sdk/wmsdk_fmt.asp
And if you want to use waveinxxx waveoutxx .I can write another sample but it will take some time.First check above info.
Regards
W.Yinan
ASKER
Wyn>
All bar one of your links are for recording an audio input, and the other link is broken.
I want to play the audio input straight out again on the speakers, not record it into a file.
GordonP
All bar one of your links are for recording an audio input, and the other link is broken.
I want to play the audio input straight out again on the speakers, not record it into a file.
GordonP
I know what you want and Okay now I will write one for you .But I dont think it's big different to above!
Waiting....
Waiting....
One Directions:
Use threads for this application. One for receiving and playing the voice you are receiving and another for recording and sending the voice.
One question:
Is your card duplex?
Use threads for this application. One for receiving and playing the voice you are receiving and another for recording and sending the voice.
One question:
Is your card duplex?
ASKER
> One question:
> Is your card duplex?
Yes!
> Is your card duplex?
Yes!
You will find code how to record in above links.Here is how to play them concurrently
The MM_WIM_DATA message will be sent when the input structure are filled.
Then you create a create in handler code:
case MM_WIM_DATA:
_beginthread(doit,0,buffer );
The doit will the function you want to do with the buffer.
The MM_WIM_DATA message will be sent when the input structure are filled.
Then you create a create in handler code:
case MM_WIM_DATA:
_beginthread(doit,0,buffer
The doit will the function you want to do with the buffer.
ASKER
can I just use one buffer! do I need to use synchro for buffer access??
GordonP
GordonP
ASKER
the link "Recording and Playing Waveform Audio" doesnt work.
I assume this would have shown me how to read the data into the buffer, do you have a working link for this!!
GordonP
I assume this would have shown me how to read the data into the buffer, do you have a working link for this!!
GordonP
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
->can I just use one buffer! do I need to use synchro for buffer access??
================
All above:)
ASKER
Thanks I'll try it and get back to you
Gordon
Gordon
ASKER
Thanks for your help
Gordon
Gordon
I have a problem in that I have two sound cards in the one machine and I am having troubles selecting the individual device under waveinopen. It keeps returning error 32 any help
Qed:
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
Recording and Playing Waveform Audio
http://msdn.microsoft.com/library/techart/msdn_spellit.htm
4. DirectSound
Tutorial 2: Capturing a Sound
http://msdn.microsoft.com/library/psdk/directx/dstut_9ox0.htm
Regards