groworld/plant-eyes/sound.ss
2009-08-25 09:55:32 +01:00

12 lines
318 B
Scheme

#lang scheme/base
(require scheme/class fluxus-016/fluxus)
(provide (all-defined-out))
(define audio-on #t)
(when audio-on (oa-start)) ;; start openAL audio
(define (play-sound sound pos freq vol)
(when audio-on (let ((noise (oa-load-sample (fullpath sound))))
(oa-play noise pos freq vol))))