Skip to content

Commit 572230c

Browse files
committed
Initialize sound alias properties as if it was a new sound
1 parent fd44c26 commit 572230c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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)