From: ehofman Date: Tue, 3 Nov 2009 09:59:19 +0000 (+0000) Subject: some small fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b1571e4437696063f9bdc6d2786f2cf626ddd7a1;p=simgear.git some small fixes --- diff --git a/simgear/sound/sample_openal.hxx b/simgear/sound/sample_openal.hxx index 9a4cb06a..d1965601 100644 --- a/simgear/sound/sample_openal.hxx +++ b/simgear/sound/sample_openal.hxx @@ -285,7 +285,7 @@ public: * Set the frequency (in Herz) of this audio sample. * @param freq Frequency */ - inline void set_frequency( int freq ) { _freq = freq; _changed = true; } + inline void set_frequency( int freq ) { _freq = freq; } /** * Returns the frequency (in Herz) of this audio sample. @@ -343,20 +343,18 @@ public: * @param dir Sound emission direction */ inline void set_direction( const SGVec3f& dir ) { - _direction = toVec3d(dir); _changed = true; + _direction = toVec3d(dir); _static_changed = true; } /** * Define the audio cone parameters for directional audio. - * Note: setting it to 1 degree will result in 0.5 degrees to both sides. + * Note: setting it to 2 degree will result in 1 degree to both sides. * @param inner Inner cone angle (0 - 360 degrees) * @param outer Outer cone angle (0 - 360 degrees) * @param gain Remaining gain at the edge of the outer cone (0.0 - 1.0) */ void set_audio_cone( float inner, float outer, float gain ) { - _inner_angle = inner; - _outer_angle = outer; - _outer_gain = gain; + _inner_angle = inner; _outer_angle = outer; _outer_gain = gain; _static_changed = true; } diff --git a/simgear/sound/soundmgr_openal.hxx b/simgear/sound/soundmgr_openal.hxx index 676d6d53..c24afc57 100644 --- a/simgear/sound/soundmgr_openal.hxx +++ b/simgear/sound/soundmgr_openal.hxx @@ -156,8 +156,8 @@ public: * Set the Geodetic position of the sound manager. * @param pos OpenAL listener position */ - void set_position_geod( const SGGeod& pos ) { - _absolute_pos = SGVec3d::fromGeod( pos ); _changed = true; + void set_position( const SGVec3d& pos ) { + _absolute_pos = pos; _changed = true; } /** diff --git a/simgear/sound/xmlsound.cxx b/simgear/sound/xmlsound.cxx index fcfe41e5..9ef15ca4 100644 --- a/simgear/sound/xmlsound.cxx +++ b/simgear/sound/xmlsound.cxx @@ -229,9 +229,9 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node, SGVec3f offset_pos = SGVec3f::zeros(); SGPropertyNode_ptr prop = node->getChild("position"); if ( prop != NULL ) { - offset_pos[0] = prop->getDoubleValue("y", 0.0); - offset_pos[1] = -prop->getDoubleValue("z", 0.0); - offset_pos[2] = -prop->getDoubleValue("x", 0.0); + offset_pos[0] = -prop->getDoubleValue("x", 0.0); + offset_pos[1] = prop->getDoubleValue("y", 0.0); + offset_pos[2] = -prop->getDoubleValue("z", 0.0); } // @@ -243,9 +243,9 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node, float outer_gain = 0.0; prop = node->getChild("orientation"); if ( prop != NULL ) { - dir = SGVec3f(prop->getFloatValue("y", 0.0), - -prop->getFloatValue("z", 0.0), - -prop->getFloatValue("x", 0.0)); + dir = SGVec3f(-prop->getFloatValue("x", 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); outer_gain = prop->getFloatValue("outer-gain", 0.0);