Skip to content

Commit 267a291

Browse files
authored
SDL.Audio: Fix openAudioDevice Changeable check (#229)
`foldChangeable` expects the value for Mandate as its first argument and the value for Desire as its second, but `changes` in `openAudioDevice` had them reversed. Swap them.
1 parent a2646ed commit 267a291

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SDL/Audio.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ openAudioDevice OpenDeviceSpec{..} = liftIO $
175175
return (audioDevice, spec)
176176

177177
where
178-
changes = foldl (.|.) 0 [ foldChangeable (const Raw.SDL_AUDIO_ALLOW_FREQUENCY_CHANGE) (const 0) openDeviceFreq
179-
, foldChangeable (const Raw.SDL_AUDIO_ALLOW_FORMAT_CHANGE) (const 0) openDeviceFormat
180-
, foldChangeable (const Raw.SDL_AUDIO_ALLOW_CHANNELS_CHANGE) (const 0) openDeviceChannels
178+
changes = foldl (.|.) 0 [ foldChangeable (const 0) (const Raw.SDL_AUDIO_ALLOW_FREQUENCY_CHANGE) openDeviceFreq
179+
, foldChangeable (const 0) (const Raw.SDL_AUDIO_ALLOW_FORMAT_CHANGE) openDeviceFormat
180+
, foldChangeable (const 0) (const Raw.SDL_AUDIO_ALLOW_CHANNELS_CHANGE) openDeviceChannels
181181
]
182182

183183
channelsToWord8 Mono = 1

0 commit comments

Comments
 (0)