Using forkIO makes no difference. I tried the following code (and some
variations) but the program still hangs after ca. 40sec at a sampling
rate11025 and ca. 10 sec at 44100. Maybe I'm doing something wrong. But
now I need a break before the next attempt, can't hear this saw anymore
:-) extended write srcOpts dstOpts sampleRate stream = do mvar <- newEmptyMVar bracket (Proc.runInteractiveProcess "play" (Args.decons $ mconcat $ OptPriv.toArguments (mconcat $ srcOpts : Option.numberOfChannels (Frame.withSignal Frame.numberOfChannels stream) : Option.sampleRate sampleRate : Option.format (Frame.withSignal Frame.format stream) : []) : Args.pipe : OptPriv.toArguments dstOpts : []) Nothing Nothing) (\(input,output,err,_proc) -> mapM_ IO.hClose [input, output, err]) (\(input,_,_,proc) -> do -- hSetBuffering input (BlockBuffering Nothing) -- hSetBinaryMode input True forkIO $ do write input stream xcode <- Proc.waitForProcess proc putMVar mvar xcode --putStrLn "done" return () readMVar mvar) Henning Thielemann schrieb: On Tue, 21 Apr 2009, Daniel van den Eijkel wrote:Still no success. I tried all of the following, but the program always hangs after ca. 40 seconds at a sampling rate of 11025. I dont' know what to do now - maybe switch to linux?That's certainly the best. :-)Maybe I'm using runInteractiveProcess the wrong way. The example in the documentation of runInteractiveProcess uses forkIO for feeding the shell command but it doesn't tell whether one must use forkIO. Can you please try whether it works with forkIO? _______________________________________________ haskell-art mailing list haskell-art@lurk.org http://lists.lurk.org/mailman/listinfo/haskell-art |
_______________________________________________ haskell-art mailing list haskell-art@lurk.org http://lists.lurk.org/mailman/listinfo/haskell-art