mirror of
https://github.com/reactos/reactos.git
synced 2024-09-12 22:02:18 +00:00
[PORTCLS]
- Remove silence buffer hack - Stub DRM Property Handler - Before stopping the audio pin, fill the dma buffer with silence samples - create a subdevice descriptor for instantiated pins too svn path=/trunk/; revision=49242
This commit is contained in:
parent
17fe2b3988
commit
0d136362a0
|
@ -79,6 +79,7 @@ const GUID KSPROPSETID_Topology = {0x720D4AC0L, 0x7533, 0x11D0, {
|
||||||
const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}};
|
const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}};
|
||||||
const GUID KSPROPSETID_Connection = {0x1D58C920L, 0xAC9B, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
|
const GUID KSPROPSETID_Connection = {0x1D58C920L, 0xAC9B, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
|
||||||
const GUID KSPROPTYPESETID_General = {0x97E99BA0L, 0xBDEA, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
|
const GUID KSPROPTYPESETID_General = {0x97E99BA0L, 0xBDEA, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
|
||||||
|
const GUID KSPROPSETID_DrmAudioStream = {0x2f2c8ddd, 0x4198, 0x4fac, {0xba, 0x29, 0x61, 0xbb, 0x05, 0xb7, 0xde, 0x06}};
|
||||||
|
|
||||||
const GUID KSEVENTSETID_LoopedStreaming = {0x4682B940L, 0xC6EF, 0x11D0, {0x96, 0xD8, 0x00, 0xAA, 0x00, 0x51, 0xE5, 0x1D}};
|
const GUID KSEVENTSETID_LoopedStreaming = {0x4682B940L, 0xC6EF, 0x11D0, {0x96, 0xD8, 0x00, 0xAA, 0x00, 0x51, 0xE5, 0x1D}};
|
||||||
const GUID KSEVENTSETID_Connection = {0x7f4bcbe0L, 0x9ea5, 0x11cf, {0xa5, 0xd6, 0x28, 0xdb, 0x04, 0xc1, 0x00, 0x00}};
|
const GUID KSEVENTSETID_Connection = {0x7f4bcbe0L, 0x9ea5, 0x11cf, {0xa5, 0xd6, 0x28, 0xdb, 0x04, 0xc1, 0x00, 0x00}};
|
||||||
|
|
|
@ -321,8 +321,7 @@ DECLARE_INTERFACE_(IIrpQueue, IUnknown)
|
||||||
STDMETHOD_(NTSTATUS, Init)(THIS_
|
STDMETHOD_(NTSTATUS, Init)(THIS_
|
||||||
IN KSPIN_CONNECT *ConnectDetails,
|
IN KSPIN_CONNECT *ConnectDetails,
|
||||||
IN ULONG FrameSize,
|
IN ULONG FrameSize,
|
||||||
IN ULONG Alignment,
|
IN ULONG Alignment) PURE;
|
||||||
IN PVOID SilenceBuffer) PURE;
|
|
||||||
|
|
||||||
STDMETHOD_(NTSTATUS, AddMapping)(THIS_
|
STDMETHOD_(NTSTATUS, AddMapping)(THIS_
|
||||||
IN PIRP Irp,
|
IN PIRP Irp,
|
||||||
|
@ -363,8 +362,7 @@ DECLARE_INTERFACE_(IIrpQueue, IUnknown)
|
||||||
STDMETHODIMP_(NTSTATUS) Init(THIS_ \
|
STDMETHODIMP_(NTSTATUS) Init(THIS_ \
|
||||||
IN KSPIN_CONNECT *ConnectDetails, \
|
IN KSPIN_CONNECT *ConnectDetails, \
|
||||||
IN ULONG FrameSize, \
|
IN ULONG FrameSize, \
|
||||||
IN ULONG Alignment, \
|
IN ULONG Alignment); \
|
||||||
IN PVOID SilenceBuffer); \
|
|
||||||
\
|
\
|
||||||
STDMETHODIMP_(NTSTATUS) AddMapping(THIS_ \
|
STDMETHODIMP_(NTSTATUS) AddMapping(THIS_ \
|
||||||
IN PIRP Irp, \
|
IN PIRP Irp, \
|
||||||
|
|
|
@ -43,7 +43,6 @@ protected:
|
||||||
LIST_ENTRY m_IrpList;
|
LIST_ENTRY m_IrpList;
|
||||||
LIST_ENTRY m_FreeIrpList;
|
LIST_ENTRY m_FreeIrpList;
|
||||||
PIRP m_Irp;
|
PIRP m_Irp;
|
||||||
PVOID m_SilenceBuffer;
|
|
||||||
|
|
||||||
ULONG m_OutOfMapping;
|
ULONG m_OutOfMapping;
|
||||||
ULONG m_MaxFrameSize;
|
ULONG m_MaxFrameSize;
|
||||||
|
@ -84,12 +83,10 @@ NTAPI
|
||||||
CIrpQueue::Init(
|
CIrpQueue::Init(
|
||||||
IN KSPIN_CONNECT *ConnectDetails,
|
IN KSPIN_CONNECT *ConnectDetails,
|
||||||
IN ULONG FrameSize,
|
IN ULONG FrameSize,
|
||||||
IN ULONG Alignment,
|
IN ULONG Alignment)
|
||||||
IN PVOID SilenceBuffer)
|
|
||||||
{
|
{
|
||||||
m_ConnectDetails = ConnectDetails;
|
m_ConnectDetails = ConnectDetails;
|
||||||
m_MaxFrameSize = FrameSize;
|
m_MaxFrameSize = FrameSize;
|
||||||
m_SilenceBuffer = SilenceBuffer;
|
|
||||||
m_Alignment = Alignment;
|
m_Alignment = Alignment;
|
||||||
|
|
||||||
InitializeListHead(&m_IrpList);
|
InitializeListHead(&m_IrpList);
|
||||||
|
@ -259,22 +256,13 @@ CIrpQueue::GetMapping(
|
||||||
m_CurrentOffset = Offset = 0;
|
m_CurrentOffset = Offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Irp && m_SilenceBuffer && m_MaxFrameSize)
|
|
||||||
{
|
|
||||||
DPRINT("NoIrp\n");
|
|
||||||
// no irp available, use silence buffer
|
|
||||||
*Buffer = (PUCHAR)m_SilenceBuffer;
|
|
||||||
*BufferSize = m_MaxFrameSize;
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Irp)
|
if (!Irp)
|
||||||
{
|
{
|
||||||
// no irp buffer available
|
// no irp buffer available
|
||||||
|
DPRINT("NoIrp\n");
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// get stream header
|
// get stream header
|
||||||
StreamHeader = (PKSSTREAM_HEADER)Irp->Tail.Overlay.DriverContext[2];
|
StreamHeader = (PKSSTREAM_HEADER)Irp->Tail.Overlay.DriverContext[2];
|
||||||
|
|
||||||
|
|
|
@ -604,7 +604,7 @@ CPortPinDMus::Init(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = m_IrpQueue->Init(ConnectDetails, 0, 0, NULL);
|
Status = m_IrpQueue->Init(ConnectDetails, 0, 0);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("IrpQueue_Init failed with %x\n", Status);
|
DPRINT("IrpQueue_Init failed with %x\n", Status);
|
||||||
|
|
|
@ -73,7 +73,7 @@ protected:
|
||||||
ULONG m_StopCount;
|
ULONG m_StopCount;
|
||||||
KSAUDIO_POSITION m_Position;
|
KSAUDIO_POSITION m_Position;
|
||||||
KSALLOCATOR_FRAMING m_AllocatorFraming;
|
KSALLOCATOR_FRAMING m_AllocatorFraming;
|
||||||
SUBDEVICE_DESCRIPTOR m_Descriptor;
|
PSUBDEVICE_DESCRIPTOR m_Descriptor;
|
||||||
|
|
||||||
KSPIN_LOCK m_EventListLock;
|
KSPIN_LOCK m_EventListLock;
|
||||||
LIST_ENTRY m_EventList;
|
LIST_ENTRY m_EventList;
|
||||||
|
@ -105,10 +105,12 @@ NTSTATUS NTAPI PinWaveCyclicAudioPosition(IN PIRP Irp, IN PKSIDENTIFIER Request,
|
||||||
NTSTATUS NTAPI PinWaveCyclicAllocatorFraming(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data);
|
NTSTATUS NTAPI PinWaveCyclicAllocatorFraming(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data);
|
||||||
NTSTATUS NTAPI PinWaveCyclicAddEndOfStreamEvent(IN PIRP Irp, IN PKSEVENTDATA EventData, IN PKSEVENT_ENTRY EventEntry);
|
NTSTATUS NTAPI PinWaveCyclicAddEndOfStreamEvent(IN PIRP Irp, IN PKSEVENTDATA EventData, IN PKSEVENT_ENTRY EventEntry);
|
||||||
NTSTATUS NTAPI PinWaveCyclicAddLoopedStreamEvent(IN PIRP Irp, IN PKSEVENTDATA EventData, IN PKSEVENT_ENTRY EventEntry);
|
NTSTATUS NTAPI PinWaveCyclicAddLoopedStreamEvent(IN PIRP Irp, IN PKSEVENTDATA EventData, IN PKSEVENT_ENTRY EventEntry);
|
||||||
|
NTSTATUS NTAPI PinWaveCyclicDRMHandler(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data);
|
||||||
|
|
||||||
|
|
||||||
DEFINE_KSPROPERTY_CONNECTIONSET(PinWaveCyclicConnectionSet, PinWaveCyclicState, PinWaveCyclicDataFormat, PinWaveCyclicAllocatorFraming);
|
DEFINE_KSPROPERTY_CONNECTIONSET(PinWaveCyclicConnectionSet, PinWaveCyclicState, PinWaveCyclicDataFormat, PinWaveCyclicAllocatorFraming);
|
||||||
DEFINE_KSPROPERTY_AUDIOSET(PinWaveCyclicAudioSet, PinWaveCyclicAudioPosition);
|
DEFINE_KSPROPERTY_AUDIOSET(PinWaveCyclicAudioSet, PinWaveCyclicAudioPosition);
|
||||||
|
DEFINE_KSPROPERTY_DRMSET(PinWaveCyclicDRMSet, PinWaveCyclicDRMHandler);
|
||||||
|
|
||||||
KSEVENT_ITEM PinWaveCyclicConnectionEventSet =
|
KSEVENT_ITEM PinWaveCyclicConnectionEventSet =
|
||||||
{
|
{
|
||||||
|
@ -146,6 +148,13 @@ KSPROPERTY_SET PinWaveCyclicPropertySet[] =
|
||||||
(const KSPROPERTY_ITEM*)&PinWaveCyclicAudioSet,
|
(const KSPROPERTY_ITEM*)&PinWaveCyclicAudioSet,
|
||||||
0,
|
0,
|
||||||
NULL
|
NULL
|
||||||
|
},
|
||||||
|
{
|
||||||
|
&KSPROPSETID_DrmAudioStream,
|
||||||
|
sizeof(PinWaveCyclicDRMSet) / sizeof(KSPROPERTY_ITEM),
|
||||||
|
(const KSPROPERTY_ITEM*)&PinWaveCyclicDRMSet,
|
||||||
|
0,
|
||||||
|
NULL
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -192,6 +201,19 @@ CPortPinWaveCyclic::QueryInterface(
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
PinWaveCyclicDRMHandler(
|
||||||
|
IN PIRP Irp,
|
||||||
|
IN PKSIDENTIFIER Request,
|
||||||
|
IN OUT PVOID Data)
|
||||||
|
{
|
||||||
|
DPRINT1("PinWaveCyclicDRMHandler\n");
|
||||||
|
ASSERT(0);
|
||||||
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
PinWaveCyclicAddEndOfStreamEvent(
|
PinWaveCyclicAddEndOfStreamEvent(
|
||||||
|
@ -448,12 +470,14 @@ PinWaveCyclicState(
|
||||||
{
|
{
|
||||||
// FIXME
|
// FIXME
|
||||||
// complete with successful state
|
// complete with successful state
|
||||||
|
Pin->m_Stream->Silence(Pin->m_CommonBuffer, Pin->m_CommonBufferSize);
|
||||||
Pin->m_IrpQueue->CancelBuffers();
|
Pin->m_IrpQueue->CancelBuffers();
|
||||||
Pin->m_Position.PlayOffset = 0;
|
Pin->m_Position.PlayOffset = 0;
|
||||||
Pin->m_Position.WriteOffset = 0;
|
Pin->m_Position.WriteOffset = 0;
|
||||||
}
|
}
|
||||||
else if (Pin->m_State == KSSTATE_STOP)
|
else if (Pin->m_State == KSSTATE_STOP)
|
||||||
{
|
{
|
||||||
|
Pin->m_Stream->Silence(Pin->m_CommonBuffer, Pin->m_CommonBufferSize);
|
||||||
Pin->m_IrpQueue->CancelBuffers();
|
Pin->m_IrpQueue->CancelBuffers();
|
||||||
Pin->m_Position.PlayOffset = 0;
|
Pin->m_Position.PlayOffset = 0;
|
||||||
Pin->m_Position.WriteOffset = 0;
|
Pin->m_Position.WriteOffset = 0;
|
||||||
|
@ -751,7 +775,6 @@ CPortPinWaveCyclic::UpdateCommonBufferOverlap(
|
||||||
m_Position.PlayOffset = m_Position.PlayOffset % m_Position.WriteOffset;
|
m_Position.PlayOffset = m_Position.PlayOffset % m_Position.WriteOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Gap == Length)
|
if (Gap == Length)
|
||||||
|
@ -773,22 +796,13 @@ CPortPinWaveCyclic::RequestService()
|
||||||
{
|
{
|
||||||
ULONG Position;
|
ULONG Position;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PUCHAR Buffer;
|
|
||||||
ULONG BufferSize;
|
|
||||||
ULONGLONG OldOffset, NewOffset;
|
ULONGLONG OldOffset, NewOffset;
|
||||||
|
|
||||||
PC_ASSERT_IRQL(DISPATCH_LEVEL);
|
PC_ASSERT_IRQL(DISPATCH_LEVEL);
|
||||||
|
|
||||||
if (m_State == KSSTATE_RUN)
|
if (m_State == KSSTATE_RUN)
|
||||||
{
|
{
|
||||||
Status = m_IrpQueue->GetMapping(&Buffer, &BufferSize);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = m_Stream->GetPosition(&Position);
|
Status = m_Stream->GetPosition(&Position);
|
||||||
DPRINT("Position %u Buffer %p BufferSize %u ActiveIrpOffset %u Capture %u\n", Position, Buffer, m_CommonBufferSize, BufferSize, m_Capture);
|
|
||||||
|
|
||||||
OldOffset = m_Position.PlayOffset;
|
OldOffset = m_Position.PlayOffset;
|
||||||
|
|
||||||
|
@ -841,7 +855,7 @@ CPortPinWaveCyclic::DeviceIoControl(
|
||||||
if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_PROPERTY)
|
if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_PROPERTY)
|
||||||
{
|
{
|
||||||
/* handle property with subdevice descriptor */
|
/* handle property with subdevice descriptor */
|
||||||
Status = PcHandlePropertyWithTable(Irp, m_Descriptor.FilterPropertySetCount, m_Descriptor.FilterPropertySet, &m_Descriptor);
|
Status = PcHandlePropertyWithTable(Irp, m_Descriptor->FilterPropertySetCount, m_Descriptor->FilterPropertySet, m_Descriptor);
|
||||||
|
|
||||||
if (Status == STATUS_NOT_FOUND)
|
if (Status == STATUS_NOT_FOUND)
|
||||||
{
|
{
|
||||||
|
@ -854,11 +868,11 @@ CPortPinWaveCyclic::DeviceIoControl(
|
||||||
}
|
}
|
||||||
else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_ENABLE_EVENT)
|
else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_ENABLE_EVENT)
|
||||||
{
|
{
|
||||||
Status = PcHandleEnableEventWithTable(Irp, &m_Descriptor);
|
Status = PcHandleEnableEventWithTable(Irp, m_Descriptor);
|
||||||
}
|
}
|
||||||
else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_DISABLE_EVENT)
|
else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_DISABLE_EVENT)
|
||||||
{
|
{
|
||||||
Status = PcHandleDisableEventWithTable(Irp, &m_Descriptor);
|
Status = PcHandleDisableEventWithTable(Irp, m_Descriptor);
|
||||||
}
|
}
|
||||||
else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_RESET_STATE)
|
else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_RESET_STATE)
|
||||||
{
|
{
|
||||||
|
@ -1120,7 +1134,6 @@ CPortPinWaveCyclic::Init(
|
||||||
PKSDATAFORMAT DataFormat;
|
PKSDATAFORMAT DataFormat;
|
||||||
PDEVICE_OBJECT DeviceObject;
|
PDEVICE_OBJECT DeviceObject;
|
||||||
BOOLEAN Capture;
|
BOOLEAN Capture;
|
||||||
PVOID SilenceBuffer;
|
|
||||||
PSUBDEVICE_DESCRIPTOR SubDeviceDescriptor = NULL;
|
PSUBDEVICE_DESCRIPTOR SubDeviceDescriptor = NULL;
|
||||||
//IDrmAudioStream * DrmAudio = NULL;
|
//IDrmAudioStream * DrmAudio = NULL;
|
||||||
|
|
||||||
|
@ -1203,18 +1216,26 @@ CPortPinWaveCyclic::Init(
|
||||||
InitializeListHead(&m_EventList);
|
InitializeListHead(&m_EventList);
|
||||||
KeInitializeSpinLock(&m_EventListLock);
|
KeInitializeSpinLock(&m_EventListLock);
|
||||||
|
|
||||||
/* set up subdevice descriptor */
|
Status = PcCreateSubdeviceDescriptor(&m_Descriptor,
|
||||||
RtlZeroMemory(&m_Descriptor, sizeof(SUBDEVICE_DESCRIPTOR));
|
SubDeviceDescriptor->InterfaceCount,
|
||||||
m_Descriptor.FilterPropertySet = PinWaveCyclicPropertySet;
|
SubDeviceDescriptor->Interfaces,
|
||||||
m_Descriptor.FilterPropertySetCount = sizeof(PinWaveCyclicPropertySet) / sizeof(KSPROPERTY_SET);
|
0, /* FIXME KSINTERFACE_STANDARD with KSINTERFACE_STANDARD_STREAMING / KSINTERFACE_STANDARD_LOOPED_STREAMING */
|
||||||
m_Descriptor.UnknownStream = (PUNKNOWN)m_Stream;
|
NULL,
|
||||||
m_Descriptor.DeviceDescriptor = SubDeviceDescriptor->DeviceDescriptor;
|
sizeof(PinWaveCyclicPropertySet) / sizeof(KSPROPERTY_SET),
|
||||||
m_Descriptor.UnknownMiniport = SubDeviceDescriptor->UnknownMiniport;
|
PinWaveCyclicPropertySet,
|
||||||
m_Descriptor.PortPin = (PVOID)this;
|
0,
|
||||||
m_Descriptor.EventSetCount = sizeof(PinWaveCyclicEventSet) / sizeof(KSEVENT_SET);
|
0,
|
||||||
m_Descriptor.EventSet = PinWaveCyclicEventSet;
|
0,
|
||||||
m_Descriptor.EventList = &m_EventList;
|
NULL,
|
||||||
m_Descriptor.EventListLock = &m_EventListLock;
|
sizeof(PinWaveCyclicEventSet) / sizeof(KSEVENT_SET),
|
||||||
|
PinWaveCyclicEventSet,
|
||||||
|
SubDeviceDescriptor->DeviceDescriptor);
|
||||||
|
|
||||||
|
m_Descriptor->UnknownStream = (PUNKNOWN)m_Stream;
|
||||||
|
m_Descriptor->UnknownMiniport = SubDeviceDescriptor->UnknownMiniport;
|
||||||
|
m_Descriptor->PortPin = (PVOID)this;
|
||||||
|
m_Descriptor->EventList = &m_EventList;
|
||||||
|
m_Descriptor->EventListLock = &m_EventListLock;
|
||||||
|
|
||||||
// initialize reset state
|
// initialize reset state
|
||||||
m_ResetState = KSRESET_END;
|
m_ResetState = KSRESET_END;
|
||||||
|
@ -1247,9 +1268,6 @@ CPortPinWaveCyclic::Init(
|
||||||
PC_ASSERT(NT_SUCCESS(Status));
|
PC_ASSERT(NT_SUCCESS(Status));
|
||||||
PC_ASSERT(m_FrameSize);
|
PC_ASSERT(m_FrameSize);
|
||||||
|
|
||||||
SilenceBuffer = AllocateItem(NonPagedPool, m_FrameSize, TAG_PORTCLASS);
|
|
||||||
if (!SilenceBuffer)
|
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
|
||||||
|
|
||||||
|
|
||||||
/* set up allocator framing */
|
/* set up allocator framing */
|
||||||
|
@ -1260,10 +1278,9 @@ CPortPinWaveCyclic::Init(
|
||||||
m_AllocatorFraming.Reserved = 0;
|
m_AllocatorFraming.Reserved = 0;
|
||||||
m_AllocatorFraming.FrameSize = m_FrameSize;
|
m_AllocatorFraming.FrameSize = m_FrameSize;
|
||||||
|
|
||||||
m_Stream->Silence(SilenceBuffer, m_FrameSize);
|
|
||||||
m_Stream->Silence(m_CommonBuffer, m_CommonBufferSize);
|
m_Stream->Silence(m_CommonBuffer, m_CommonBufferSize);
|
||||||
|
|
||||||
Status = m_IrpQueue->Init(ConnectDetails, m_FrameSize, 0, SilenceBuffer);
|
Status = m_IrpQueue->Init(ConnectDetails, m_FrameSize, 0);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
m_IrpQueue->Release();
|
m_IrpQueue->Release();
|
||||||
|
@ -1282,9 +1299,6 @@ CPortPinWaveCyclic::Init(
|
||||||
m_Port = Port;
|
m_Port = Port;
|
||||||
m_Filter = Filter;
|
m_Filter = Filter;
|
||||||
|
|
||||||
//DPRINT("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE));
|
|
||||||
//DPRINT("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE));
|
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -919,7 +919,7 @@ CPortPinWavePci::Init(
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize irp queue
|
// initialize irp queue
|
||||||
Status = m_IrpQueue->Init(ConnectDetails, m_AllocatorFraming.FrameSize, m_AllocatorFraming.FileAlignment, NULL);
|
Status = m_IrpQueue->Init(ConnectDetails, m_AllocatorFraming.FrameSize, m_AllocatorFraming.FileAlignment);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
// this should never happen
|
// this should never happen
|
||||||
|
|
|
@ -587,7 +587,7 @@ CPortPinWaveRT::Init(
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = m_IrpQueue->Init(ConnectDetails, 0, 0, NULL);
|
Status = m_IrpQueue->Init(ConnectDetails, 0, 0);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
|
@ -356,6 +356,22 @@ DEFINE_KSPROPERTY_TABLE(PinSet) {\
|
||||||
DEFINE_KSPROPERTY_ITEM_AUDIO_POSITION(PropPositionHandler, PropPositionHandler)\
|
DEFINE_KSPROPERTY_ITEM_AUDIO_POSITION(PropPositionHandler, PropPositionHandler)\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define DEFINE_KSPROPERTY_ITEM_DRMAUDIOSTREAM_CONTENTID(SetHandler)\
|
||||||
|
DEFINE_KSPROPERTY_ITEM(\
|
||||||
|
KSPROPERTY_DRMAUDIOSTREAM_CONTENTID,\
|
||||||
|
NULL,\
|
||||||
|
sizeof(KSPROPERTY),\
|
||||||
|
sizeof(ULONG),\
|
||||||
|
(SetHandler),\
|
||||||
|
NULL, 0, NULL, NULL, 0)
|
||||||
|
|
||||||
|
#define DEFINE_KSPROPERTY_DRMSET(PinSet,\
|
||||||
|
PropPositionHandler)\
|
||||||
|
DEFINE_KSPROPERTY_TABLE(PinSet) {\
|
||||||
|
DEFINE_KSPROPERTY_ITEM_DRMAUDIOSTREAM_CONTENTID(PropPositionHandler)\
|
||||||
|
}
|
||||||
|
|
||||||
#define DEFINE_KSPROPERTY_PINPROPOSEDATAFORMAT(PinSet,\
|
#define DEFINE_KSPROPERTY_PINPROPOSEDATAFORMAT(PinSet,\
|
||||||
PropGeneral, PropInstances, PropIntersection)\
|
PropGeneral, PropInstances, PropIntersection)\
|
||||||
DEFINE_KSPROPERTY_TABLE(PinSet) {\
|
DEFINE_KSPROPERTY_TABLE(PinSet) {\
|
||||||
|
|
Loading…
Reference in a new issue