FGFX *fx = (FGFX *)globals->get_subsystem("fx");
string path = arg->getStringValue("path");
string file = arg->getStringValue("file");
+ double volume = arg->getDoubleValue("volume");
// cout << "playing " << path << " / " << file << endl;
- fx->play_message( path, file );
+ fx->play_message( path, file, volume );
return true;
}
void
FGFX::play_message( SGSoundSample *_sample )
{
- _sample->set_volume( 1.0 );
_samplequeue.push( _sample );
}
void
-FGFX::play_message( const string path, const string fname )
+FGFX::play_message( const string path, const string fname, double volume )
{
if (globals->get_soundmgr()->is_working() == false) {
return;
}
SGSoundSample *sample;
sample = new SGSoundSample( path.c_str(), fname.c_str() );
+ sample->set_volume( volume );
play_message( sample );
}
* in order.
*/
void play_message( SGSoundSample *_sample );
- void play_message( const string path, const string fname );
+ void play_message( const string path, const string fname, double volume );
private: