-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrtsdwave.h
98 lines (78 loc) · 3.36 KB
/
rtsdwave.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
Module Name:
rtsdwave.h
Abstract:
Definition of wavecyclic miniport class.
*/
#ifndef __RTSDWAVE_H_
#define __RTSDWAVE_H_
#include "rtsdwave.h"
//=============================================================================
// Referenced Forward
//=============================================================================
void TimerNotify(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SA1,
IN PVOID SA2
);
//=============================================================================
// Classes
//=============================================================================
///////////////////////////////////////////////////////////////////////////////
// CMiniportWaveCyclic
//
class CMiniportWaveCyclic : public IMiniportWaveCyclic, public CUnknown {
private:
BOOL m_fCaptureAllocated;
BOOL m_fRenderAllocated;
protected:
PADAPTERCOMMON m_AdapterCommon; // Adapter common object
PPORTWAVECYCLIC m_Port; // Callback interface
PPCFILTER_DESCRIPTOR m_FilterDescriptor; // Filter descriptor
ULONG m_NotificationInterval; // milliseconds.
ULONG m_SamplingFrequency; // Frames per second.
PSERVICEGROUP m_ServiceGroup; // For notification.
KMUTEX m_SampleRateSync; // Sync for sample rate
ULONG m_MaxDmaBufferSize; // Dma buffer size.
// All the below members should be updated by the child classes
ULONG m_MaxOutputStreams; // Max stream caps
ULONG m_MaxInputStreams;
ULONG m_MaxTotalStreams;
ULONG m_MinChannels; // Format caps
ULONG m_MaxChannelsPcm;
ULONG m_MinBitsPerSamplePcm;
ULONG m_MaxBitsPerSamplePcm;
ULONG m_MinSampleRatePcm;
ULONG m_MaxSampleRatePcm;
protected:
NTSTATUS ValidateFormat(IN PKSDATAFORMAT pDataFormat);
NTSTATUS ValidatePcm(IN PWAVEFORMATEX pWfx);
public:
DECLARE_STD_UNKNOWN();
DEFINE_STD_CONSTRUCTOR(CMiniportWaveCyclic);
~CMiniportWaveCyclic();
IMP_IMiniportWaveCyclic;
//--> muss hier her, da CopyTo und CopyFrom in verschiedenen Stream-Instanzen aufgerufen werden.
PVOID myBuffer;
LONG myBufferSize;
LONG myBufferLocked;
LONG myBufferWritePos;
LONG myBufferReadPos;
LONG myBufferReading; //Determines wether there is a client that still reads data
// Property Handler
NTSTATUS PropertyHandlerGeneric(IN PPCPROPERTY_REQUEST PropertyRequest);
NTSTATUS PropertyHandlerComponentId(IN PPCPROPERTY_REQUEST PropertyRequest);
NTSTATUS PropertyHandlerCpuResources(IN PPCPROPERTY_REQUEST PropertyRequest);
// Friends
friend class CMiniportWaveCyclicStream;
friend class CMiniportTopologySimple;
friend void TimerNotify(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SA1,
IN PVOID SA2
);
};
typedef CMiniportWaveCyclic *PCMiniportWaveCyclic;
#endif