[APU] Use vectorized converter in xaudio2 backend

This commit is contained in:
Joel Linn 2021-06-08 03:53:18 +02:00 committed by Triang3l
parent 0ad939b2f1
commit f15e3d07e7
1 changed files with 3 additions and 6 deletions

View File

@ -13,6 +13,7 @@
#include "xenia/base/platform_win.h" #include "xenia/base/platform_win.h"
#include "xenia/apu/apu_flags.h" #include "xenia/apu/apu_flags.h"
#include "xenia/apu/conversion.h"
#include "xenia/base/clock.h" #include "xenia/base/clock.h"
#include "xenia/base/logging.h" #include "xenia/base/logging.h"
@ -208,12 +209,8 @@ void XAudio2AudioDriver::SubmitFrame(uint32_t frame_ptr) {
auto interleave_channels = frame_channels_; auto interleave_channels = frame_channels_;
// interleave the data // interleave the data
for (uint32_t index = 0, o = 0; index < channel_samples_; ++index) { conversion::sequential_6_BE_to_interleaved_6_LE(output_frame, input_frame,
for (uint32_t channel = 0, table = 0; channel < interleave_channels; channel_samples_);
++channel, table += channel_samples_) {
output_frame[o++] = xe::byte_swap(input_frame[table + index]);
}
}
api::XAUDIO2_BUFFER buffer; api::XAUDIO2_BUFFER buffer;
buffer.Flags = 0; buffer.Flags = 0;