initial framework added
[fp1415-soccerfun.git] / src / StdLibExt / StdIOExt.icl
1 implementation module StdIOExt
2
3 /** Collection of functions that extend functionality of StdIO.
4 */
5 import StdEnv
6 import StdIO
7 import clCCall_12
8 from iostate import appIOToolbox
9
10 /** makeSound path ioSt
11 plays a sound file, located at path. If no such file is found, the function
12 aborts.
13 */
14 makeSound :: !String -> (IOSt .l) -> IOSt .l
15 makeSound file = appIOToolbox (osSound file)
16 where
17 osSound :: !String !*OSToolbox -> *OSToolbox
18 osSound file tb
19 # (ok,tb) = winPlaySound file tb
20 | ok = tb
21 | otherwise = abort ("makeSound: unable to play sound file" +++ file +++ ".\n")