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
Solved

Question for Chensu

Posted on 1998-06-02
5
212 Views
Last Modified: 2013-12-03
Hi Chensu!
I'd like to ask in continue of my previous question.
In mixer WaveInput/MixerList there are a few items.
The function mixerGetControlDetails() returns or its values
or its text descriptions.
How I can know what item is the "microphone select".
To use text descriptions is not safe because I think
text descriptions can be or non-standard or not in English.
Thanks, Vladimir_12345
 
0
Comment
Question by:vladimir_12345
  • 3
  • 2
5 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 20 total points
ID: 1406113
When you use mixerGetControlDetails to get the text labels with the MIXER_GETCONTROLDETAILSF_LISTTEXT flag, the MIXERCONTROLDETAILS_LISTTEXT structure returns not only the text but also the dwLineID (the dwParam1 member) which the control is for. Use this dwLineID to compare with the dwLineID you get from mixerGetLineInfo (MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE).
0
 
LVL 1

Author Comment

by:vladimir_12345
ID: 1406114
Hi Chensu, thanks for your idea.
But it need in more accurate definition.
mixerGetLineInfo (MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE) returns
microphone line id for DST Speakers.
But mixerGetControlDetails (MIXERCONTROLDETAILS_LISTTEXT) returns
line ids for DST WaveInput.
If call mixerGetLineInfo() for every line ids from
mixerGetControlDetails (MIXERCONTROLDETAILS_LISTTEXT)
and to compare dwComponentType with MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE
it is possible to find "microphone select".
Chensu, from where you know so many about sound cards?
My e-mail: vladimir@comfy.co.il
Thanks again, Vladimir_12345

0
 
LVL 23

Expert Comment

by:chensu
ID: 1406115
Yes, you are right. Thank you for correcting me. Let me refine it.

There are normally two (or more) MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE source audio lines. One is for MIXERLINE_COMPONENTTYPE_DST_SPEAKERS destination audio line and another is for MIXERLINE_COMPONENTTYPE_DST_WAVEIN destination audio line. mixerGetLineInfo(MIXER_GETLINEINFOF_COMPONENTTYPE, MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE) only returns the information about the first audio line of the type MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE. So, call mixerGetLineInfo(MIXER_GETLINEINFOF_LINEID, dwLineID) to get the dwComponentType and compare it with MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE. The dwLineID is obtained from the dwParam1 member returned by mixerGetControlDetails (MIXERCONTROLDETAILS_LISTTEXT).

My knowledge about sound cards is just average. I am just interested in it.
0
 
LVL 1

Author Comment

by:vladimir_12345
ID: 1406116
Hi Chensu! To finish with the mixer discussion what do you
think: first audio line MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE
is always in MIXERLINE_COMPONENTTYPE_DST_SPEAKERS (if it's present)or not? It is impossible to say that there is too many mixer info in help.



0
 
LVL 23

Expert Comment

by:chensu
ID: 1406117
I think it depends on the device driver. It is not compulsory although most of the device drivers do so.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
error email attachment VB2010 5 46
Access Query (QBE) Using VBA Function for Criteria 13 62
Query performance - SQL Server 20 84
wordpress limitations 4 123
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

790 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