TORCS  1.3.9
The Open Racing Car Simulator
OpenALMusicPlayer Class Reference

#include <OpenALMusicPlayer.h>

Collaboration diagram for OpenALMusicPlayer:

Public Member Functions

 OpenALMusicPlayer (SoundStream *soundStream)
 
virtual ~OpenALMusicPlayer ()
 
virtual void start ()
 
virtual void stop ()
 
virtual void rewind ()
 
virtual bool playAndManageBuffer ()
 

Protected Member Functions

virtual bool initContext ()
 
virtual bool initBuffers ()
 
virtual bool initSource ()
 
virtual bool check ()
 
virtual bool startPlayback ()
 
virtual bool isPlaying ()
 
virtual bool streamBuffer (ALuint buffer)
 

Protected Attributes

ALCdevice * device
 
ALCcontext * context
 
ALuint source
 
ALuint buffers [2]
 
SoundStreamstream
 
bool ready
 

Static Protected Attributes

static const int BUFFERSIZE = 4096*64
 

Detailed Description

Definition at line 27 of file OpenALMusicPlayer.h.

Constructor & Destructor Documentation

◆ OpenALMusicPlayer()

OpenALMusicPlayer::OpenALMusicPlayer ( SoundStream soundStream)

Definition at line 26 of file OpenALMusicPlayer.cpp.

◆ ~OpenALMusicPlayer()

OpenALMusicPlayer::~OpenALMusicPlayer ( )
virtual

Definition at line 40 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ check()

bool OpenALMusicPlayer::check ( )
protectedvirtual

Definition at line 135 of file OpenALMusicPlayer.cpp.

◆ initBuffers()

bool OpenALMusicPlayer::initBuffers ( )
protectedvirtual

Definition at line 106 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

◆ initContext()

bool OpenALMusicPlayer::initContext ( )
protectedvirtual

Definition at line 82 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

◆ initSource()

bool OpenALMusicPlayer::initSource ( )
protectedvirtual

Definition at line 115 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

◆ isPlaying()

bool OpenALMusicPlayer::isPlaying ( )
protectedvirtual

Definition at line 150 of file OpenALMusicPlayer.cpp.

◆ playAndManageBuffer()

bool OpenALMusicPlayer::playAndManageBuffer ( )
virtual

Definition at line 219 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

◆ rewind()

void OpenALMusicPlayer::rewind ( )
virtual

Definition at line 211 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

◆ start()

void OpenALMusicPlayer::start ( )
virtual

Definition at line 191 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

◆ startPlayback()

bool OpenALMusicPlayer::startPlayback ( )
protectedvirtual

Definition at line 253 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

◆ stop()

void OpenALMusicPlayer::stop ( )
virtual

Definition at line 50 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

◆ streamBuffer()

bool OpenALMusicPlayer::streamBuffer ( ALuint  buffer)
protectedvirtual

Definition at line 160 of file OpenALMusicPlayer.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ buffers

ALuint OpenALMusicPlayer::buffers[2]
protected

Definition at line 50 of file OpenALMusicPlayer.h.

◆ BUFFERSIZE

const int OpenALMusicPlayer::BUFFERSIZE = 4096*64
staticprotected

Definition at line 54 of file OpenALMusicPlayer.h.

◆ context

ALCcontext* OpenALMusicPlayer::context
protected

Definition at line 48 of file OpenALMusicPlayer.h.

◆ device

ALCdevice* OpenALMusicPlayer::device
protected

Definition at line 47 of file OpenALMusicPlayer.h.

◆ ready

bool OpenALMusicPlayer::ready
protected

Definition at line 53 of file OpenALMusicPlayer.h.

◆ source

ALuint OpenALMusicPlayer::source
protected

Definition at line 49 of file OpenALMusicPlayer.h.

◆ stream

SoundStream* OpenALMusicPlayer::stream
protected

Definition at line 52 of file OpenALMusicPlayer.h.


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