/* get node name */
Status = MixerContext->Control(hDevice, IOCTL_KS_PROPERTY, (PVOID)&Node, sizeof(KSP_NODE), (LPVOID)Name, BytesReturned, &BytesReturned);
- if (Status != MM_STATUS_SUCCESS)
+
+ if (Status == MM_STATUS_SUCCESS)
{
MixerContext->Copy(MixerControl->szShortName, Name, (min(MIXER_SHORT_NAME_CHARS, wcslen(Name)+1)) * sizeof(WCHAR));
MixerControl->szShortName[MIXER_SHORT_NAME_CHARS-1] = L'\0';
{
MixerContext->Free(Desc);
MixerContext->Free(VolumeData);
-
return MM_STATUS_NO_MEMORY;
}
MixerContext->Free(Desc);
}
-
DPRINT("Status %x Name %S\n", Status, MixerControl->szName);
return MM_STATUS_SUCCESS;
}
if (LineName)
{
- wcscpy(DestinationLine->Line.szShortName, LineName);
- wcscpy(DestinationLine->Line.szName, LineName);
+ MixerContext->Copy(DestinationLine->Line.szShortName, LineName, (min(MIXER_SHORT_NAME_CHARS, wcslen(LineName)+1)) * sizeof(WCHAR));
+ DestinationLine->Line.szShortName[MIXER_SHORT_NAME_CHARS-1] = L'\0';
+
+ MixerContext->Copy(DestinationLine->Line.szName, LineName, (min(MIXER_LONG_NAME_CHARS, wcslen(LineName)+1)) * sizeof(WCHAR));
+ DestinationLine->Line.szName[MIXER_LONG_NAME_CHARS-1] = L'\0';
+
}
else
{
DestinationLine->Line.Target.vDriverVersion = MixerInfo->MixCaps.vDriverVersion;
wcscpy(DestinationLine->Line.Target.szPname, MixerInfo->MixCaps.szPname);
+ // initialize extra line
+ InitializeListHead(&DestinationLine->LineControlsExtraData);
// insert into mixer info
InsertHeadList(&MixerInfo->LineList, &DestinationLine->Entry);
MixerData = MMixerGetDataByDeviceName(MixerList, OutConnection->SymbolicLinkName);
ASSERT(MixerData);
+ // store connected mixer handle
+ MixerInfo->hMixer = MixerData->hDevice;
+
// get connected filter pin count
PinsRefCount = MMixerGetFilterPinCount(MixerContext, MixerData->hDevice);
ASSERT(PinsRefCount);
ULONG BytesReturned;
KSP_PIN Pin;
LPWSTR Buffer = NULL;
+ ULONG PinId;
// allocate a mixer info struct
MixerInfo = (LPMIXER_INFO) MixerContext->Alloc(sizeof(MIXER_INFO));
// now get the target pins of the ADC / DAC node
Status = MMixerGetTargetPins(MixerContext, NodeTypes, NodeConnections, NodeIndex, !bInputMixer, Pins, PinCount);
+ // find a target pin with a name
+ PinId = PinCount +1;
for(Index = 0; Index < PinCount; Index++)
{
if (Pins[Index])
{
+ // store index of pin
+ PinId = Index;
+
/* retrieve pin name */
Pin.PinId = Index;
Pin.Reserved = 0;
}
}
+ if (PinId < PinCount)
+ {
+ // create an wave info struct
+ MMixerInitializeWaveInfo(MixerContext, MixerList, MixerData, MixerInfo->MixCaps.szPname, bInputMixer, PinId);
+ }
+
Status = MMixerCreateDestinationLine(MixerContext, MixerInfo, bInputMixer, Buffer);
if (Buffer)
IN LPMIXER_DATA MixerData,
IN PULONG DeviceCount)
{
- PKSMULTIPLE_ITEM NodeTypes, NodeConnections;
+ PKSMULTIPLE_ITEM NodeTypes = NULL, NodeConnections = NULL;
MIXER_STATUS Status;
ULONG PinCount;
ULONG NodeIndex;
}
// check if the filter has an wave out node
+
NodeIndex = MMixerGetIndexOfGuid(NodeTypes, &KSNODETYPE_DAC);
if (NodeIndex != MAXULONG)
{