Skip to content

Commit d9392b9

Browse files
authored
Merge pull request #5123 from JeffM2501/clean_sound_alias
[raudio] Initialize sound alias properties as if it was a new sound
2 parents fd44c26 + 572230c commit d9392b9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/raudio.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,9 +982,13 @@ Sound LoadSoundAlias(Sound source)
982982
}
983983

984984
audioBuffer->sizeInFrames = source.stream.buffer->sizeInFrames;
985-
audioBuffer->volume = source.stream.buffer->volume;
986985
audioBuffer->data = source.stream.buffer->data;
987986

987+
// initalize the buffer as if it was new
988+
audioBuffer->volume = 1.0f;
989+
audioBuffer->pitch = 1.0f;
990+
audioBuffer->pan = 0.5f;
991+
988992
sound.frameCount = source.frameCount;
989993
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
990994
sound.stream.sampleSize = 32;

0 commit comments

Comments
 (0)