{- 

HOpenGL Tutorial
http://www.cin.ufpe.br/~hopengl/
Copyright (C) 2002  Andre Furtado <awbf@cin.ufpe.br>

This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This is a HOpenGL sound example module (supported only in win32 platforms... :[).
-}

import Sound
import GLUT
import GL

main :: IO ()
main = do
	GLUT.init Nothing
	createWindow "Sound Example" (return ()) [ Single, GLUT.Rgb ]
			(Just (WindowPosition 100 100))
			(Just (WindowSize     300 250))
	keyboardFunc (Just keyboard)
	mainLoop

keyboard :: KeyboardAction
keyboard '1' _ = playSound "1.wav" nullAddr [Async]      >>= \soundStatus -> print soundStatus
keyboard '2' _ = playSound "2.wav" nullAddr [Sync]       >>= \soundStatus -> print soundStatus
keyboard '3' _ = playSound "3.wav" nullAddr [Loop,Async] >>= \soundStatus -> print soundStatus
keyboard '4' _ = playSound "4.wav" nullAddr [NoStop]     >>= \soundStatus -> print soundStatus
keyboard  _  _ = return ()
