Re: mixerSetControlDetails for MIXERCONTROL_CONTROLTYPE_MUX



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
.



Relevant Pages

  • mixerSetControlDetails for MIXERCONTROL_CONTROLTYPE_MUX
    ... thanks to Chris and others for the API help in getting my program ... I use the value of i in the for loop above to know ... However, when I set the boolean an array, the wrong input ends ...
    (microsoft.public.win32.programmer.mmedia)
  • football for baseball
    ... Thing is we only collect cards of a few baseball players ... 193 Chris Simms ... 199 Rudi Johnson ... Marvin Harrison ...
    (rec.collecting.sport.baseball)
  • Topps Total including inserts
    ... Thing is we only collect cards of a few baseball players ... 193 Chris Simms ... 225 Mike Peterson ... Marvin Harrison ...
    (rec.collecting.sport.football)
  • RE: No desktop icons or Start Menu in Windows XP - Media Center
    ... I have used two different tuner cards. ... I have used system restore to restore my desktop, ... "Chris" wrote: ... Now, the desktop has no icons, and the start ...
    (microsoft.public.windows.mediacenter)
  • Re: Can I get a ruling please.
    ... On Dec 15 2005 1:03 PM, Chris in Texas wrote: ... >> It's a tell that I never look back at my cards? ... > look back to verify what you have. ... But if you have Ac9s and spades start ...
    (rec.gambling.poker)

Quantcast