?
Solved

Sound...microphone...MCI

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

764 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