Hi, I am developing a calculator simulator which can do simple beeps. The simulator figures out the frequency and duration of the beep and informs a separate thread about it. That thread is then supposed to perform the actual playing of the beep.
So far I have tried to use Synthesizer and I can sometimes get some fragments of beeps to occur, but it is very erratic and often/soon I tend to get: <interactive>: fd:19: hPutBuf: resource vanished (Broken pipe) after which no beeps occurs. Probably my thread dies when this happens. I modified the oscillator example in Synthesizer.Plain.Tutorial to: oscillator :: Double -> Int -> IO ExitCode oscillator step len = play (SigSt.take len $ Osci.static SigG.defaultLazySize Wave.square NP.zero step) My idea is to use 'take' to limit the length of the play as the original example played forever. Example values used are 0.03 and 10000 Why do I have this problem? Am I doing something wrong? Are there other portable ways of doing this? Versions: Synthesizer 0.2.0.1, Mac OS X 10.5.7 Intel, sox v14.3.0 Regards, Håkan
_______________________________________________ haskell-art mailing list [email protected] http://lists.lurk.org/mailman/listinfo/haskell-art
