Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sound...microphone...MCI

Posted on 1997-11-10
2
Medium Priority
?
615 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 800 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

618 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