www.pudn.com > CHA07.rar > WAVEODEV.H


// waveodev.h : header file 
// 
 
#ifndef __WAVEODEV__ 
#define __WAVEODEV__ 
 
#include "wavdevwn.h" 
 
///////////////////////////////////////////////////////////////////////////// 
// CWaveOutDevice object 
 
class CWave; 
 
class CWaveOutDevice : public CObject 
{ 
 
// Attributes 
public: 
    BOOL IsOpen();  
    BOOL CanDoFormat(WAVEFORMATEX* pFormat); 
 
// Operations 
public: 
    CWaveOutDevice(); 
    BOOL Open(WAVEFORMATEX* pFormat); 
    BOOL Close(); 
    BOOL Play(CWave* pWave); 
    void Stop(); 
    void WaveOutDone(CWave* pWave, WAVEHDR* pHdr); 
 
// Implementation 
public: 
    virtual ~CWaveOutDevice(); 
 
private: 
    HWAVEOUT m_hOutDev;             // Output device handle 
    int m_iBlockCount;              // Number of blocks in the queue 
    CWaveDevWnd* m_pCallbackWnd;    // Pointer to callback window 
 
}; 
 
// some global items 
extern CWaveOutDevice theDefaultWaveOutDevice; 
 
///////////////////////////////////////////////////////////////////////////// 
#endif // __WAVEODEV__