Moving byte order/memory access to poly.
This commit is contained in:
@@ -149,7 +149,7 @@ X_STATUS AudioSystem::RegisterClient(
|
||||
|
||||
uint32_t ptr = (uint32_t)memory()->HeapAlloc(0, 0x4, 0);
|
||||
auto mem = memory()->membase();
|
||||
XESETUINT32BE(mem + ptr, callback_arg);
|
||||
poly::store_and_swap<uint32_t>(mem + ptr, callback_arg);
|
||||
|
||||
clients_[index] = { driver, callback, callback_arg, ptr };
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ void XAudio2AudioDriver::SubmitFrame(uint32_t frame_ptr) {
|
||||
// interleave the data
|
||||
for (int index = 0, o = 0; index < channel_samples_; ++index) {
|
||||
for (int channel = 0, table = 0; channel < interleave_channels; ++channel, table += channel_samples_) {
|
||||
output_frame[o++] = XESWAPF32BE(input_frame[table + index]);
|
||||
output_frame[o++] = poly::byte_swap(input_frame[table + index]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user