Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

DSoundBuf Class Reference

#include <DSoundHelpers.h>

List of all members.

Public Types

enum  hw { HW_HARDWARE, HW_SOFTWARE, HW_DONT_CARE }
enum  { DYNAMIC_SAMPLERATE = -1 }

Public Member Functions

 DSoundBuf ()
CString Init (DSound &ds, hw hardware, int channels, int samplerate, int samplebits, int writeahead)
bool get_output_buf (char **buffer, unsigned *bufsiz, int chunksize)
void release_output_buf (char *buffer, unsigned bufsiz)
void Play ()
void Stop ()
void SetVolume (float vol)
void SetSampleRate (int hz)
int GetSampleRate ()
 ~DSoundBuf ()
int64_t GetPosition () const
int64_t GetOutputPosition () const

Private Member Functions

int buffersize_frames () const
int bytes_per_frame () const
void CheckWriteahead (int cursorstart, int cursorend)
void CheckUnderrun (int cursorstart, int cursorend)

Private Attributes

IDirectSoundBuffer * buf
int channels
int samplerate
int samplebits
int writeahead
int volume
int buffersize
int write_cursor
int buffer_bytes_filled
int extra_writeahead
int64_t write_cursor_pos
int64_t LastPosition
bool playing
bool buffer_locked
char * locked_buf1
char * locked_buf2
int locked_size1
int locked_size2
char * temp_buffer
int last_cursors [4][2]


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
DYNAMIC_SAMPLERATE 

enum DSoundBuf::hw
 

Enumeration values:
HW_HARDWARE 
HW_SOFTWARE 
HW_DONT_CARE 


Constructor & Destructor Documentation

DSoundBuf::DSoundBuf  ) 
 

DSoundBuf::~DSoundBuf  ) 
 


Member Function Documentation

int DSoundBuf::buffersize_frames  )  const [inline, private]
 

int DSoundBuf::bytes_per_frame  )  const [inline, private]
 

void DSoundBuf::CheckUnderrun int  cursorstart,
int  cursorend
[private]
 

void DSoundBuf::CheckWriteahead int  cursorstart,
int  cursorend
[private]
 

bool DSoundBuf::get_output_buf char **  buffer,
unsigned *  bufsiz,
int  chunksize
 

int64_t DSoundBuf::GetOutputPosition  )  const [inline]
 

int64_t DSoundBuf::GetPosition  )  const
 

int DSoundBuf::GetSampleRate  )  [inline]
 

CString DSoundBuf::Init DSound ds,
hw  hardware,
int  channels,
int  samplerate,
int  samplebits,
int  writeahead
 

void DSoundBuf::Play  ) 
 

void DSoundBuf::release_output_buf char *  buffer,
unsigned  bufsiz
 

void DSoundBuf::SetSampleRate int  hz  ) 
 

void DSoundBuf::SetVolume float  vol  ) 
 

void DSoundBuf::Stop  ) 
 


Member Data Documentation

IDirectSoundBuffer* DSoundBuf::buf [private]
 

int DSoundBuf::buffer_bytes_filled [private]
 

bool DSoundBuf::buffer_locked [private]
 

int DSoundBuf::buffersize [private]
 

int DSoundBuf::channels [private]
 

int DSoundBuf::extra_writeahead [private]
 

int DSoundBuf::last_cursors[4][2] [private]
 

int64_t DSoundBuf::LastPosition [mutable, private]
 

char* DSoundBuf::locked_buf1 [private]
 

char * DSoundBuf::locked_buf2 [private]
 

int DSoundBuf::locked_size1 [private]
 

int DSoundBuf::locked_size2 [private]
 

bool DSoundBuf::playing [private]
 

int DSoundBuf::samplebits [private]
 

int DSoundBuf::samplerate [private]
 

char* DSoundBuf::temp_buffer [private]
 

int DSoundBuf::volume [private]
 

int DSoundBuf::write_cursor [private]
 

int64_t DSoundBuf::write_cursor_pos [private]
 

int DSoundBuf::writeahead [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Jan 27 20:59:01 2005 for StepMania by doxygen 1.3.7