// OggPlayer.h: interface for the COggPlayer class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_OGGPLAYER_H__E009DAEA_B943_4ACE_A592_DE2555A6EEA3__INCLUDED_)
#define AFX_OGGPLAYER_H__E009DAEA_B943_4ACE_A592_DE2555A6EEA3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vorbis/vorbisfile.h>

#define NUM_BLOCKS 4

class COggPlayer  
{
public:
	COggPlayer();
	virtual ~COggPlayer();

	BOOL oggplayer_initialize(TCHAR *filename);
	BOOL oggplayer_cleanup();
	DWORD WINAPI oggplayer_threadloop(LPVOID);
	void oggplayer_streamsound();
	void oggplayer_silent();
	Play(TCHAR *pFilename);
	void Stop();
	void Pause();
	void UnPause();



int                 PollSleep;
bool				Initialized;
bool				Freeze;
bool				DoNextAfterPlay;
bool				CompleteStop;
bool                Running;
bool				StopPolling;
bool				StopPolling2;
bool				Prepared[NUM_BLOCKS];
short				pcmout[NUM_BLOCKS][16384];
char				*pcmpoint;
WAVEFORMATEX		wf;
HWAVEOUT			hwo;
HANDLE				hDoneEvent;
WAVEHDR				whdr[NUM_BLOCKS];

HANDLE				hFile;
TCHAR				fileName[MAX_PATH];
OggVorbis_File		vf;
int					eof;
int					current_section;


};

#endif // !defined(AFX_OGGPLAYER_H__E009DAEA_B943_4ACE_A592_DE2555A6EEA3__INCLUDED_)
