[1166] | 1 | /**
|
---|
| 2 | * This file has no copyright assigned and is placed in the Public Domain.
|
---|
| 3 | * This file is part of the mingw-w64 runtime package.
|
---|
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
---|
| 5 | */
|
---|
| 6 | #ifndef _MSPTRMAR_H_
|
---|
| 7 | #define _MSPTRMAR_H_
|
---|
| 8 |
|
---|
| 9 | #define WAVEOUT_NAME L"WaveOut Terminal"
|
---|
| 10 | #define MIXER_NAME L"PCM Mixer"
|
---|
| 11 |
|
---|
| 12 | class CAudioRenderTerminal : public IDispatchImpl<ITBasicAudioTerminal,&IID_ITBasicAudioTerminal,&LIBID_TAPI3Lib>,public IDispatchImpl<ITStaticAudioTerminal,&IID_ITStaticAudioTerminal,&LIBID_TAPI3Lib>,public CSingleFilterStaticTerminal,public CMSPObjectSafetyImpl
|
---|
| 13 | {
|
---|
| 14 | public:
|
---|
| 15 | CAudioRenderTerminal();
|
---|
| 16 | virtual ~CAudioRenderTerminal();
|
---|
| 17 | HRESULT InitializeDefaultTerminal();
|
---|
| 18 | static HRESULT CreateTerminal(CComPtr<IMoniker> pMoniker,MSP_HANDLE htAddress,ITTerminal **ppTerm);
|
---|
| 19 | HRESULT FindTerminalPin();
|
---|
| 20 | BEGIN_COM_MAP(CAudioRenderTerminal)
|
---|
| 21 | COM_INTERFACE_ENTRY(IObjectSafety)
|
---|
| 22 | COM_INTERFACE_ENTRY(ITBasicAudioTerminal)
|
---|
| 23 | COM_INTERFACE_ENTRY(ITStaticAudioTerminal)
|
---|
| 24 | COM_INTERFACE_ENTRY_CHAIN(CSingleFilterStaticTerminal)
|
---|
| 25 | END_COM_MAP()
|
---|
| 26 | DECLARE_VQI()
|
---|
| 27 | DECLARE_LOG_ADDREF_RELEASE(CAudioRenderTerminal)
|
---|
| 28 | public:
|
---|
| 29 | STDMETHOD(get_Balance)(__LONG32 *pVal);
|
---|
| 30 | STDMETHOD(put_Balance)(__LONG32 newVal);
|
---|
| 31 | STDMETHOD(get_Volume)(__LONG32 *pVal);
|
---|
| 32 | STDMETHOD(put_Volume)(__LONG32 newVal);
|
---|
| 33 | STDMETHOD(get_WaveId) (__LONG32 *plWaveId);
|
---|
| 34 | public:
|
---|
| 35 | STDMETHODIMP CompleteConnectTerminal(void);
|
---|
| 36 | STDMETHODIMP DisconnectTerminal(IGraphBuilder *pGraph,DWORD dwReserved);
|
---|
| 37 | virtual HRESULT AddFiltersToGraph();
|
---|
| 38 | virtual DWORD GetSupportedMediaTypes(void) { return (DWORD) TAPIMEDIATYPE_AUDIO; }
|
---|
| 39 | HRESULT CreateFilters();
|
---|
| 40 | private:
|
---|
| 41 | bool m_bResourceReserved;
|
---|
| 42 | CComPtr<IBasicAudio> m_pIBasicAudio;
|
---|
| 43 | };
|
---|
| 44 |
|
---|
| 45 | #endif
|
---|