// 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)
{
#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");