From 0374da225fff273d7e3923b0bea83869f1e37c83 Mon Sep 17 00:00:00 2001 From: dashodanger Date: Sun, 12 Nov 2023 08:36:31 -0700 Subject: [PATCH] Remove hopefully unneeded memcpy in movie sound callback (if SDL_AudioStreamGet fails, I'm hopeing the buffer remains empty) --- libraries/pl_mpeg/{MIT.txt => LICENSE} | 0 source_files/edge/i_sound.cc | 7 +------ 2 files changed, 1 insertion(+), 6 deletions(-) rename libraries/pl_mpeg/{MIT.txt => LICENSE} (100%) diff --git a/libraries/pl_mpeg/MIT.txt b/libraries/pl_mpeg/LICENSE similarity index 100% rename from libraries/pl_mpeg/MIT.txt rename to libraries/pl_mpeg/LICENSE diff --git a/source_files/edge/i_sound.cc b/source_files/edge/i_sound.cc index 65662ac41..0f6278543 100644 --- a/source_files/edge/i_sound.cc +++ b/source_files/edge/i_sound.cc @@ -78,12 +78,7 @@ void SoundFill_Callback(void *udata, Uint8 *stream, int len) { int avail = MIN(SDL_AudioStreamAvailable(movie_audiostream), len); if (avail > 0) - { - s16_t *buf = new s16_t[avail]; - int length = SDL_AudioStreamGet(movie_audiostream, buf, avail); - if (length > 0) - memcpy(stream, buf, length); - } + SDL_AudioStreamGet(movie_audiostream, stream, avail); } else S_MixAllChannels(stream, len);