cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osaOpenAL Class Reference

#include <osaOpenAL.h>

Inheritance diagram for osaOpenAL:
cmnGenericObject

Public Types

enum  SoundFormat { MONO8, MONO16, STEREO8, STEREO16 }
 

Public Member Functions

 osaOpenAL ()
 
 ~osaOpenAL ()
 
void Configure (const std::string &CMN_UNUSED(filename))
 
void Startup (void)
 
void Play (void)
 
void Pause (void)
 
void Stop (void)
 
void Run (void)
 
void OpenFile (const mtsStdString &fName)
 
void Seek (const mtsDouble &time)
 
void SetVolume (const mtsDouble &volume)
 
int CalcStreamPos (double time)
 
double GetStartTime ()
 
double GetEndTime ()
 
mtsBool GetIsPlaying ()
 
mtsDouble GetTime ()
 
void GetStreamVolume (mtsDouble &volume)
 
void SaveClip (const std::string &filePathPrefix, double startTime, double endTime)
 
- Public Member Functions inherited from cmnGenericObject
virtual ~cmnGenericObject (void)
 
virtual const
cmnClassServicesBase
Services (void) const =0
 
bool ReconstructFrom (const cmnGenericObject &other)
 
std::string ToString (void) const
 
virtual void ToStream (std::ostream &outputStream) const
 
virtual void ToStreamRaw (std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const
 
virtual bool FromStreamRaw (std::istream &inputStream, const char delimiter= ' ')
 
virtual void SerializeRaw (std::ostream &outputStream) const
 
virtual void DeSerializeRaw (std::istream &inputStream)
 
virtual cmnLogger::StreamBufTypeGetLogMultiplexer (void) const
 
virtual size_t ScalarNumber (void) const
 
virtual bool ScalarNumberIsFixed (void) const
 
virtual double Scalar (const size_t CMN_UNUSED(index)) const throw (std::out_of_range)
 
virtual std::string ScalarDescription (const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const
 

Protected Types

enum  FileType { CAI, WAV }
 

Protected Member Functions

double CalcStreamVolume (int samplePos)
 
double CalcStreamTime (int samplePos)
 
std::string GetALErrorString (ALenum err)
 
bool CheckALError (std::string &error)
 
bool InitOpenAL (void)
 
bool CloseOpenAL (void)
 
void OpenHeaderFile (const std::string &filename, std::ofstream &stream)
 
void CloseHeaderFile (std::ofstream &stream)
 
void WriteToHeaderFile (const double &timestamp, const int bytes, std::ofstream &stream)
 

Protected Attributes

mtsStdString FileName
 
FILE * SoundFile
 
FileType FType
 
char * Data
 
unsigned int NumDataBytes
 
osaOpenALCAIHeaderSoundSettings
 
ALuint SoundBuffer [1]
 
ALuint SoundSource [1]
 
osaOpenALCAIHeaderCAIHeader
 
osaOpenALWAVHeaderWAVHeader
 
mtsDouble Time
 
mtsDouble StartTimeAbsolute
 
mtsDouble LengthInSec
 
mtsBool IsPlaying
 
mtsDouble Volume
 
mtsDouble StreamVolume
 
const osaTimeServerTimeServer
 
ALCdevice * Device
 
ALCcontext * Context
 
mtsFunctionVoid RangeChangedEvent
 
std::vector< double > TimeStamps
 
std::vector< double > SamplePosInBytes
 

Member Enumeration Documentation

enum osaOpenAL::FileType
protected
Enumerator
CAI 
WAV 
Enumerator
MONO8 
MONO16 
STEREO8 
STEREO16 

Constructor & Destructor Documentation

osaOpenAL::osaOpenAL ( )
osaOpenAL::~osaOpenAL ( )

Member Function Documentation

int osaOpenAL::CalcStreamPos ( double  time)
double osaOpenAL::CalcStreamTime ( int  samplePos)
protected
double osaOpenAL::CalcStreamVolume ( int  samplePos)
protected
bool osaOpenAL::CheckALError ( std::string &  error)
protected
void osaOpenAL::CloseHeaderFile ( std::ofstream &  stream)
protected
bool osaOpenAL::CloseOpenAL ( void  )
protected
void osaOpenAL::Configure ( const std::string &  CMN_UNUSEDfilename)
inline
std::string osaOpenAL::GetALErrorString ( ALenum  err)
protected
double osaOpenAL::GetEndTime ( )
mtsBool osaOpenAL::GetIsPlaying ( )
inline
double osaOpenAL::GetStartTime ( )
void osaOpenAL::GetStreamVolume ( mtsDouble volume)
inline
mtsDouble osaOpenAL::GetTime ( )
inline
bool osaOpenAL::InitOpenAL ( void  )
protected
void osaOpenAL::OpenFile ( const mtsStdString fName)
void osaOpenAL::OpenHeaderFile ( const std::string &  filename,
std::ofstream &  stream 
)
protected
void osaOpenAL::Pause ( void  )
void osaOpenAL::Play ( void  )
void osaOpenAL::Run ( void  )
void osaOpenAL::SaveClip ( const std::string &  filePathPrefix,
double  startTime,
double  endTime 
)
void osaOpenAL::Seek ( const mtsDouble time)
void osaOpenAL::SetVolume ( const mtsDouble volume)
void osaOpenAL::Startup ( void  )
void osaOpenAL::Stop ( void  )
void osaOpenAL::WriteToHeaderFile ( const double &  timestamp,
const int  bytes,
std::ofstream &  stream 
)
protected

Member Data Documentation

osaOpenALCAIHeader* osaOpenAL::CAIHeader
protected
ALCcontext* osaOpenAL::Context
protected
char* osaOpenAL::Data
protected
ALCdevice* osaOpenAL::Device
protected
mtsStdString osaOpenAL::FileName
protected
FileType osaOpenAL::FType
protected
mtsBool osaOpenAL::IsPlaying
protected
mtsDouble osaOpenAL::LengthInSec
protected
unsigned int osaOpenAL::NumDataBytes
protected
mtsFunctionVoid osaOpenAL::RangeChangedEvent
protected
std::vector<double> osaOpenAL::SamplePosInBytes
protected
ALuint osaOpenAL::SoundBuffer[1]
protected
FILE* osaOpenAL::SoundFile
protected
osaOpenALCAIHeader* osaOpenAL::SoundSettings
protected
ALuint osaOpenAL::SoundSource[1]
protected
mtsDouble osaOpenAL::StartTimeAbsolute
protected
mtsDouble osaOpenAL::StreamVolume
protected
mtsDouble osaOpenAL::Time
protected
const osaTimeServer* osaOpenAL::TimeServer
protected
std::vector<double> osaOpenAL::TimeStamps
protected
mtsDouble osaOpenAL::Volume
protected
osaOpenALWAVHeader* osaOpenAL::WAVHeader
protected

The documentation for this class was generated from the following file: