Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to detect soundcard is full or half duplex?

Posted on 2000-03-29
3
Medium Priority
?
192 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 800 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

916 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