Public Member Functions | Private Member Functions | Private Attributes | Friends

sound::SoundPLIB Class Reference

Sound class based on PLIB. More...

#include <_src_sound_sound_plib.hh>

Inheritance diagram for sound::SoundPLIB:
sound::SoundBase

List of all members.

Public Member Functions

 DEFINE_GetInstance (SoundPLIB) virtual bool Enable(const bool enable
virtual bool IfEnabled (void)
virtual fp GetVolume (void)
virtual bool SetVolume (const fp volume)

Private Member Functions

 SoundPLIB (void)
virtual ~SoundPLIB ()
virtual shptr< SampleCreateSample (const Sample::Name &sampleName)
void Pulse (void)
void EnqueueZombieSample (slSample *zombie)

Private Attributes

CLASS_VAR SoundPLIBmsInstance
 Timer-tick.
bool mEnabled
bool mWasEnabled
fp mVolume
 master volume
shptr< TickFunctor > mTickFunctor
 to pulse PLIB
slScheduler * mSched
 PLIB.
smMixer * mMixer
 PLIB.
std::set< slSample * > mZombieSamples
 samples that were discarded after changing volume (yuck)

Friends

class SamplePLIB

Detailed Description

Sound class based on PLIB.

Changing the volume of a PLIB sample should be considered a slow operation.

Gory details of PLIB code is better structured by making Sample mostly private to Sound, but letting Sample have full access to Sound.


Constructor & Destructor Documentation

sound::SoundPLIB::SoundPLIB ( void   )  [private]

ctor/dtor.

sound::SoundPLIB::~SoundPLIB (  )  [private, virtual]

Member Function Documentation

shptr< Sample > sound::SoundPLIB::CreateSample ( const Sample::Name sampleName  )  [private, virtual]

Create specific Sample object (this is called by SoundBase).

Implements sound::SoundBase.

sound::SoundPLIB::DEFINE_GetInstance ( SoundPLIB   )  const
void sound::SoundPLIB::EnqueueZombieSample ( slSample *  zombie  )  [private]

Enqueue a zombie sample (possibly still playing).

fp sound::SoundPLIB::GetVolume ( void   )  [virtual]
Returns:
Master volume.

Implements sound::SoundBase.

virtual bool sound::SoundPLIB::IfEnabled ( void   )  [inline, virtual]

Implements sound::SoundBase.

void sound::SoundPLIB::Pulse ( void   )  [private]
bool sound::SoundPLIB::SetVolume ( const fp  volume  )  [virtual]

Set volume (for all samples).

Implements sound::SoundBase.


Friends And Related Function Documentation

friend class SamplePLIB [friend]

Member Data Documentation

smMixer* sound::SoundPLIB::mMixer [private]

PLIB.

slScheduler* sound::SoundPLIB::mSched [private]

PLIB.

Timer-tick.

shptr<TickFunctor> sound::SoundPLIB::mTickFunctor [private]

to pulse PLIB

master volume

std::set<slSample*> sound::SoundPLIB::mZombieSamples [private]

samples that were discarded after changing volume (yuck)


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:12