Skip to content

@petermarks /gist:974782
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Pulse test
module Main where
import Sound.Pulse.Simple
main=do
s<-simpleNew Nothing "example" Play Nothing "this is an example application"
(SampleSpec (F32 LittleEndian) 44100 1) Nothing Nothing
simpleWrite s (take 44100 (test 440) ++ take 44100 (test 330) )
simpleDrain s
simpleFree s
test :: Int -> [Float]
test f = cycle (replicate p 1.0 ++ replicate p (-1.0))
where p = 22050 `div` f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.