diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-08-30 16:29:15 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-08-30 18:06:42 -0400 |
| commit | f94e764df52eba37bc1b800112d0c3e02f6455d1 (patch) | |
| tree | 2289b335c2babba85f012c3aa83391dde5fab2fd /Source/Core/AudioCommon/OpenSLESStream.cpp | |
| parent | ba4934b75eb13cc04a54efd54a9d6f286d255083 (diff) | |
AudioCommon: Clean up brace placements
Diffstat (limited to 'Source/Core/AudioCommon/OpenSLESStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/OpenSLESStream.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/Core/AudioCommon/OpenSLESStream.cpp b/Source/Core/AudioCommon/OpenSLESStream.cpp index a3fefebb4c..996b7ae21a 100644 --- a/Source/Core/AudioCommon/OpenSLESStream.cpp +++ b/Source/Core/AudioCommon/OpenSLESStream.cpp @@ -30,7 +30,8 @@ static CMixer *g_mixer; static short buffer[2][BUFFER_SIZE]; static int curBuffer = 0; -static void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) { +static void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) +{ assert(bq == bqPlayerBufferQueue); assert(nullptr == context); @@ -49,6 +50,7 @@ static void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) { // Render to the fresh buffer g_mixer->Mix(reinterpret_cast<short *>(buffer[curBuffer]), BUFFER_SIZE_IN_SAMPLES); } + bool OpenSLESStream::Start() { SLresult result; @@ -103,9 +105,11 @@ bool OpenSLESStream::Start() curBuffer = 0; result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, buffer[curBuffer], sizeof(buffer[curBuffer])); - if (SL_RESULT_SUCCESS != result) { + if (SL_RESULT_SUCCESS != result) + { return false; } + curBuffer ^= 1; g_mixer = m_mixer; return true; @@ -113,7 +117,8 @@ bool OpenSLESStream::Start() void OpenSLESStream::Stop() { - if (bqPlayerObject != nullptr) { + if (bqPlayerObject != nullptr) + { (*bqPlayerObject)->Destroy(bqPlayerObject); bqPlayerObject = nullptr; bqPlayerPlay = nullptr; @@ -121,11 +126,15 @@ void OpenSLESStream::Stop() bqPlayerMuteSolo = nullptr; bqPlayerVolume = nullptr; } - if (outputMixObject != nullptr) { + + if (outputMixObject != nullptr) + { (*outputMixObject)->Destroy(outputMixObject); outputMixObject = nullptr; } - if (engineObject != nullptr) { + + if (engineObject != nullptr) + { (*engineObject)->Destroy(engineObject); engineObject = nullptr; engineEngine = nullptr; |
