Implement ResetDC and PHYSICALOFFSET[X|Y] devcaps.
[wine] / dlls / quartz / audren.h
1 /*
2  * Audio Renderer (CLSID_AudioRender)
3  *
4  * FIXME
5  *  - implements IRefereneceClock.
6  *
7  * Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23
24 #ifndef WINE_DSHOW_AUDREN_H
25 #define WINE_DSHOW_AUDREN_H
26
27 #include "iunk.h"
28 #include "basefilt.h"
29 #include "seekpass.h"
30
31 #define WINE_QUARTZ_WAVEOUT_COUNT       4
32
33 typedef struct CAudioRendererImpl       CAudioRendererImpl;
34 typedef struct CAudioRendererPinImpl    CAudioRendererPinImpl;
35
36
37 typedef struct AudRen_IBasicAudioImpl
38 {
39         ICOM_VFIELD(IBasicAudio);
40 } AudRen_IBasicAudioImpl;
41
42 struct CAudioRendererImpl
43 {
44         QUARTZ_IUnkImpl unk;
45         CBaseFilterImpl basefilter;
46         AudRen_IBasicAudioImpl  basaud;
47         QUARTZ_IFDelegation     qiext;
48
49         CSeekingPassThru*       pSeekPass;
50         CAudioRendererPinImpl* pPin;
51
52         CRITICAL_SECTION        m_csReceive;
53         BOOL    m_fInFlush;
54
55         /* for waveOut */
56         long            m_lAudioVolume;
57         long            m_lAudioBalance;
58         BOOL            m_fWaveOutInit;
59         HANDLE          m_hEventRender;
60         HWAVEOUT        m_hWaveOut;
61         DWORD           m_dwBlockSize;
62         WAVEHDR*        m_phdrCur;
63         WAVEHDR         m_hdr[WINE_QUARTZ_WAVEOUT_COUNT];
64 };
65
66 struct CAudioRendererPinImpl
67 {
68         QUARTZ_IUnkImpl unk;
69         CPinBaseImpl    pin;
70         CMemInputPinBaseImpl    meminput;
71
72         CAudioRendererImpl* pRender;
73 };
74
75 #define CAudioRendererImpl_THIS(iface,member)   CAudioRendererImpl*     This = ((CAudioRendererImpl*)(((char*)iface)-offsetof(CAudioRendererImpl,member)))
76 #define CAudioRendererPinImpl_THIS(iface,member)        CAudioRendererPinImpl*  This = ((CAudioRendererPinImpl*)(((char*)iface)-offsetof(CAudioRendererPinImpl,member)))
77
78
79 HRESULT CAudioRendererImpl_InitIBasicAudio( CAudioRendererImpl* This );
80 void CAudioRendererImpl_UninitIBasicAudio( CAudioRendererImpl* This );
81
82 HRESULT QUARTZ_CreateAudioRenderer(IUnknown* punkOuter,void** ppobj);
83 HRESULT QUARTZ_CreateAudioRendererPin(
84         CAudioRendererImpl* pFilter,
85         CRITICAL_SECTION* pcsPin,
86         CRITICAL_SECTION* pcsPinReceive,
87         CAudioRendererPinImpl** ppPin);
88
89
90
91 #endif  /* WINE_DSHOW_AUDREN_H */