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

RageSound Class Reference

#include <RageSound.h>

Inheritance diagram for RageSound:

Inheritance graph
[legend]
Collaboration diagram for RageSound:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RageSound ()
 ~RageSound ()
 RageSound (const RageSound &cpy)
RageSoundoperator= (const RageSound &cpy)
bool Load (CString fn, int precache=2)
void LoadSoundReader (SoundReader *pSound)
void Unload ()
bool IsLoaded () const
void StartPlaying ()
void StopPlaying ()
CString GetError () const
bool Error () const
RageSoundPlay (const RageSoundParams *params=NULL)
void Stop ()
float GetLengthSeconds ()
float GetPositionSeconds (bool *approximate=NULL, RageTimer *Timestamp=NULL) const
int GetSampleRate () const
bool IsStreamingFromDisk () const
bool SetPositionSeconds (float fSeconds)
CString GetLoadedFilePath () const
bool IsPlaying () const
void LockSound ()
void UnlockSound ()
float GetPlaybackRate () const
RageTimer GetStartTime () const
float GetVolume () const
int GetID () const
void SetParams (const RageSoundParams &p)
const RageSoundParamsGetParams () const
int GetPCM (char *buffer, int size, int64_t frameno)
bool GetDataToPlay (int16_t *buffer, int size, int &pos, int &got_bytes)
void CommitPlayingPosition (int64_t frameno, int pos, int got_bytes)

Private Member Functions

int FillBuf (int bytes)
int64_t GetPositionSecondsInternal (bool *approximate=NULL) const
bool SetPositionFrames (int frames=-1)
int GetData (char *buffer, int size)
void Fail (CString reason)
int Bytes_Available () const
RageSoundParams::StopMode_t GetStopMode () const
void SoundIsFinishedPlaying ()

Static Private Member Functions

void RateChange (char *buf, int &cnt, int speed_input_samples, int speed_output_samples, int channels)

Private Attributes

RageMutex m_Mutex
SoundReaderSample
CircBuf< char > databuf
pos_map_queue pos_map
CString m_sFilePath
RageSoundParams m_Param
int decode_position
int stopped_position
bool playing
int64_t max_driver_frame
int ID
CString error

Constructor & Destructor Documentation

RageSound::RageSound  ) 
 

RageSound::~RageSound  ) 
 

RageSound::RageSound const RageSound cpy  ) 
 


Member Function Documentation

int RageSound::Bytes_Available  )  const [private]
 

void RageSound::CommitPlayingPosition int64_t  frameno,
int  pos,
int  got_bytes
 

bool RageSound::Error  )  const [inline]
 

void RageSound::Fail CString  reason  )  [private]
 

int RageSound::FillBuf int  bytes  )  [private]
 

int RageSound::GetData char *  buffer,
int  size
[private]
 

bool RageSound::GetDataToPlay int16_t *  buffer,
int  size,
int pos,
int got_bytes
[virtual]
 

Implements RageSoundBase.

CString RageSound::GetError  )  const [inline]
 

int RageSound::GetID  )  const [inline, virtual]
 

Implements RageSoundBase.

float RageSound::GetLengthSeconds  ) 
 

CString RageSound::GetLoadedFilePath  )  const [inline, virtual]
 

Implements RageSoundBase.

const RageSoundParams& RageSound::GetParams  )  const [inline]
 

int RageSound::GetPCM char *  buffer,
int  size,
int64_t  frameno
[virtual]
 

Implements RageSoundBase.

float RageSound::GetPlaybackRate  )  const
 

float RageSound::GetPositionSeconds bool *  approximate = NULL,
RageTimer Timestamp = NULL
const
 

int64_t RageSound::GetPositionSecondsInternal bool *  approximate = NULL  )  const [private]
 

int RageSound::GetSampleRate  )  const [virtual]
 

Implements RageSoundBase.

RageTimer RageSound::GetStartTime  )  const [virtual]
 

Reimplemented from RageSoundBase.

RageSoundParams::StopMode_t RageSound::GetStopMode  )  const [private]
 

float RageSound::GetVolume  )  const [virtual]
 

Implements RageSoundBase.

bool RageSound::IsLoaded  )  const
 

bool RageSound::IsPlaying  )  const [inline]
 

bool RageSound::IsStreamingFromDisk  )  const [virtual]
 

Implements RageSoundBase.

bool RageSound::Load CString  fn,
int  precache = 2
 

void RageSound::LoadSoundReader SoundReader pSound  ) 
 

void RageSound::LockSound  ) 
 

RageSound & RageSound::operator= const RageSound cpy  ) 
 

RageSound * RageSound::Play const RageSoundParams params = NULL  ) 
 

void RageSound::RateChange char *  buf,
int cnt,
int  speed_input_samples,
int  speed_output_samples,
int  channels
[static, private]
 

void RageSound::SetParams const RageSoundParams p  ) 
 

bool RageSound::SetPositionFrames int  frames = -1  )  [private]
 

bool RageSound::SetPositionSeconds float  fSeconds  ) 
 

void RageSound::SoundIsFinishedPlaying  )  [private, virtual]
 

Implements RageSoundBase.

void RageSound::StartPlaying  ) 
 

void RageSound::Stop  ) 
 

void RageSound::StopPlaying  ) 
 

void RageSound::Unload  ) 
 

void RageSound::UnlockSound  ) 
 


Member Data Documentation

CircBuf<char> RageSound::databuf [private]
 

int RageSound::decode_position [private]
 

CString RageSound::error [private]
 

int RageSound::ID [private]
 

RageMutex RageSound::m_Mutex [mutable, private]
 

RageSoundParams RageSound::m_Param [private]
 

CString RageSound::m_sFilePath [private]
 

int64_t RageSound::max_driver_frame [mutable, private]
 

bool RageSound::playing [private]
 

pos_map_queue RageSound::pos_map [private]
 

SoundReader* RageSound::Sample [private]
 

int RageSound::stopped_position [private]
 


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