Skip to content

Commit

Permalink
Tweak OGG
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Oct 21, 2024
1 parent a56bb4e commit fa097e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source_files/edge/s_ogg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
{
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit fa097e3

Please sign in to comment.