Merge pull request #5123 from JeffM2501/clean_sound_alias

[raudio] Initialize sound alias properties as if it was a new sound
This commit is contained in:
Ray 2025-08-19 17:26:51 +02:00 committed by GitHub
commit d9392b94c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -982,9 +982,13 @@ Sound LoadSoundAlias(Sound source)
}
audioBuffer->sizeInFrames = source.stream.buffer->sizeInFrames;
audioBuffer->volume = source.stream.buffer->volume;
audioBuffer->data = source.stream.buffer->data;
// initalize the buffer as if it was new
audioBuffer->volume = 1.0f;
audioBuffer->pitch = 1.0f;
audioBuffer->pan = 0.5f;
sound.frameCount = source.frameCount;
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
sound.stream.sampleSize = 32;