On Thu, Apr 23, 2009 at 3:27 PM, Daniel van den Eijkel <[email protected]> wrote:
> Balazs, > DirectSound actually works for me, as a quick test shows. I changed your > example a little bit to playback a list (code is attached, just an ad-hoc > solution), and tried it with the following program. Depending on how many > other programs run on my computer, it plays perfectly. Thanks! > Daniel > In case of playback problems (say, with many other programs running), you may experiment with increasing `bufSize' - this will increase the latency (with the current setting of 2048, it should be around 50ms), but the result may be more stable. Of course if the synthesis code is not fast enough, this won't help either :) Also if your synth is mono, you can change the line > let waveFormatX = DS.makeWaveFormatX sampleRate 2 DS.SampleInt16 to let waveFormatX = DS.makeWaveFormatX sampleRate 1 DS.SampleInt16 (the second argument is the number of channels), and in `fillAudioBuffer' use `pokeArray' instead of an explicit loop. Balazs
_______________________________________________ haskell-art mailing list [email protected] http://lists.lurk.org/mailman/listinfo/haskell-art
