Storing an IP address in a signed int results in bugs if it starts
[wine] / dlls / quartz / audren.h
1 /*
2  * Audio Renderer (CLSID_AudioRender)
3  *
4  * FIXME
5  *  - implements IRefereneceClock.
6  *
7  * hidenori@a2.ctktv.ne.jp
8  */
9
10 #ifndef WINE_DSHOW_AUDREN_H
11 #define WINE_DSHOW_AUDREN_H
12
13 #include "iunk.h"
14 #include "basefilt.h"
15 #include "seekpass.h"
16
17 #define WINE_QUARTZ_WAVEOUT_COUNT       4
18
19 typedef struct CAudioRendererImpl       CAudioRendererImpl;
20 typedef struct CAudioRendererPinImpl    CAudioRendererPinImpl;
21
22
23 typedef struct AudRen_IBasicAudioImpl
24 {
25         ICOM_VFIELD(IBasicAudio);
26 } AudRen_IBasicAudioImpl;
27
28 struct CAudioRendererImpl
29 {
30         QUARTZ_IUnkImpl unk;
31         CBaseFilterImpl basefilter;
32         AudRen_IBasicAudioImpl  basaud;
33         QUARTZ_IFDelegation     qiext;
34
35         CSeekingPassThru*       pSeekPass;
36         CAudioRendererPinImpl* pPin;
37
38         BOOL    m_fInFlush;
39
40         /* for waveOut */
41         BOOL            m_fWaveOutInit;
42         HANDLE          m_hEventRender;
43         HWAVEOUT        m_hWaveOut;
44         DWORD           m_dwBlockSize;
45         WAVEHDR*        m_phdrCur;
46         WAVEHDR         m_hdr[WINE_QUARTZ_WAVEOUT_COUNT];
47 };
48
49 struct CAudioRendererPinImpl
50 {
51         QUARTZ_IUnkImpl unk;
52         CPinBaseImpl    pin;
53         CMemInputPinBaseImpl    meminput;
54
55         CAudioRendererImpl* pRender;
56 };
57
58 #define CAudioRendererImpl_THIS(iface,member)   CAudioRendererImpl*     This = ((CAudioRendererImpl*)(((char*)iface)-offsetof(CAudioRendererImpl,member)))
59 #define CAudioRendererPinImpl_THIS(iface,member)        CAudioRendererPinImpl*  This = ((CAudioRendererPinImpl*)(((char*)iface)-offsetof(CAudioRendererPinImpl,member)))
60
61
62 HRESULT CAudioRendererImpl_InitIBasicAudio( CAudioRendererImpl* This );
63 void CAudioRendererImpl_UninitIBasicAudio( CAudioRendererImpl* This );
64
65 HRESULT QUARTZ_CreateAudioRenderer(IUnknown* punkOuter,void** ppobj);
66 HRESULT QUARTZ_CreateAudioRendererPin(
67         CAudioRendererImpl* pFilter,
68         CRITICAL_SECTION* pcsPin,
69         CAudioRendererPinImpl** ppPin);
70
71
72
73 #endif  /* WINE_DSHOW_AUDREN_H */