instance Frame fr ⇒ WritableStream (Player fr Mono) (L.Vector fr) where
writeFrames pl v
- = liftIO $ sanitizeIOError $ L.hPut (plHandle pl) v
+ = liftIO $
+ sanitizeIOError $
+ do L.hPut (plHandle pl) v
+ hFlush (plHandle pl)
instance Frame fr ⇒ WritableStream (Player fr Stereo) (L.Vector fr, L.Vector fr) where
writeFrames pl (l, r)
- = liftIO $ sanitizeIOError $ L.hPut (plHandle pl) (interleave l r)
+ = liftIO $
+ sanitizeIOError $
+ do L.hPut (plHandle pl) (interleave l r)
+ hFlush (plHandle pl)
-- | Open an ESD handle for playing a stream.
openPlayer ∷ ∀fr ch s pr.