Audio test. pasted by Jubjub on Thu Apr 24 23:48:10 2014

(use openal)
(use al)
(use alc)
(use srfi-4)

(define device (alc:OpenDevice #f))
(define context (alc:CreateContext device #f))
(define data (make-u8vector 600000))

(define (sound i)
  (/ (modulo i 60) 60))

(let loop ((i 0))
  (unless (>= i 600000)
  (u8vector-set! data i (inexact->exact (floor (max 0 (min 256 (* 256 (sound i)))))))
  (loop (+ 1 i))))

(alc:MakeContextCurrent context)
(define buffer (openal:make-buffer data #f 44100))
(define source (openal:make-source buffer))

(al:Sourcei source al:LOOPING 1)
(al:SourcePlay source)
(read-line)
(alc:MakeContextCurrent #f)
(alc:DestroyContext context)
(alc:CloseDevice device)

testing openal egg for JubJub added by certainty on Fri Apr 25 08:09:02 2014

;; I had to install lib32-openal and freealut to the eggs compile
;; I compiled the snipped simply with csc
;; Error is:
Error: unbound variable: read-line

        Call history:

        jubjub.scm:15: floor      
        jubjub.scm:15: u8vector-set!      
        jubjub.scm:16: loop       
        jubjub.scm:15: sound      
        jubjub.scm:11: modulo     
        jubjub.scm:15: min        
        jubjub.scm:15: max        
        jubjub.scm:15: floor      
        jubjub.scm:15: u8vector-set!      
        jubjub.scm:16: loop       
        jubjub.scm:18: alc#alc:MakeContextCurrent         
        jubjub.scm:19: openal#openal:make-buffer          
        jubjub.scm:20: openal#openal:make-source          
        jubjub.scm:22: al#al:Sourcei      
        jubjub.scm:23: al#al:SourcePlay   
        jubjub.scm:24: read-line                <--
AL lib: (EE) alc_cleanup: 2 devices not closed