]> gitweb.factorcode.org Git - factor.git/blob - extra/sokoban/sound/sound.factor
sokoban: removing music.wav, it's pretty but it's over 40mb.
[factor.git] / extra / sokoban / sound / sound.factor
1 ! Copyright (C) 2009 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors timers audio audio.engine audio.loader calendar
4 destructors io kernel locals math math.functions ranges specialized-arrays
5 sequences random math.vectors literals ;
6
7
8 IN: sokoban.sound
9
10 : create-engine ( -- engine )
11     f 10 <audio-engine> ;
12
13 :: play-beep ( engine -- )
14     $[ "vocab:sokoban/resources/once.wav" read-audio ] :> once-sound
15     engine start-audio*
16     
17     engine T{ audio-source f { 0.0 0.0 0.0 } 1.0 { 0.0 0.0 0.0 } f } once-sound f
18         play-static-audio-clip drop ;