Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
music_ogg: provide audio using the host endianness
This fixes two issues in big-endian devices: - When using Tremor, Tremor doesn't swap the byte order, so it "respects" the endianness of the host. This change makes sure SDL_mixer creates a stream in AUDIO_S16SYS format (meaning S16 with the host endianness). - Make also vorbis respect the host endianness. Before this change, ov_read was forced to always deliver data in little-endian order. That wouldn't work with the AUDIO_S16SYS change described above. Also, it means SDL would swap the bytes of ogg data twice in big-endian devices: first in ov_read to little- endian when reading ogg file, and then again in SDL_Convert_Byteswap before sending the data to the audio device. The result of this is fixing Tremor support on big-endian devices and improving performance/efficiency of Vorbis on big-endian devices.
- Loading branch information