]> git.mxchange.org Git - flightgear.git/commitdiff
Set a rapid fall off rate for interior cockpit sounds so they won't be heard
authorcurt <curt>
Wed, 28 Apr 2004 03:57:50 +0000 (03:57 +0000)
committercurt <curt>
Wed, 28 Apr 2004 03:57:50 +0000 (03:57 +0000)
from the tower view.

src/Sound/beacon.cxx
src/Sound/morse.cxx

index 6fad631e581a69a0e4d9a331f50eadaaf9f6ba0a..24424c14a033ce8e4ad68addbaa1f96bcdfd3539 100644 (file)
@@ -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;
 }
index ef0b43fa7da6ec1fccbdb0f5314c25e16ba2db0d..d2f9fc639017125413642faf26147a3d0f2d87e4 100644 (file)
@@ -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;
 }