mirror of
https://github.com/n64dev/cen64.git
synced 2024-05-11 08:55:44 -04:00
ai: Implement non-assembly byteswapping routine for audio samples
This commit is contained in:
parent
3615ddf5b9
commit
d1775488da
|
@ -319,7 +319,11 @@ const uint8_t *byteswap_audio_buffer(const uint8_t *input,
|
|||
|
||||
return ret_buf;
|
||||
#else
|
||||
#error "Unimplemented byteswap_audio_buffer!"
|
||||
for (i = 0; i < length >> 1; ++i) {
|
||||
output[i << 1] = input [(i << 1) + 1];
|
||||
output[(i << 1) + 1] = input [i << 1];
|
||||
}
|
||||
return (const uint8_t*)output;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue