In my efforts to learn the structure of the winmm API, I have written a mixer, just like the one already implemented in Windows. But I have a problem controling the destiation line: "Play Control".
I obtain its lineID using:
INVOKE mixerGetLineInfo, 0, addr MIXERLINE, MIXER_GETLINEINFOF_DESTINATION

Where MIXERLINE.dwDestination = 0. (ie. "play control")

Then I access its volume control, it only affects the first source line of "play control" -> "Wave out".

Does anyone know how to access the controls of a destination line?

Thanks

Clerihew
Posted on 2001-11-12 06:15:32 by clerihew
after you get destinationinfo with

invoke mixerGetLineInfo,mixerid,ADDR dmixline,MIXER_GETLINEINFOF_DESTINATION

you should get sourceline info with

mov eax,dmixline.cConnections ; -1 i dont know why but -1 gives what you need (mixer.playcontrol.playcontrol)
mov smixline.cbStruct,sizeof(MIXERLINE)
mov smixline.dwSource,eax
mov eax,mixcaps.cDestinations
mov dwDestination,eax ; 0
smixline,MIXER_GETLINEINFOF_SOURCE

and you can use controls of source line to control volume..

so you have for example..

sblivewavedevice.playcontrol.playcontrol.volume
mixer dest source control
Posted on 2001-11-12 15:43:33 by kamilh
Dahm! I thought it worked on a zero-based index. So that is where that little barstard was hiding. :o)

Thank you very much for the advise. You saved me a lot of time, sweat and tears.

By the way....cool board.

Clerihew:)
Posted on 2001-11-12 17:41:35 by clerihew