Re: mixerSetControlDetails for MIXERCONTROL_CONTROLTYPE_MUX
- From: NoSpam@xxxxxxxxxxx (Bob Masta)
- Date: Mon, 16 Jan 2006 13:27:36 GMT
On Mon, 16 Jan 2006 04:51:59 GMT, charlesh3@xxxxxxx wrote:
>First, thanks to Chris and others for the API help in getting my program
>going to select inputs for the DST_WAVEIN line.
>
>It works fine, but there's one little thing that I don't understand. After a
>call to mixerGetLineInfo(hMixer, mxl, MIXER_GETLINEINFOF_COMPONENTTYPE)
>with component type = DST_WAVEIN and a call to mixerGetLineControls(hMixer,
>mxlc, MIXER_GETLINECONTROLSF_ONEBYTYPE) with mxlc.dwControl =
>MIXERCONTROL_CONTROLTYPE_MUX
>
>I then do:
> for i = 0 to mixerline.cConnections
> mxl.dwSource = i
> rc = mixerGetLineInfo(hMixer, mxl,
> MIXER_GETLINEINFOF_SOURCE)
> next
>
>to get the mixerline.szname of the source lines for DST_WAVEIN. When I get
>the names I trim to the first null char and look for the string "Line" to
>get the index of the line that is the LIne input. I then do and
>mixerSetControlDetails(hMixer, mxcd, MIXER_SETCONTROLDETAILSF_VALUE)
>
>
>Now for the problem: I use the value of i in the for loop above to know
>which MIXER_CONTROL_DETAILS_BOOLEAN array to set to make the mux select my
>line input. However, when I set the boolean an array, the wrong input ends
>up being selected according to this pattern:
>
> i input selected
> 0 5
> 1 4
> 2 3
> 3 2
> 4 1
> 5 0
>
>I've fixed this mathematically, but I want to know if I'm doing the wrong
>thingto begin with and it won't work on the next machine. Then I can claim
>victory over the nasty mixer API monster.
>
>
I fell into this exact same trap! It turns out that some cards
put the MUX select lines in reverse order. Chris kindly pointed
the way out of the forest: You have to look at the line names
for the selects and match with the previous line names to
find the corresponding index.
Another detail: Not all cards call it the Line input. The
Ensoniq/Creative Audio PCI card calls it "Aux", so you
may need to allow the user to make the call as to which
line to use. (Or maybe if you don't find a match to "Line",
then scan for "Aux"?)
Best regards,
Bob Masta
dqatechATdaqartaDOTcom
D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Home of DaqGen, the FREEWARE signal generator
.
- References:
- mixerSetControlDetails for MIXERCONTROL_CONTROLTYPE_MUX
- From: charlesh3
- mixerSetControlDetails for MIXERCONTROL_CONTROLTYPE_MUX
- Prev by Date: mixerSetControlDetails for MIXERCONTROL_CONTROLTYPE_MUX
- Next by Date: Re: Floating point overflow in SetFx
- Previous by thread: mixerSetControlDetails for MIXERCONTROL_CONTROLTYPE_MUX
- Index(es):
Relevant Pages
|