Skip to content
Permalink
Browse files

music_ogg.c: provide audio using the host endianness (bug #5187.)

backport from default/2.0 branch changeset e6f2d0a83df5, original
patch from Sergio Padrino.
  • Loading branch information
sezero committed Jun 26, 2020
1 parent 2ad9d69 commit e4177ad7de8c1ded15b9a0aa517a4517d17a4f08
Showing with 2 additions and 2 deletions.
  1. +2 −2 music_ogg.c
@@ -133,7 +133,7 @@ static void OGG_getsome(OGG_music *music)
#ifdef OGG_USE_TREMOR
len = vorbis.ov_read(&music->vf, data, sizeof(data), &section);
#else
len = vorbis.ov_read(&music->vf, data, sizeof(data), 0, 2, 1, &section);
len = vorbis.ov_read(&music->vf, data, sizeof(data), SDL_BYTEORDER == SDL_BIG_ENDIAN, 2, 1, &section);
#endif
if ( len <= 0 ) {
if ( len == 0 ) {
@@ -146,7 +146,7 @@ static void OGG_getsome(OGG_music *music)
vorbis_info *vi;

vi = vorbis.ov_info(&music->vf, -1);
SDL_BuildAudioCVT(cvt, AUDIO_S16, vi->channels, vi->rate,
SDL_BuildAudioCVT(cvt, AUDIO_S16SYS, vi->channels, vi->rate,
mixer.format,mixer.channels,mixer.freq);
if ( cvt->buf ) {
SDL_free(cvt->buf);

0 comments on commit e4177ad

Please sign in to comment.