Author: janderwald
Date: Sat Feb 12 19:08:22 2011
New Revision: 50674
URL:
http://svn.reactos.org/svn/reactos?rev=50674&view=rev
Log:
[MMIXER]
- Allocate memory for the logical pin array
- Use the correct counter variable for logical pin array
- Found by msvc
Modified:
branches/cmake-bringup/lib/drivers/sound/mmixer/sup.c
Modified: branches/cmake-bringup/lib/drivers/sound/mmixer/sup.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/drivers/sound…
==============================================================================
--- branches/cmake-bringup/lib/drivers/sound/mmixer/sup.c [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/drivers/sound/mmixer/sup.c [iso-8859-1] Sat Feb 12 19:08:22
2011
@@ -544,6 +544,14 @@
ASSERT(MixerData->Topology);
ASSERT(MixerData->MixerInfo == MixerInfo);
+ /* now allocate logical pin array */
+ Status = MMixerAllocateTopologyNodeArray(MixerContext,
MixerData->Topology, &LogicalNodes);
+ if (Status != MM_STATUS_SUCCESS)
+ {
+ /* no memory */
+ return MM_STATUS_NO_MEMORY;
+ }
+
/* get logical pin nodes */
MMixerGetConnectedFromLogicalTopologyPins(MixerData->Topology,
MixerControl->NodeID, &LogicalNodesCount, LogicalNodes);
@@ -552,7 +560,7 @@
ASSERT(LogicalNodesCount == MixerControl->Control.Metrics.dwReserved[0]);
Values = (LPMIXERCONTROLDETAILS_BOOLEAN)MixerControlDetails->paDetails;
- for(Index = 0; Index < ConnectedNodesCount; Index++)
+ for(Index = 0; Index < LogicalNodesCount; Index++)
{
/* getting logical pin offset */
MMixerGetLowestLogicalTopologyPinOffsetFromArray(LogicalNodesCount,
LogicalNodes, &CurLogicalPinOffset);