Thread View: borland.public.cppbuilder.multimedia
2 messages
2 total messages
Started by Davide Puccioni
Thu, 20 Jun 2002 07:27
Master Volume Control
Author: Davide Puccioni
Date: Thu, 20 Jun 2002 07:27
Date: Thu, 20 Jun 2002 07:27
9 lines
1169 bytes
1169 bytes
Hi, everybody! I've taken full control of wave volume, but how can I take control over Master Volume Control? TIA. Regards. Davide Puccioni
Re: Master Volume Control
Author: Michael Warner
Date: Thu, 20 Jun 2002 08:24
Date: Thu, 20 Jun 2002 08:24
32 lines
2086 bytes
2086 bytes
On Thu, 20 Jun 2002 09:27:06 +0200, Davide Puccioni
<davide.puccioni@audiodevices.com> wrote:
>Hi, everybody!
>I've taken full control of wave volume, but how can I take control over
>Master Volume Control?
You need the dreaded audio mixer - see the multimedia help. There's
no substitute for understanding how it works, but here's some code
which locates the master volume control:
// master volume details
ml.cbStruct = sizeof(ml);
ml.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
if
(mixerGetLineInfo(MixerHandle,&ml,MIXER_GETLINEINFOF_COMPONENTTYPE)) {
mixerClose(MixerHandle); return false; // no wave out line
}
// mlc.cbStruct = sizeof(mlc);
mlc.dwLineID = ml.dwLineID;
// mlc.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
// mlc.cControls = 1;
// mlc.cbmxctrl = sizeof(mc);
// mlc.pamxctrl = &mc;
if
(mixerGetLineControls(MixerHandle,&mlc,MIXER_GETLINECONTROLSF_ONEBYTYPE))
{
mixerClose(MixerHandle); return false; // no wave out line
}
MasterID = mc.dwControlID;
mmax = mc.Bounds.dwReserved[1]; // compiler doesn't like
dxMaximum!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads