diff options
author | Sven Gothel <[email protected]> | 2015-11-12 18:12:26 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-11-12 18:12:26 +0100 |
commit | 542c4804aafe3f3879cee56d19d7353ed49ee154 (patch) | |
tree | 9c89aeda9ec5d368a1fb016422448e6418fc87db /OpenAL32/alListener.c | |
parent | 2e8f6a1704dfa0048dbfc2f826847a4aaea3cbe8 (diff) | |
parent | 5d039309b355c350fd087a48c4b896d31871d174 (diff) |
Merge branch 'UPSTREAM'
Diffstat (limited to 'OpenAL32/alListener.c')
-rw-r--r-- | OpenAL32/alListener.c | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/OpenAL32/alListener.c b/OpenAL32/alListener.c index 87cd3c61..66865473 100644 --- a/OpenAL32/alListener.c +++ b/OpenAL32/alListener.c @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * Or go to http://www.gnu.org/copyleft/lgpl.html */ @@ -40,7 +40,7 @@ AL_API ALvoid AL_APIENTRY alListenerf(ALenum param, ALfloat value) SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); context->Listener->Gain = value; - context->UpdateSources = AL_TRUE; + ATOMIC_STORE(&context->UpdateSources, AL_TRUE); break; case AL_METERS_PER_UNIT: @@ -48,7 +48,7 @@ AL_API ALvoid AL_APIENTRY alListenerf(ALenum param, ALfloat value) SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); context->Listener->MetersPerUnit = value; - context->UpdateSources = AL_TRUE; + ATOMIC_STORE(&context->UpdateSources, AL_TRUE); break; default: @@ -74,10 +74,8 @@ AL_API ALvoid AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat val SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); LockContext(context); - context->Listener->Position[0] = value1; - context->Listener->Position[1] = value2; - context->Listener->Position[2] = value3; - context->UpdateSources = AL_TRUE; + aluVectorSet(&context->Listener->Position, value1, value2, value3, 1.0f); + ATOMIC_STORE(&context->UpdateSources, AL_TRUE); UnlockContext(context); break; @@ -86,10 +84,8 @@ AL_API ALvoid AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat val SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); LockContext(context); - context->Listener->Velocity[0] = value1; - context->Listener->Velocity[1] = value2; - context->Listener->Velocity[2] = value3; - context->UpdateSources = AL_TRUE; + aluVectorSet(&context->Listener->Velocity, value1, value2, value3, 0.0f); + ATOMIC_STORE(&context->UpdateSources, AL_TRUE); UnlockContext(context); break; @@ -142,7 +138,7 @@ AL_API ALvoid AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values) context->Listener->Up[0] = values[3]; context->Listener->Up[1] = values[4]; context->Listener->Up[2] = values[5]; - context->UpdateSources = AL_TRUE; + ATOMIC_STORE(&context->UpdateSources, AL_TRUE); UnlockContext(context); break; @@ -282,17 +278,17 @@ AL_API ALvoid AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat { case AL_POSITION: LockContext(context); - *value1 = context->Listener->Position[0]; - *value2 = context->Listener->Position[1]; - *value3 = context->Listener->Position[2]; + *value1 = context->Listener->Position.v[0]; + *value2 = context->Listener->Position.v[1]; + *value3 = context->Listener->Position.v[2]; UnlockContext(context); break; case AL_VELOCITY: LockContext(context); - *value1 = context->Listener->Velocity[0]; - *value2 = context->Listener->Velocity[1]; - *value3 = context->Listener->Velocity[2]; + *value1 = context->Listener->Velocity.v[0]; + *value2 = context->Listener->Velocity.v[1]; + *value3 = context->Listener->Velocity.v[2]; UnlockContext(context); break; @@ -383,17 +379,17 @@ AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *valu { case AL_POSITION: LockContext(context); - *value1 = (ALint)context->Listener->Position[0]; - *value2 = (ALint)context->Listener->Position[1]; - *value3 = (ALint)context->Listener->Position[2]; + *value1 = (ALint)context->Listener->Position.v[0]; + *value2 = (ALint)context->Listener->Position.v[1]; + *value3 = (ALint)context->Listener->Position.v[2]; UnlockContext(context); break; case AL_VELOCITY: LockContext(context); - *value1 = (ALint)context->Listener->Velocity[0]; - *value2 = (ALint)context->Listener->Velocity[1]; - *value3 = (ALint)context->Listener->Velocity[2]; + *value1 = (ALint)context->Listener->Velocity.v[0]; + *value2 = (ALint)context->Listener->Velocity.v[1]; + *value3 = (ALint)context->Listener->Velocity.v[2]; UnlockContext(context); break; |