Solved

How to detect soundcard is full or half duplex?

Posted on 2000-03-29
3
184 Views
Last Modified: 2013-12-03
What are some of the techniques to detect whether the sound card is full or half duplex? Is there any WinAPI that can do it? I want either a source code example or a program which can help me to detect it.
0
Comment
Question by:yeohungs
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
NickRepin earned 200 total points
ID: 2667824
There is no API. The only way is to try to open it in a full duplex.

Something like this:

if(waveInOpen(your_format)==OK)
   waveInClose()
else
   ERROR

if(waveOutOpen(your_format)==OK) {
   if(waveInOpen(your_format)==OK) {
      waveInClose()
      waveOutClose()
      FULL DUPLEX
   }
   else {
      waveOutClose
      HALF DUPLEX
   }
}
else
   ERROR
0
 

Author Comment

by:yeohungs
ID: 2667977
But there could be a possibility that the wave device is already in use by some other programs, right?
0
 
LVL 15

Expert Comment

by:NickRepin
ID: 2668480
In this case, there is no way to detect (ERROR in my code above).

You have to determine the sound card type while setup and ask the user to close all programs before.

Moreover, it's better to provide a special checkbox in your program's settings so that the user can choose between half/full duplex in the case if your program incorrectly detected that.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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