groworld/plant-eyes/scripts/sound.ss
2009-10-14 19:00:45 +01:00

14 lines
384 B
Scheme

;; p l a n t e y e s [ copyright (c) 2009 foam vzw : gpl v3 ]
#lang scheme/base
(require scheme/class fluxus-016/fluxus)
(provide (all-defined-out))
(define audio-on #f)
(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))))