@@ -410,8 +410,10 @@ data ControllerDeviceEventData =
410410  deriving  (Eq ,Ord ,Generic ,Show ,Typeable )
411411
412412data  AudioDeviceEventData  = 
413-   AudioDeviceEventData  { audioDeviceEventWhich  ::  ! Word32 
414-                         --  ^  The audio device  ID that reported the event. 
413+   AudioDeviceEventData  { audioDeviceEventIsAddition  ::  ! Bool 
414+                         --  ^  If the audio device is an addition, or a removal. 
415+                        ,audioDeviceEventWhich  ::  ! Word32 
416+                         --  ^  The audio device ID that reported the event. 
415417                       ,audioDeviceEventIsCapture  ::  ! Bool 
416418                        --  ^  If the audio device is a capture device. 
417419                       } 
@@ -651,8 +653,12 @@ convertRaw (Raw.ControllerButtonEvent _ ts a b c) =
651653  return  (Event  ts (ControllerButtonEvent  (ControllerButtonEventData  a b c)))
652654convertRaw (Raw. ControllerDeviceEvent= 
653655  return  (Event  ts (ControllerDeviceEvent  (ControllerDeviceEventData  a)))
654- convertRaw (Raw. AudioDeviceEvent= 
655-   return  (Event  ts (AudioDeviceEvent  (AudioDeviceEventData  a (b /=  0 ))))
656+ convertRaw (Raw. AudioDeviceEventRaw. SDL_AUDIODEVICEADDED= 
657+   return  (Event  ts (AudioDeviceEvent  (AudioDeviceEventData  True /=  0 ))))
658+ convertRaw (Raw. AudioDeviceEventRaw. SDL_AUDIODEVICEREMOVED= 
659+   return  (Event  ts (AudioDeviceEvent  (AudioDeviceEventData  False /=  0 ))))
660+ convertRaw (Raw. AudioDeviceEvent= 
661+   error  " convertRaw: Unknown audio device motion" 
656662convertRaw (Raw. QuitEvent= 
657663  return  (Event  ts QuitEvent )
658664convertRaw (Raw. UserEvent= 
0 commit comments