{
MixerLineSrc = (LPMIXERLINE_EXT)CONTAINING_RECORD(Entry, MIXERLINE_EXT, Entry);
- for(Index = 0; Index < MixerLineSrc->Line.cConnections; Index++)
+ for(Index = 0; Index < MixerLineSrc->Line.cControls; Index++)
{
if (MixerLineSrc->LineControls[Index].dwControlID == dwControlID)
{
}
/* initialize mixer destination line */
- RtlZeroMemory(DestinationLine, sizeof(MIXERLINEW));
+ RtlZeroMemory(DestinationLine, sizeof(MIXERLINE_EXT));
DestinationLine->Line.cbStruct = sizeof(MIXERLINEW);
DestinationLine->Line.dwSource = MAXULONG;
DestinationLine->Line.dwLineID = DESTINATION_LINE;
IN PWDMAUD_CLIENT ClientInfo,
IN PWDMAUD_DEVICE_EXTENSION DeviceExtension)
{
- if ((ULONG)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount)
+ if ((ULONG)DeviceInfo->DeviceIndex >= DeviceExtension->MixerInfoCount)
{
/* invalid parameter */
return STATUS_INVALID_PARAMETER;
}
/* copy cached mixer caps */
- RtlMoveMemory(&DeviceInfo->u.MixCaps, &DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice].MixCaps, sizeof(MIXERCAPSW));
+ RtlMoveMemory(&DeviceInfo->u.MixCaps, &DeviceExtension->MixerInfo[(ULONG)DeviceInfo->DeviceIndex].MixCaps, sizeof(MIXERCAPSW));
return STATUS_SUCCESS;
}
}
MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixLine.dwLineID);
- ASSERT(MixerLineSrc);
+ if (!MixerLineSrc)
+ {
+ DPRINT1("Failed to find Line with id %u\n", DeviceInfo->u.MixLine.dwLineID);
+ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0);
+ }
/* copy cached data */
RtlCopyMemory(&DeviceInfo->u.MixLine, &MixerLineSrc->Line, sizeof(MIXERLINEW));
/* invalid parameter */
return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0);
}
-
+ DPRINT1("MixerId %u ControlId %u\n",(ULONG)DeviceInfo->hDevice, DeviceInfo->u.MixControls.dwControlID);
Status = GetMixerControlById(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixControls.dwControlID, NULL, &MixerControl, NULL);
if (NT_SUCCESS(Status))
{
return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
}
-
UNIMPLEMENTED;
//DbgBreakPoint();
return SetIrpIoStatus(Irp, STATUS_NOT_IMPLEMENTED, 0);