else
NodeIndex = CurConnection->ToNode;
+ if (NodeIndex > NodeTypes->Count)
+ {
+ // reached end of pin connection
+ return MM_STATUS_SUCCESS;
+ }
+
/* get target node type of current connection */
NodeType = MMixerGetNodeType(NodeTypes, NodeIndex);
Status = MMixerGetNodeIndexes(MixerContext, NodeConnections, NodeIndex, TRUE, TRUE, &NodeConnectionCount, &NodeConnection);
}
- if (Status != MM_STATUS_SUCCESS)
+ if (Status == MM_STATUS_SUCCESS)
{
for(Index = 0; Index < NodeConnectionCount; Index++)
{
LPWSTR PinName;
GUID NodeType;
ULONG BytesReturned, ControlCount, Index;
+ LPGUID Node;
PULONG Nodes;
if (!bTargetPin)
{
if (Nodes[Index])
{
- // found a node
- ControlCount++;
+ // get node type
+ Node = MMixerGetNodeType(NodeTypes, Index);
+
+ if (MMixerGetControlTypeFromTopologyNode(Node))
+ {
+ // found a node which can be resolved to a type
+ ControlCount++;
+ }
}
}
{
if (Nodes[Index])
{
- /* store the node index for retrieving / setting details */
- SrcLine->NodeIds[ControlCount] = Index;
+ // get node type
+ Node = MMixerGetNodeType(NodeTypes, Index);
- Status = MMixerAddMixerControl(MixerContext, MixerInfo, hDevice, NodeTypes, Index, SrcLine, &SrcLine->LineControls[ControlCount]);
- if (Status == MM_STATUS_SUCCESS)
+ if (MMixerGetControlTypeFromTopologyNode(Node))
{
- /* increment control count on success */
- ControlCount++;
+ /* store the node index for retrieving / setting details */
+ SrcLine->NodeIds[ControlCount] = Index;
+
+ Status = MMixerAddMixerControl(MixerContext, MixerInfo, hDevice, NodeTypes, Index, SrcLine, &SrcLine->LineControls[ControlCount]);
+ if (Status == MM_STATUS_SUCCESS)
+ {
+ /* increment control count on success */
+ ControlCount++;
+ }
}
}
}
return Status;
}
-
-
RtlZeroMemory(Pins, sizeof(ULONG) * PinCount);
// now get the target pins of the ADC / DAC node
Status = MMixerGetTargetPins(MixerContext, NodeTypes, NodeConnections, NodeIndex, bInputMixer, Pins, PinCount);