From fa097e3f94820eb3a3931662c322d776860b0769 Mon Sep 17 00:00:00 2001 From: dashodanger Date: Sun, 20 Oct 2024 22:19:11 -0600 Subject: [PATCH] Tweak OGG --- source_files/edge/s_ogg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source_files/edge/s_ogg.cc b/source_files/edge/s_ogg.cc index 537eb8397..3c4259788 100644 --- a/source_files/edge/s_ogg.cc +++ b/source_files/edge/s_ogg.cc @@ -91,7 +91,7 @@ void OGGPlayer::PostOpen() bool OGGPlayer::StreamIntoBuffer(SoundData *buf) { - int got_size = stb_vorbis_get_samples_short_interleaved(ogg_decoder_, 2, buf->data_, kMusicBuffer); + int got_size = stb_vorbis_get_samples_short_interleaved(ogg_decoder_, 2, buf->data_, kMusicBuffer * 2); if (got_size == 0) /* EOF */ { @@ -275,7 +275,7 @@ bool LoadOGGSound(SoundData *buf, const uint8_t *data, int length) int16_t *buffer = gather.MakeChunk(total_samples, true); - gather.CommitChunk(stb_vorbis_get_samples_short_interleaved(ogg, 2, buffer, total_samples)); + gather.CommitChunk(stb_vorbis_get_samples_short_interleaved(ogg, 2, buffer, total_samples * 2)); if (!gather.Finalise(buf)) FatalError("OGG SFX Loader: no samples!\n");