WIP: the sound invariants changed, need to investigate. they are passing a new

short[] buffer into the SDL audio conversion, but the multiplier says its 8x
larger than before, short is only 2x larger than char. not clear who wrote this
this way and why
This commit is contained in:
Tim Felgentreff 2020-04-13 23:33:44 +02:00
parent fa05f65bac
commit 22c823f0aa

View file

@ -296,11 +296,11 @@ static void MixIntoBuffer(void *buffer, int samples)
if (EffectsEnabled) {
// Add channels to mixer buffer
MixChannelsToStereo32(Audio.MixerBuffer, samples);
// MixChannelsToStereo32(Audio.MixerBuffer, samples);
}
if (MusicEnabled) {
// Add music to mixer buffer
MixMusicToStereo32(Audio.MixerBuffer, samples);
// MixMusicToStereo32(Audio.MixerBuffer, samples);
}
ClipMixToStereo16(Audio.MixerBuffer, samples, (short *)buffer);
}
@ -317,7 +317,7 @@ static void MixIntoBuffer(void *buffer, int samples)
static void FillAudio(void *, Uint8 *stream, int len)
{
if (!Audio.Running) return;
Assert(len != Audio.Format.size);
Assert(len == Audio.Format.size);
SDL_memset(stream, 0, len);
SDL_LockMutex(Audio.Lock);