diff options
author | Chris Robinson <[email protected]> | 2015-11-06 10:27:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-11-06 10:27:28 -0800 |
commit | de74498cd97c18d0c6c4001079b95da0f404ce8f (patch) | |
tree | ffc04152b0b8bfe8161928c7fb8d921321f9f063 /Alc/ALu.c | |
parent | 858230f4528ad2f418f97414e3a8be46865c367c (diff) |
Use more accurate floating point literals
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -589,12 +589,12 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A /* Build a rotate + conversion matrix (B-Format -> N3D), and include * scaling for first-order content. */ - scale = Device->AmbiScale * 1.7321f; + scale = Device->AmbiScale * 1.732050808f; aluMatrixSet(&matrix, - 1.4142f, 0.0f, 0.0f, 0.0f, - 0.0f, -N[0]*scale, N[1]*scale, -N[2]*scale, - 0.0f, U[0]*scale, -U[1]*scale, U[2]*scale, - 0.0f, -V[0]*scale, V[1]*scale, -V[2]*scale + 1.414213562f, 0.0f, 0.0f, 0.0f, + 0.0f, -N[0]*scale, N[1]*scale, -N[2]*scale, + 0.0f, U[0]*scale, -U[1]*scale, U[2]*scale, + 0.0f, -V[0]*scale, V[1]*scale, -V[2]*scale ); for(c = 0;c < num_channels;c++) @@ -617,7 +617,7 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A * sends. It also needs to be scaled by sqrt(2) to account for the * signal being scaled by sqrt(1/2). */ - voice->Send[i].Gains[0].Target = WetGain[i] * 1.4142f; + voice->Send[i].Gains[0].Target = WetGain[i] * 1.414213562f; for(c = 1;c < num_channels;c++) voice->Send[i].Gains[c].Target = 0.0f; UpdateWetStepping(&voice->Send[i], num_channels, (voice->Send[i].Moving ? 64 : 0)); |