X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=EsounD.git;a=blobdiff_plain;f=Sound%2FEsounD%2FPlayer.hs;h=56781da08f2753efc24178d2bcac28f9c0379af2;hp=49740fc4167a57872f74b0c9a784b71f0dbb3c6d;hb=080d77f8aece1d14f71f6fd337f0cda9cdf7d740;hpb=808cc2f4700bc0b2f77cee443dd237d415b4d5d7 diff --git a/Sound/EsounD/Player.hs b/Sound/EsounD/Player.hs index 49740fc..56781da 100644 --- a/Sound/EsounD/Player.hs +++ b/Sound/EsounD/Player.hs @@ -49,11 +49,17 @@ instance Stream (Player fr ch) where 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.