diff --git a/src/mumble/AudioOutput.cpp b/src/mumble/AudioOutput.cpp index a00d7d4ba06..3289d2af556 100644 --- a/src/mumble/AudioOutput.cpp +++ b/src/mumble/AudioOutput.cpp @@ -589,17 +589,17 @@ bool AudioOutput::mix(void *outbuff, unsigned int frameCount) { } if (!aop->piOffset) { - aop->piOffset = std::make_unique(nchan); + aop->piOffset = std::make_unique< unsigned int[] >(nchan); for (unsigned int s = 0; s < nchan; ++s) { aop->piOffset[s] = 0; } } for (unsigned int s = 0; s < nchan; ++s) { - const float dot = bSpeakerPositional[s] - ? connectionVec.x * speaker[s * 3 + 0] + connectionVec.y * speaker[s * 3 + 1] - + connectionVec.z * speaker[s * 3 + 2] - : 1.0f; + const float dot = bSpeakerPositional[s] + ? connectionVec.x * speaker[s * 3 + 0] + connectionVec.y * speaker[s * 3 + 1] + + connectionVec.z * speaker[s * 3 + 2] + : 1.0f; // Volume on the ear opposite to the sound should never reach 0 in the real world. // The gain is multiplied by 19/20 and 1/20 is added. This will have the effect // of bringing the lowest value up to 1/20, while keeping the highest value at 1. @@ -621,7 +621,8 @@ bool AudioOutput::mix(void *outbuff, unsigned int frameCount) { // newly calculated offset for this chunk. This prevents clicking / buzzing when the // audio source or camera is moving, because abruptly changing offsets (and thus // abruptly changing the playback position) will create a clicking noise. - const int offset = INTERAURAL_DELAY * (1.0 + dot) / 2.0; // Normalize dot to range [0,1] instead [-1,1] + const int offset = + INTERAURAL_DELAY * (1.0 + dot) / 2.0; // Normalize dot to range [0,1] instead [-1,1] const int oldOffset = aop->piOffset[s]; const float incOffset = (offset - oldOffset) / static_cast< float >(frameCount); aop->piOffset[s] = offset;