Solved

Sound...microphone...MCI

Posted on 1997-11-10
2
613 Views
Last Modified: 2008-03-03
My problem is, I am trying to send sound from a microphone down a phone line.
This I can do, however I have to use MCI_RECORD then MCI_PLAY. This creates a significant time delay.
Therefore could anyone tell me how to eliminate this delay?
Ideally I would like to redirect the speaker output without using MCI_RECORD
Any solutions gratefully accepted
Thanks in advance
Darrel Robertson.
0
Comment
Question by:dkr1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
Slarti earned 200 total points
ID: 1172889
Sorry to disappoint you, but you cannot use MCI for what you want. MCI is a simple interface designed for quick, easy programming jobs in simple programs like jukeboxes. What you need to do is use a different set of API calls, the low-level multimedia API. This set of functions allows you to (almost) directly control the sound card. What you do is send Windows the address of a small buffer (say, 4K). This buffer is filled up almost immediately (appx. 50 msec in CD-quality recordings), and returned to you. You then send the next buffer to be recorded, and you can process the first buffer while the second is being recorded, and so on. In other words, you can process information which has just been recorded. You can choose between either callback functions or Windows messaging for the method of communicating with Windows.

As you can see this is a bit more complicated than MCI, where just one command will record a sound for you... However, that is (always?) the price you have to pay for more powerful programs. There is extensive documentation of these functions, and how to use them, in Microsoft's programming references. If (as I assume) you are using one of the flavors of Win32, you should look it up in "The Win32 Programming Reference", Volume 2, published by Microsoft Press. There is an entire chapter called "Low Level Multimedia Functions", which will explain exactly what you need to do.

Good luck!
-- Slarti
0
 

Author Comment

by:dkr1
ID: 1172890
Thanks ever so much. I haven't got it going yet, but it seems very promising, and should certainly do the trick. Thanks again,
Darrel.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question