X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fsound%2Fxmlsound.cxx;h=479e312361d34c7bd631e1266a7034f6f2cf4a0a;hb=6cd8db7b28b675f75ab22c2073832980d9f8d6a4;hp=7fa893d8b78bc4742b552752c72fa8abc864b06c;hpb=59df72c4b07bb7873f39f9a7b4ce1948c52e550a;p=simgear.git diff --git a/simgear/sound/xmlsound.cxx b/simgear/sound/xmlsound.cxx index 7fa893d8..479e3123 100644 --- a/simgear/sound/xmlsound.cxx +++ b/simgear/sound/xmlsound.cxx @@ -174,9 +174,10 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node, } - float reference_dist = node->getDoubleValue("reference-dist", 500.0); - float max_dist = node->getDoubleValue("max-dist", 3000.0); - + // rule of thumb: make reference distance a 100th of the maximum distance. + float reference_dist = node->getDoubleValue("reference-dist", 60.0); + float max_dist = node->getDoubleValue("max-dist", 6000.0); + // // set pitch properties // @@ -236,7 +237,7 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node, SGPropertyNode_ptr prop = node->getChild("position"); if ( prop != NULL ) { offset_pos[0] = -prop->getDoubleValue("x", 0.0); - offset_pos[1] = prop->getDoubleValue("y", 0.0); + offset_pos[1] = -prop->getDoubleValue("y", 0.0); offset_pos[2] = -prop->getDoubleValue("z", 0.0); } @@ -250,7 +251,7 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node, prop = node->getChild("orientation"); if ( prop != NULL ) { dir = SGVec3f(-prop->getFloatValue("x", 0.0), - prop->getFloatValue("y", 0.0), + -prop->getFloatValue("y", 0.0), -prop->getFloatValue("z", 0.0)); inner = prop->getFloatValue("inner-angle", 360.0); outer = prop->getFloatValue("outer-angle", 360.0);