1 ! Copyright (C) 2008 Alex Chapman
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors io.files kernel openal sequences ;
8 : assign-sound ( source wav-path -- )
9 resource-path create-buffer-from-wav AL_BUFFER swap set-source-param ;
11 : <sounds> ( -- sounds )
12 init-openal 1 gen-sources first sounds boa
13 dup bang>> "extra/jamshred/sound/bang.wav" assign-sound ;
15 : bang ( sounds -- ) bang>> source-play check-error ;