FlightGear next
FGVoicePlayer Class Reference

#include <voiceplayer.hxx>

Inherited by MK_VIII::VoicePlayer.

Classes

class  PropertiesHandler
 
class  RawValueMethodsData
 
class  Speaker
 
class  Voice
 

Public Types

enum  { PLAY_NOW = 1 << 0 , PLAY_LOOPED = 1 << 1 }
 
enum  { STOP_NOW = 1 << 0 }
 

Public Member Functions

 FGVoicePlayer (PropertiesHandler *properties_handler, std::string _dev_name)
 
virtual ~FGVoicePlayer ()
 
void init ()
 
void pause ()
 
void resume ()
 
bool is_playing ()
 
void play (Voice *_voice, unsigned int flags=0)
 
void stop (unsigned int flags=0)
 
void set_volume (float _volume)
 
void update ()
 
void bind (SGPropertyNode *node, const char *default_dir_prefix)
 

Public Attributes

struct { 
 
   float   volume 
 
conf 
 
Voicevoice
 
Voicenext_voice
 
bool paused
 
std::string dev_name
 
std::string dir_prefix
 

Protected Member Functions

SGSoundSample * get_sample (const char *name)
 
void append (Voice *voice, Voice::Element *element)
 
void append (Voice *voice, const char *sample_name)
 
void append (Voice *voice, double silence)
 
void make_voice (Voice **voice)
 
template<class T1>
void make_voice (Voice **voice, T1 e1)
 
template<class T1, class T2>
void make_voice (Voice **voice, T1 e1, T2 e2)
 
template<class T1, class T2, class T3>
void make_voice (Voice **voice, T1 e1, T2 e2, T3 e3)
 
template<class T1, class T2, class T3, class T4>
void make_voice (Voice **voice, T1 e1, T2 e2, T3 e3, T4 e4)
 

Protected Attributes

SGSharedPtr< SGSampleGroup > _sgr
 
Speaker speaker
 
std::map< std::string, SGSharedPtr< SGSoundSample > > samples
 
std::vector< Voice * > _voices
 
bool looped
 
bool next_looped
 

Detailed Description

Definition at line 48 of file voiceplayer.hxx.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
STOP_NOW 

Definition at line 240 of file voiceplayer.hxx.

◆ anonymous enum

anonymous enum
Enumerator
PLAY_NOW 
PLAY_LOOPED 

Definition at line 233 of file voiceplayer.hxx.

Constructor & Destructor Documentation

◆ FGVoicePlayer()

FGVoicePlayer::FGVoicePlayer ( PropertiesHandler * properties_handler,
std::string _dev_name )

Definition at line 184 of file voiceplayer.cxx.

◆ ~FGVoicePlayer()

FGVoicePlayer::~FGVoicePlayer ( )
virtual

Definition at line 192 of file voiceplayer.cxx.

Member Function Documentation

◆ append() [1/3]

void FGVoicePlayer::append ( Voice * voice,
const char * sample_name )
protected

Definition at line 344 of file voiceplayer.cxx.

◆ append() [2/3]

void FGVoicePlayer::append ( Voice * voice,
double silence )
inlineprotected

Definition at line 314 of file voiceplayer.hxx.

◆ append() [3/3]

void FGVoicePlayer::append ( Voice * voice,
Voice::Element * element )
inlineprotected

Definition at line 312 of file voiceplayer.hxx.

◆ bind()

void FGVoicePlayer::bind ( SGPropertyNode * node,
const char * default_dir_prefix )

Definition at line 202 of file voiceplayer.cxx.

◆ get_sample()

SGSoundSample * FGVoicePlayer::get_sample ( const char * name)
protected

Definition at line 243 of file voiceplayer.cxx.

◆ init()

void FGVoicePlayer::init ( void )

Definition at line 209 of file voiceplayer.cxx.

◆ is_playing()

bool FGVoicePlayer::is_playing ( )
inline

Definition at line 231 of file voiceplayer.hxx.

◆ make_voice() [1/5]

void FGVoicePlayer::make_voice ( Voice ** voice)
inlineprotected

Definition at line 316 of file voiceplayer.hxx.

◆ make_voice() [2/5]

template<class T1>
void FGVoicePlayer::make_voice ( Voice ** voice,
T1 e1 )
inlineprotected

Definition at line 319 of file voiceplayer.hxx.

◆ make_voice() [3/5]

template<class T1, class T2>
void FGVoicePlayer::make_voice ( Voice ** voice,
T1 e1,
T2 e2 )
inlineprotected

Definition at line 321 of file voiceplayer.hxx.

◆ make_voice() [4/5]

template<class T1, class T2, class T3>
void FGVoicePlayer::make_voice ( Voice ** voice,
T1 e1,
T2 e2,
T3 e3 )
inlineprotected

Definition at line 323 of file voiceplayer.hxx.

◆ make_voice() [5/5]

template<class T1, class T2, class T3, class T4>
void FGVoicePlayer::make_voice ( Voice ** voice,
T1 e1,
T2 e2,
T3 e3,
T4 e4 )
inlineprotected

Definition at line 325 of file voiceplayer.hxx.

◆ pause()

void FGVoicePlayer::pause ( )

Definition at line 218 of file voiceplayer.cxx.

◆ play()

void FGVoicePlayer::play ( Voice * _voice,
unsigned int flags = 0 )

Definition at line 262 of file voiceplayer.cxx.

◆ resume()

void FGVoicePlayer::resume ( )

Definition at line 231 of file voiceplayer.cxx.

◆ set_volume()

void FGVoicePlayer::set_volume ( float _volume)

Definition at line 303 of file voiceplayer.cxx.

◆ stop()

void FGVoicePlayer::stop ( unsigned int flags = 0)

Definition at line 289 of file voiceplayer.cxx.

◆ update()

void FGVoicePlayer::update ( )

Definition at line 311 of file voiceplayer.cxx.

Member Data Documentation

◆ _sgr

SGSharedPtr<SGSampleGroup> FGVoicePlayer::_sgr
protected

Definition at line 301 of file voiceplayer.hxx.

◆ _voices

std::vector<Voice *> FGVoicePlayer::_voices
protected

Definition at line 305 of file voiceplayer.hxx.

◆ [struct]

struct { ... } FGVoicePlayer::conf

◆ dev_name

std::string FGVoicePlayer::dev_name

Definition at line 221 of file voiceplayer.hxx.

◆ dir_prefix

std::string FGVoicePlayer::dir_prefix

Definition at line 222 of file voiceplayer.hxx.

◆ looped

bool FGVoicePlayer::looped
protected

Definition at line 307 of file voiceplayer.hxx.

◆ next_looped

bool FGVoicePlayer::next_looped
protected

Definition at line 308 of file voiceplayer.hxx.

◆ next_voice

Voice* FGVoicePlayer::next_voice

Definition at line 219 of file voiceplayer.hxx.

◆ paused

bool FGVoicePlayer::paused

Definition at line 220 of file voiceplayer.hxx.

◆ samples

std::map< std::string, SGSharedPtr<SGSoundSample> > FGVoicePlayer::samples
protected

Definition at line 304 of file voiceplayer.hxx.

◆ speaker

Speaker FGVoicePlayer::speaker
protected

Definition at line 302 of file voiceplayer.hxx.

◆ voice

Voice* FGVoicePlayer::voice

Definition at line 218 of file voiceplayer.hxx.

◆ volume

float FGVoicePlayer::volume

Definition at line 213 of file voiceplayer.hxx.


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