]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/mk_viii.cxx
Merge branch 'maint'
[flightgear.git] / src / Instrumentation / mk_viii.cxx
index 3cdc6e3ef354855c0900508f87ddaa75fbcd79c8..a3073136a713076b46d5c5befa365d1759f1ac39 100755 (executable)
@@ -2106,32 +2106,17 @@ MK_VIII::VoicePlayer::Speaker::bind (SGPropertyNode *node)
   // uses xmlsound property names
   tie(node, "volume", &volume);
   tie(node, "pitch", &pitch);
-  tie(node, "position/x", &position[0]);
-  tie(node, "position/y", &position[1]);
-  tie(node, "position/z", &position[2]);
-  tie(node, "orientation/x", &orientation[0]);
-  tie(node, "orientation/y", &orientation[1]);
-  tie(node, "orientation/z", &orientation[2]);
-  tie(node, "orientation/inner-cone", &inner_cone);
-  tie(node, "orientation/outer-cone", &outer_cone);
-  tie(node, "reference-dist", &reference_dist);
-  tie(node, "max-dist", &max_dist);
 }
 
 void
 MK_VIII::VoicePlayer::Speaker::update_configuration ()
 {
-  map<string, SGSoundSample *>::iterator iter;
+  map< string, SGSharedPtr<SGSoundSample> >::iterator iter;
   for (iter = player->samples.begin(); iter != player->samples.end(); iter++)
     {
       SGSoundSample *sample = (*iter).second;
 
       sample->set_pitch(pitch);
-      sample->set_base_position(position); // TODO: tie to listener pos
-      sample->set_orientation(orientation);
-      sample->set_audio_cone(inner_cone, outer_cone, outer_gain);
-      sample->set_reference_dist(reference_dist);
-      sample->set_max_dist(max_dist);
     }
 
   if (player->voice)
@@ -2215,8 +2200,9 @@ MK_VIII::VoicePlayer::init ()
 {
 #define STDPAUSE 0.75  // [SPEC] 6.4.4: "the standard 0.75 second delay"
 
-  SGSoundMgr *smgr = (SGSoundMgr *)globals->get_subsystem("soundmgr");
+  SGSoundMgr *smgr = globals->get_soundmgr();
   _sgr = smgr->find("avionics", true);
+  _sgr->tie_to_listener();
 
   make_voice(&voices.application_data_base_failed, "application-data-base-failed");
   make_voice(&voices.bank_angle, "bank-angle");