// cout << "not picking up vor. :-(" << endl;
}
+#ifdef ENABLE_AUDIO_SUPPORT
if ( nav1_valid && nav1_inrange ) {
// play station ident via audio system if on + ident,
// otherwise turn it off
globals->get_soundmgr()->stop( "nav1-dme-ident" );
}
}
+#endif
if ( nav2_valid ) {
station = Point3D( nav2_x, nav2_y, nav2_z );
// cout << "not picking up vor. :-(" << endl;
}
+#ifdef ENABLE_AUDIO_SUPPORT
if ( nav2_valid && nav2_inrange ) {
// play station ident via audio system if on + ident,
// otherwise turn it off
globals->get_soundmgr()->stop( "nav2-dme-ident" );
}
}
+#endif
// adf
if ( adf_valid ) {
adf_inrange = false;
}
+#ifdef ENABLE_AUDIO_SUPPORT
if ( adf_valid && adf_inrange ) {
// play station ident via audio system if on + ident,
// otherwise turn it off
globals->get_soundmgr()->stop( "adf-ident" );
}
}
+#endif
// marker beacon blinking
bool light_on = ( outer_blink || middle_blink || inner_blink );
nav1_dme_y = ils.get_dme_y();
nav1_dme_z = ils.get_dme_z();
+#ifdef ENABLE_AUDIO_SUPPORT
if ( globals->get_soundmgr()->exists( "nav1-vor-ident" ) ) {
globals->get_soundmgr()->remove( "nav1-vor-ident" );
}
// << " nav1_last_time = " << nav1_last_time
// << " current time = "
// << globals->get_time_params()->get_cur_time() << endl;
+#endif
// cout << "Found an ils station in range" << endl;
// cout << " id = " << ils.get_locident() << endl;
nav1_y = nav1_dme_y = nav.get_y();
nav1_z = nav1_dme_z = nav.get_z();
+#ifdef ENABLE_AUDIO_SUPPORT
if ( globals->get_soundmgr()->exists( "nav1-vor-ident" ) ) {
globals->get_soundmgr()->remove( "nav1-vor-ident" );
}
// << nav1_play_count << " nav1_last_time = "
// << nav1_last_time << " current time = "
// << globals->get_time_params()->get_cur_time() << endl;
+#endif
// cout << "Found a vor station in range" << endl;
// cout << " id = " << nav.get_ident() << endl;
nav1_dme_dist = 0;
nav1_trans_ident = "";
last_nav1_ident = "";
+#ifdef ENABLE_AUDIO_SUPPORT
globals->get_soundmgr()->remove( "nav1-vor-ident" );
globals->get_soundmgr()->remove( "nav1-dme-ident" );
+#endif
// cout << "not picking up vor1. :-(" << endl;
}
nav2_dme_y = ils.get_dme_y();
nav2_dme_z = ils.get_dme_z();
+#ifdef ENABLE_AUDIO_SUPPORT
if ( globals->get_soundmgr()->exists( "nav2-vor-ident" ) ) {
globals->get_soundmgr()->remove( "nav2-vor-ident" );
}
// << nav2_play_count << " nav2_last_time = "
// << nav2_last_time << " current time = "
// << globals->get_time_params()->get_cur_time() << endl;
+#endif
// cout << "Found an ils station in range" << endl;
// cout << " id = " << ils.get_locident() << endl;
nav2_y = nav2_dme_y = nav.get_y();
nav2_z = nav2_dme_z = nav.get_z();
+#ifdef ENABLE_AUDIO_SUPPORT
if ( globals->get_soundmgr()->exists( "nav2-vor-ident" ) ) {
globals->get_soundmgr()->remove( "nav2-vor-ident" );
}
// << nav2_play_count << " nav2_last_time = "
// << nav2_last_time << " current time = "
// << globals->get_time_params()->get_cur_time() << endl;
+#endif
// cout << "Found a vor station in range" << endl;
// cout << " id = " << nav.get_ident() << endl;
nav2_dme_dist = 0;
nav2_trans_ident = "";
last_nav2_ident = "";
+#ifdef ENABLE_AUDIO_SUPPORT
globals->get_soundmgr()->remove( "nav2-vor-ident" );
globals->get_soundmgr()->remove( "nav2-dme-ident" );
+#endif
// cout << "not picking up vor1. :-(" << endl;
}
if ( beacon_type == FGMkrBeacon::OUTER ) {
outer_marker = true;
// cout << "OUTER MARKER" << endl;
+#ifdef ENABLE_AUDIO_SUPPORT
if ( last_beacon != FGMkrBeacon::OUTER ) {
if ( ! globals->get_soundmgr()->exists( "outer-marker" ) ) {
FGSimpleSound *sound = beacon.get_outer();
globals->get_soundmgr()->play_looped( "outer-marker" );
}
}
+#endif
} else if ( beacon_type == FGMkrBeacon::MIDDLE ) {
middle_marker = true;
// cout << "MIDDLE MARKER" << endl;
+#ifdef ENABLE_AUDIO_SUPPORT
if ( last_beacon != FGMkrBeacon::MIDDLE ) {
if ( ! globals->get_soundmgr()->exists( "middle-marker" ) ) {
FGSimpleSound *sound = beacon.get_middle();
globals->get_soundmgr()->play_looped( "middle-marker" );
}
}
+#endif
} else if ( beacon_type == FGMkrBeacon::INNER ) {
inner_marker = true;
// cout << "INNER MARKER" << endl;
+#ifdef ENABLE_AUDIO_SUPPORT
if ( last_beacon != FGMkrBeacon::INNER ) {
if ( ! globals->get_soundmgr()->exists( "inner-marker" ) ) {
FGSimpleSound *sound = beacon.get_inner();
globals->get_soundmgr()->play_looped( "inner-marker" );
}
}
+#endif
} else {
// cout << "no marker" << endl;
+#ifdef ENABLE_AUDIO_SUPPORT
globals->get_soundmgr()->stop( "outer-marker" );
globals->get_soundmgr()->stop( "middle-marker" );
globals->get_soundmgr()->stop( "inner-marker" );
+#endif
}
last_beacon = beacon_type;
adf_y = nav.get_y();
adf_z = nav.get_z();
+#ifdef ENABLE_AUDIO_SUPPORT
if ( globals->get_soundmgr()->exists( "adf-ident" ) ) {
globals->get_soundmgr()->remove( "adf-ident" );
}
// << adf_play_count << " adf_last_time = "
// << adf_last_time << " current time = "
// << globals->get_time_params()->get_cur_time() << endl;
+#endif
// cout << "Found an adf station in range" << endl;
// cout << " id = " << nav.get_ident() << endl;
adf_valid = false;
adf_ident = "";
adf_trans_ident = "";
+#ifdef ENABLE_AUDIO_SUPPORT
globals->get_soundmgr()->remove( "adf-ident" );
+#endif
last_adf_ident = "";
// cout << "not picking up adf. :-(" << endl;
}