mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 00:13:16 +00:00
[AUDIO-BRINGUP]
- Respect channel count which defines if the control acts uniform or per channel - Fix bug in MMixerSetGetMuxControlDetails svn path=/branches/audio-bringup/; revision=49993
This commit is contained in:
parent
5e2f536e5c
commit
7ae8c563cc
3 changed files with 24 additions and 4 deletions
6
lib/drivers/sound/mmixer/TODO
Normal file
6
lib/drivers/sound/mmixer/TODO
Normal file
|
@ -0,0 +1,6 @@
|
|||
=== MMIXER TASKS ===
|
||||
|
||||
- Add hacks for source lines, such that Wave Mixer line always has a volume control
|
||||
- Support custom mixer controls
|
||||
- Assign mixer controls after all controls have been assigned (starting on the destination lines)
|
||||
- TESTING & BUGFIXING
|
|
@ -35,7 +35,8 @@ MMixerAddMixerControl(
|
|||
IN HANDLE hMixer,
|
||||
IN PTOPOLOGY Topology,
|
||||
IN ULONG NodeIndex,
|
||||
IN LPMIXERLINE_EXT MixerLine)
|
||||
IN LPMIXERLINE_EXT MixerLine,
|
||||
IN ULONG MaxChannels)
|
||||
{
|
||||
LPGUID NodeType;
|
||||
KSP_NODE Node;
|
||||
|
@ -66,7 +67,7 @@ MMixerAddMixerControl(
|
|||
/* store control type */
|
||||
MixerControl->Control.dwControlType = MMixerGetControlTypeFromTopologyNode(NodeType);
|
||||
|
||||
MixerControl->Control.fdwControl = MIXERCONTROL_CONTROLF_UNIFORM; /* FIXME */
|
||||
MixerControl->Control.fdwControl = (MaxChannels > 1 ? 0 : MIXERCONTROL_CONTROLF_UNIFORM);
|
||||
MixerControl->Control.cMultipleItems = 0;
|
||||
|
||||
/* setup request to retrieve name */
|
||||
|
@ -136,7 +137,7 @@ MMixerAddMixerControl(
|
|||
MixerControl->Control.Bounds.dwMaximum = NodesCount - 1;
|
||||
MixerControl->Control.Metrics.dwReserved[0] = NodesCount;
|
||||
MixerControl->Control.cMultipleItems = NodesCount;
|
||||
MixerControl->Control.fdwControl |= MIXERCONTROL_CONTROLF_MULTIPLE;
|
||||
MixerControl->Control.fdwControl |= MIXERCONTROL_CONTROLF_UNIFORM | MIXERCONTROL_CONTROLF_MULTIPLE;
|
||||
}
|
||||
else if (MixerControl->Control.dwControlType == MIXERCONTROL_CONTROLTYPE_MUTE)
|
||||
{
|
||||
|
@ -695,9 +696,14 @@ MMixerAddMixerControlsToMixerLineByNodeIndexArray(
|
|||
/* calculate maximum channels */
|
||||
DstLine->Line.cChannels = min(DstLine->Line.cChannels, MaxChannels);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* use default of one channel */
|
||||
MaxChannels = 1;
|
||||
}
|
||||
|
||||
/* now add the mixer control */
|
||||
Status = MMixerAddMixerControl(MixerContext, MixerInfo, hMixer, Topology, Nodes[Index], DstLine);
|
||||
Status = MMixerAddMixerControl(MixerContext, MixerInfo, hMixer, Topology, Nodes[Index], DstLine, MaxChannels);
|
||||
|
||||
if (Status == MM_STATUS_SUCCESS)
|
||||
{
|
||||
|
|
|
@ -536,6 +536,14 @@ MMixerSetGetMuxControlDetails(
|
|||
return Status;
|
||||
}
|
||||
|
||||
/* gets the corresponding mixer data */
|
||||
MixerData = MMixerGetMixerDataByDeviceHandle(MixerContext, MixerControl->hDevice);
|
||||
|
||||
/* sanity check */
|
||||
ASSERT(MixerData);
|
||||
ASSERT(MixerData->Topology);
|
||||
ASSERT(MixerData->MixerInfo == MixerInfo);
|
||||
|
||||
/* get logical pin nodes */
|
||||
MMixerGetConnectedFromLogicalTopologyPins(MixerData->Topology, MixerControl->NodeID, &LogicalNodesCount, LogicalNodes);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue