mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-09-28 16:15:55 +08:00
audio: Fix audio stream gain going wrong in certain scenarios.
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
Fixes #12091.
This commit is contained in:
@@ -548,7 +548,7 @@ const Uint8 *SDL_ReadFromAudioQueue(SDL_AudioQueue *queue,
|
||||
size_t dst_present_bytes = present_frames * dst_frame_size;
|
||||
size_t dst_future_bytes = future_frames * dst_frame_size;
|
||||
|
||||
bool convert = (src_format != dst_format) || (src_channels != dst_channels);
|
||||
const bool convert = (src_format != dst_format) || (src_channels != dst_channels) || (gain != 1.0f);
|
||||
|
||||
if (convert && !dst) {
|
||||
// The user didn't ask for the data to be copied, but we need to convert it, so store it in the scratch buffer
|
||||
|
||||
Reference in New Issue
Block a user