int len;
unsigned char *ptr;
+ if (globals->get_soundmgr()->is_working() == false) {
+ return false;
+ }
+
unsigned char inner_buf[ INNER_SIZE ] ;
unsigned char middle_buf[ MIDDLE_SIZE ] ;
unsigned char outer_buf[ OUTER_SIZE ] ;
void
FGFX::play_message( const string path, const string fname, double volume )
{
- if (globals->get_soundmgr()->is_working() == false) {
- return;
+ if (globals->get_soundmgr()->is_working() == true) {
+ SGSoundSample *sample;
+ sample = new SGSoundSample( path.c_str(), fname.c_str() );
+ sample->set_volume( volume );
+ play_message( sample );
}
- SGSoundSample *sample;
- sample = new SGSoundSample( path.c_str(), fname.c_str() );
- sample->set_volume( volume );
- play_message( sample );
}
void
// make a SGSoundSample morse code transmission for the specified string
SGSoundSample *FGMorse::make_ident( const string& id, const int freq ) {
+
+ if (globals->get_soundmgr()->is_working() == false) {
+ return 0;
+ }
+
char *idptr = (char *)id.c_str();
int length = 0;