clang auto format followed

I think... just moved the code to VS to see if it auto formatted
This commit is contained in:
16-Bit-Dog
2021-01-27 08:19:38 -05:00
committed by GitHub
parent 3097cb2ff8
commit 6f0e5df5a2

View File

@@ -2,9 +2,9 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <future>
#include <limits> #include <limits>
#include <vector> #include <vector>
#include <future>
#include "audio_core/audio_out.h" #include "audio_core/audio_out.h"
#include "audio_core/audio_renderer.h" #include "audio_core/audio_renderer.h"
@@ -70,7 +70,7 @@ namespace {
namespace AudioCore { namespace AudioCore {
std::vector <std::future<void>> queueMixedThreadFence; std::vector<std::future<void>> queueMixedThreadFence;
std::future<void> keepThreadReady1; std::future<void> keepThreadReady1;
std::future<void> keepThreadReady2; std::future<void> keepThreadReady2;
@@ -201,9 +201,7 @@ ResultCode AudioRenderer::UpdateAudioRenderer(const std::vector<u8>& input_param
return AudioCommon::Audren::ERR_INVALID_PARAMETERS; return AudioCommon::Audren::ERR_INVALID_PARAMETERS;
} }
keepThreadReady1 = std::async(std::launch::async, [&] { keepThreadReady1 = std::async(std::launch::async, [&] { ReleaseAndQueueBuffers(); });
ReleaseAndQueueBuffers();
});
keepThreadReady1.get(); keepThreadReady1.get();
@@ -221,15 +219,15 @@ void AudioRenderer::QueueMixedBuffer(Buffer::Tag tag) {
} }
queueMixedThreadFence.push_back(std::async(std::launch::async, [&] { queueMixedThreadFence.push_back(std::async(std::launch::async, [&] {
// Sort our voices // Sort our voices
voice_context.SortInfo(); voice_context.SortInfo();
// Handle samples // Handle samples
command_generator.GenerateVoiceCommands(); command_generator.GenerateVoiceCommands();
command_generator.GenerateSubMixCommands(); command_generator.GenerateSubMixCommands();
command_generator.GenerateFinalMixCommands(); command_generator.GenerateFinalMixCommands();
command_generator.PostCommand(); command_generator.PostCommand();
})); }));
// Base sample size // Base sample size
@@ -328,20 +326,17 @@ void AudioRenderer::QueueMixedBuffer(Buffer::Tag tag) {
elapsed_frame_count++; elapsed_frame_count++;
voice_context.UpdateStateByDspShared(); voice_context.UpdateStateByDspShared();
} }
void AudioRenderer::ReleaseAndQueueBuffers() { void AudioRenderer::ReleaseAndQueueBuffers() {
const auto released_buffers{audio_out->GetTagsAndReleaseBuffers(stream)}; const auto released_buffers{audio_out->GetTagsAndReleaseBuffers(stream)};
queueMixedThreadFence.resize(0); //instead of passing a s16 to the queue mixed buffer to control, pushing values to a vector seemed about as fast queueMixedThreadFence.resize(0); // instead of passing a s16 to the queue mixed buffer to
// control, pushing values to a vector seemed about as fast
for (const auto& tag : released_buffers) { for (const auto& tag : released_buffers) {
keepThreadReady2 = std::async(std::launch::async, [&]{ keepThreadReady2 = std::async(std::launch::async, [&] { QueueMixedBuffer(tag); });
QueueMixedBuffer(tag);
});
keepThreadReady2.get(); keepThreadReady2.get();
} }
} }
} // namespace AudioCore } // namespace AudioCore