- }
- }
- if ( audio_btn->getBoolValue() ) {
- if ( !globals->get_soundmgr()->is_playing("inner-marker") ) {
- globals->get_soundmgr()->play_looped( "inner-marker" );
+ } else {
+ _sgr->stop( current_sound_name );
+ }
+ } else if ( beacon_type == INNER ) {
+ inner_marker = true;
+ current_sound_name = "inner-marker";
+ // cout << "INNER MARKER" << endl;
+ if ( last_beacon != INNER ) {
+ if ( ! _sgr->exists( current_sound_name ) ) {
+ SGSoundSample *sound = FGBeacon::instance()->get_inner();
+ if ( sound ) {
+ _sgr->add( sound, current_sound_name );
+ }
+ }
+ }
+ if ( audio_btn->getBoolValue() ) {
+ if ( !_sgr->is_playing(current_sound_name) ) {
+ _sgr->play_looped( current_sound_name );
+ }
+ } else {
+ _sgr->stop( current_sound_name );