+instance Stream (Player fr ch) where
+ streamSampleRate = plRate
+
+instance Frame fr ⇒ WritableStream (Player fr Mono) (L.Vector fr) where
+ writeFrames pl v
+ = liftIO $ sanitizeIOError $ L.hPut (plHandle pl) v
+
+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)
+