diff options
-rw-r--r-- | midi-dump.hs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/midi-dump.hs b/midi-dump.hs index c4e319a..034c8f8 100644 --- a/midi-dump.hs +++ b/midi-dump.hs | |||
@@ -20,9 +20,15 @@ import Data.Int | |||
20 | import Data.ByteString.Char8 (pack) | 20 | import Data.ByteString.Char8 (pack) |
21 | 21 | ||
22 | import Control.Concurrent.Chan | 22 | import Control.Concurrent.Chan |
23 | import Prelude hiding ((.)) | 23 | import Prelude hiding ((.), id) |
24 | import BasePrelude hiding (loop) | 24 | import BasePrelude hiding (loop) |
25 | 25 | ||
26 | import qualified Sound.ALSA.Sequencer.Address | ||
27 | import qualified Sound.ALSA.Sequencer.Port | ||
28 | import qualified Sound.ALSA.Sequencer.Queue | ||
29 | import qualified Sound.ALSA.Sequencer | ||
30 | |||
31 | |||
26 | verbose = False | 32 | verbose = False |
27 | 33 | ||
28 | main = main' `AlsaExc.catch` handler | 34 | main = main' `AlsaExc.catch` handler |
@@ -63,7 +69,10 @@ main' = withAlsaInit $ \h public private q publicAddr privateAddr -> do | |||
63 | execute_ sqlite "CREATE TABLE IF NOT EXISTS chunks (id INTEGER PRIMARY KEY, sec INTEGER, nsec INTEGER, midi BLOB)" | 69 | execute_ sqlite "CREATE TABLE IF NOT EXISTS chunks (id INTEGER PRIMARY KEY, sec INTEGER, nsec INTEGER, midi BLOB)" |
64 | saver <- startSaver sqlite | 70 | saver <- startSaver sqlite |
65 | 71 | ||
66 | (_, ()) <- execRWST loop (saver, sqlite, startTime, startTimeReal, h, public, private, q, publicAddr, privateAddr) (emptyLoopState startTime) | 72 | let env = (saver, sqlite, startTime, startTimeReal, h, public, private, q, publicAddr, privateAddr) |
73 | env :: (Chan (Int64, Int64, [EVENT]), Connection, TimeSpec, TimeSpec, Sound.ALSA.Sequencer.T Sound.ALSA.Sequencer.DuplexMode, Sound.ALSA.Sequencer.Port.T, Sound.ALSA.Sequencer.Port.T, Sound.ALSA.Sequencer.Queue.T, Sound.ALSA.Sequencer.Address.T, Sound.ALSA.Sequencer.Address.T) | ||
74 | |||
75 | (_, ()) <- execRWST loop env (emptyLoopState startTime) | ||
67 | return () | 76 | return () |
68 | 77 | ||
69 | loop = do | 78 | loop = do |