From: havoc Date: Wed, 11 Aug 2004 17:25:58 +0000 (+0000) Subject: fixed sound problems (I had totally messed up the panning calcs, oops) X-Git-Tag: xonotic-v0.1.0preview~5746 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b4c2e3315a8cde70c9bbc8e9c1dcccded72ad2f5;p=xonotic%2Fdarkplaces.git fixed sound problems (I had totally messed up the panning calcs, oops) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4330 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/snd_dma.c b/snd_dma.c index 486d03f1..e3db4c90 100644 --- a/snd_dma.c +++ b/snd_dma.c @@ -488,7 +488,7 @@ void SND_Spatialize(channel_t *ch, int isstatic) // distance scale = ch->master_vol * (1.0 - (dist * ch->dist_mult)); // panning - pan = scale * source_vec[0]; + pan = scale * source_vec[1]; // calculate the volumes ch->leftvol = (int) (scale + pan); ch->rightvol = (int) (scale - pan); @@ -851,8 +851,8 @@ void S_Update(const matrix4x4_t *listenermatrix) if (!snd_initialized.integer || (snd_blocked > 0)) return; - listener_matrix = *listenermatrix; - Matrix4x4_OriginFromMatrix(&listener_matrix, listener_origin); + Matrix4x4_Invert_Simple(&listener_matrix, listenermatrix); + Matrix4x4_OriginFromMatrix(listenermatrix, listener_origin); // update general area ambient sound sources S_UpdateAmbientSounds ();