00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013
00014 #ifndef __VELLOCET_AUDOUTWO_H
00015 #define __VELLOCET_AUDOUTWO_H
00016
00017 #include "AudOut.h"
00018
00020
00021 class CAudOutWO : public CAudOut
00022 {
00023
00024
00025 private:
00026
00027
00028 protected:
00029 HANDLE m_hNextAudio;
00030 DWORD m_dwCurBuffer;
00031 DWORD m_dwPlaBuffer;
00032 WAVEOUTCAPS *m_pWaveOutCaps;
00033 HWAVEOUT m_hwo;
00034 WAVEHDR *m_pwhdr;
00035 void **m_ppBuffer;
00036
00037 public:
00038
00039
00040
00041
00042 private:
00043
00044
00045 protected:
00046 static void __cdecl AudioThread (void* pThis);
00047 bool Close (void);
00048 void DoNextBuffer (void);
00049 bool FreeBuffers (void);
00050 bool Open (short iDevID);
00051 bool ProcessMMReturn (MMRESULT r);
00052
00053 static void CALLBACK waveOutProc (HWAVEOUT hwo, UINT uMsg,
00054 DWORD dwInstance,
00055 DWORD dwParam1, DWORD dwParam2);
00056
00057
00058 public:
00059 CAudOutWO();
00060 ~CAudOutWO();
00061
00062 bool Initialise (void (*GenAudio)(float**, DWORD, DWORD, DWORD),
00063 DWORD dwGenAudioData);
00064 bool AllocateBuffers (DWORD dwNumBuffers, DWORD dwBufferSize);
00065
00066 char* GetDevName (DWORD n);
00067
00068 bool Start(void);
00069
00070
00071
00072 WAVEOUTCAPS* GetCurDevCaps(void);
00073
00074
00075
00076
00077 bool GetCurDevManufacturer (char* text, long liLen);
00078 CString GetSupportsStr(void);
00079 CString GetFormatsStr(void);
00080
00081
00082 };
00083
00084 #endif
00085