[Haskell-cafe] Re : OpenAL
Paul Langevin
kkwweett at hotmail.fr
Fri Feb 6 05:29:28 EST 2009
For those who follow, I finally find the way to mix (simpler than I thought)
import Sound.ALUT
playSound :: IO ()
playSound = withProgNameAndArgs runALUT $ \ _ _ -> do
↠ buffer1 <- createBuffer $ Sine 440 0 1
↠ buffer2 <- createBuffer $ HelloWorld
↠ [source1,source2] <- genObjectNames 2
↠ buffer source1 $= Just buffer1
↠ buffer source2 $= Just buffer2
↠ play [source1,source2]
↠ sleep 2
↠ return ()
main = playSound
(sorry if unicode if ugly, I don't know what to do with spaces)
_________________________________________________________________
Téléphonez gratuitement à tous vos proches avec Windows Live Messenger ! Téléchargez-le maintenant !
http://www.windowslive.fr/messenger/1.asp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090206/300016a8/attachment.htm
More information about the Haskell-Cafe
mailing list