WIN API Multimedia functions

I have written a program using Windows Multimedia API to record voice from the microphone and store this recorded data in a fixed amount buffer. When the buffer is filled, retrieve the data from the buffer and output to the PC speakers. The microphone and the speakers are connected to the soundcard of the PC.

How to I write the program to input and output the voice signal using Windows Multimedia API in realtime?

I am using a full duplex sound card.
VolverineAsked:
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.

chensuCommented:
Your sound card needs to be a duplex sound card in order to play and record at the same time.
0
VolverineAuthor Commented:
Edited text of question.
0
sun307Commented:
Hi !
I too have developed the same application in VC++ SDK and it is working fine over the internet.

To send the voice in realtime you have to create an array of size around 4 of the structure in which you are recording the voice so that you can record voice in small chunks of the order of 0.5 seconds. Then send this array of data to the soundcard. when one object is got filled with sound data the window will receive a message WOM_DONE. Process that in the time the another structure is filled. In the processing i mean to say that send this small amount of data over the net to another computer, unprepare the first buffer, send it back to the soundcard and wait for the another one. This cycle will go on in a loop. Same have to be done for the voice that yopu are receiving.

Remember to use threads for this application. One for receiving and playing the voice you are receiving and another for recording and sending the voice.

I hope that you are waveInxxx and waveOutxxx functions for recording and playing the voice.

To get more clarification write back

Best of luck
Sun307
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
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

VolverineAuthor Commented:
Thank you sun307 for the information. Yes, I am using wave functions. I have already done the things sun307 has mentioned except the threading part. I know I have to use multi-threading, but am not sure of how to do it.

I hope sun307 can send me the project of the similar application to me.
0
VolverineAuthor Commented:
Hi sun307,

I believe my solution to accomplish realtime is to use multi-threading. I hope you can help me on how to go about with it. And also, anyone else can also help me at the following email address : <jikwong@rocketmail.com>

sun307 , can you email to me the project in which you said it is similar to what I want to accomplish.

Thank you and hope to hear from you soon.  
0
chensuCommented:
There used to be a sample program at Creative developer Web site. Unfortunately, it has been removed (or moved).
0
sun307Commented:
Hi volverine !
the project that i had made can be found at the following URL :
http://www.datatecindia.com/nettalk.htm

you can download this application, run it and see if it is of the kind you are trying for.

Send me more details like :
CODECS you wish to implement.
Whether u r using MFC or SDK
What you have done till now etc.

Without threads the application will run on LAN very well. So Is your application is currently running on LAN without thread and codecs

My email id is vimalmalik@hotmail.com
0
daittCommented:
I can't open the URL.
I need it too. May I have it?
0
sun307Commented:
Hi daitt!
Do u want the application or source code ???
If you wish to se the application, then i can send it to you.
My email id is : vimalmalik@yahoo.com
-Regards
Sun307
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
C++

From novice to tech pro — start learning today.