Skip to content

Commit

Permalink
music_ogg.c: provide audio using the host endianness (bug #5187.)
Browse files Browse the repository at this point in the history
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 e4177ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions music_ogg.c
Expand Up @@ -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 ) {
Expand All @@ -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);
Expand Down

0 comments on commit e4177ad

Please sign in to comment.