diff options
| author | Matthew Parlane <parlane@gmail.com> | 2014-03-11 00:30:55 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2014-03-11 00:35:07 +1300 |
| commit | 31cfc73a09a8685cbab20502b4bc132e98e2feb5 (patch) | |
| tree | c7eb3a0906bab0eb711bd7c79166c96fe97ec488 /Source/Core/AudioCommon | |
| parent | 4591464486d696a300cc914f6c2a3cce8af2d666 (diff) | |
Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
Diffstat (limited to 'Source/Core/AudioCommon')
| -rw-r--r-- | Source/Core/AudioCommon/DPL2Decoder.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/AudioCommon/Mixer.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/AudioCommon/OpenALStream.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/AudioCommon/PulseAudioStream.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/AudioCommon/DPL2Decoder.cpp b/Source/Core/AudioCommon/DPL2Decoder.cpp index 29a5f73d14..1cddf54600 100644 --- a/Source/Core/AudioCommon/DPL2Decoder.cpp +++ b/Source/Core/AudioCommon/DPL2Decoder.cpp @@ -123,7 +123,7 @@ float* design_fir(unsigned int *n, float* fc, float opt) float fc1; // Cutoff frequencies // Sanity check - if(*n==0) return nullptr; + if (*n==0) return nullptr; MathUtil::Clamp(&fc[0],float(0.001),float(1)); float *w=(float*)calloc(sizeof(float),*n); diff --git a/Source/Core/AudioCommon/Mixer.cpp b/Source/Core/AudioCommon/Mixer.cpp index 15a7b4d7f1..2b785ffaf4 100644 --- a/Source/Core/AudioCommon/Mixer.cpp +++ b/Source/Core/AudioCommon/Mixer.cpp @@ -48,8 +48,8 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples, bool consider_ float numLeft = ((indexW - indexR) & INDEX_MASK) / 2; m_numLeftI = (numLeft + m_numLeftI*(CONTROL_AVG-1)) / CONTROL_AVG; float offset = (m_numLeftI - LOW_WATERMARK) * CONTROL_FACTOR; - if(offset > MAX_FREQ_SHIFT) offset = MAX_FREQ_SHIFT; - if(offset < -MAX_FREQ_SHIFT) offset = -MAX_FREQ_SHIFT; + if (offset > MAX_FREQ_SHIFT) offset = MAX_FREQ_SHIFT; + if (offset < -MAX_FREQ_SHIFT) offset = -MAX_FREQ_SHIFT; //render numleft sample pairs to samples[] //advance indexR with sample position @@ -65,7 +65,7 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples, bool consider_ static u32 frac = 0; const u32 ratio = (u32)( 65536.0f * aid_sample_rate / (float)m_sampleRate ); - if(ratio > 0x10000) + if (ratio > 0x10000) ERROR_LOG(AUDIO, "ratio out of range"); for (; currentSample < numSamples*2 && ((indexW-indexR) & INDEX_MASK) > 2; currentSample+=2) { diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp index 38e57beca2..fb4d778b12 100644 --- a/Source/Core/AudioCommon/OpenALStream.cpp +++ b/Source/Core/AudioCommon/OpenALStream.cpp @@ -105,7 +105,7 @@ void OpenALStream::Clear(bool mute) { m_muted = mute; - if(m_muted) + if (m_muted) { soundTouch.clear(); alSourceStop(uiSource); diff --git a/Source/Core/AudioCommon/PulseAudioStream.cpp b/Source/Core/AudioCommon/PulseAudioStream.cpp index bc5d0f3f5f..b4d2772709 100644 --- a/Source/Core/AudioCommon/PulseAudioStream.cpp +++ b/Source/Core/AudioCommon/PulseAudioStream.cpp @@ -49,7 +49,7 @@ void PulseAudio::SoundLoop() while (m_run_thread.load() && m_pa_connected == 1 && m_pa_error >= 0) m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, nullptr); - if(m_pa_error < 0) + if (m_pa_error < 0) ERROR_LOG(AUDIO, "PulseAudio error: %s", pa_strerror(m_pa_error)); PulseShutdown(); |
