Skip to content

Commit 42d288e

Browse files
committed
SDL sound playback fix.
1 parent 134fa08 commit 42d288e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Nu/Nu/Audio/AudioPlayer.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,9 @@ type [<ReferenceEquality>] SdlAudioPlayer =
303303
| Some audioAsset ->
304304
match audioAsset with
305305
| WavAsset wavAsset ->
306-
SDL_mixer.Mix_VolumeChunk (wavAsset, int (soundDescriptor.Volume * audioPlayer.MasterSoundVolume * single SDL_mixer.MIX_MAX_VOLUME)) |> ignore
307306
let channel = SDL_mixer.Mix_PlayChannel (-1, wavAsset, 0)
308307
if channel > -1 then
308+
SDL_mixer.Mix_Volume (channel, int (soundDescriptor.Volume * audioPlayer.MasterSoundVolume * single SDL_mixer.MIX_MAX_VOLUME)) |> ignore
309309
let pan = soundDescriptor.Panning |> max -1.0f |> min 1.0f
310310
let left = byte (255.0f * (1.0f - max 0.0f pan))
311311
let right = byte (255.0f * (1.0f + min 0.0f pan))

0 commit comments

Comments
 (0)