From dd4d116e00ef2485191e058d29415e4a372b9195 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 28 Apr 2004 03:57:50 +0000 Subject: [PATCH] Set a rapid fall off rate for interior cockpit sounds so they won't be heard from the tower view. --- src/Sound/beacon.cxx | 6 ++++++ src/Sound/morse.cxx | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/Sound/beacon.cxx b/src/Sound/beacon.cxx index 6fad631e5..24424c14a 100644 --- a/src/Sound/beacon.cxx +++ b/src/Sound/beacon.cxx @@ -52,6 +52,8 @@ bool FGBeacon::init() { } inner = new SGSoundSample( inner_buf, INNER_SIZE, BYTES_PER_SECOND ); + inner->set_reference_dist( 10.0 ); + inner->set_max_dist( 20.0 ); // Make middle marker beacon sound len= (int)(MIDDLE_DIT_LEN / 2.0 ); @@ -70,6 +72,8 @@ bool FGBeacon::init() { memcpy( ptr, middle_dah, MIDDLE_DAH_LEN ); middle = new SGSoundSample( middle_buf, MIDDLE_SIZE, BYTES_PER_SECOND ); + middle->set_reference_dist( 10.0 ); + middle->set_max_dist( 20.0 ); // Make outer marker beacon sound len= (int)(OUTER_DAH_LEN * 3.0 / 4.0 ); @@ -83,6 +87,8 @@ bool FGBeacon::init() { memcpy( ptr, outer_dah, OUTER_DAH_LEN ); outer = new SGSoundSample( outer_buf, OUTER_SIZE, BYTES_PER_SECOND ); + outer->set_reference_dist( 10.0 ); + outer->set_max_dist( 20.0 ); return true; } diff --git a/src/Sound/morse.cxx b/src/Sound/morse.cxx index ef0b43fa7..d2f9fc639 100644 --- a/src/Sound/morse.cxx +++ b/src/Sound/morse.cxx @@ -262,6 +262,8 @@ SGSoundSample *FGMorse::make_ident( const string& id, const int freq ) { // 4. create the simple sound and return SGSoundSample *sample = new SGSoundSample( buffer, length, BYTES_PER_SECOND ); + sample->set_reference_dist( 10.0 ); + sample->set_max_dist( 20.0 ); return sample; } -- 2.39.5