#ifndef NATIVE_SOUND_INCLUDED
#define NATIVE_SOUND_INCLUDED
#ifdef SOUND
#include "../sndmix.h"
#include "../stdafx.h"
/* The Win32 code does not use polling, so it is inlined to nothing. */
inline void PollSound() {}
class NativeSoundMix : public CSoundMix
{
public:
virtual void NativeConstruct();
virtual void NativeDestruct();
virtual void EnterCritical();
virtual void LeaveCritical();
virtual void BuildAndWrite( WaveHeader* hdr, BOOL silence );
virtual void GetNativeSoundCap( S32* format );
virtual BOOL OpenNativeDevice( CSound* format );
virtual void BuffersReady();
virtual void BuffersUpdated();
virtual void CloseNativeDevice();
virtual BOOL IsDeviceOpen() { return isOpen; }
//------------ Win32 Code -----------------------//
void DoPlay();
HANDLE GetPlayEvent() { return playEvent; }
private:
// Windows support
HWAVEOUT hWaveOut;
WAVEHDR waveHDR[MAX_SOUND_BUFFERS];
CRITICAL_SECTION playLock;
HANDLE playThread;
HANDLE playEvent;
BOOL isOpen;
};
// extern NativeSoundMix theSoundMix;
#endif
#endif