Mercurial > hg > jslab
view examples/sound/sampled/play2.scm @ 5:b67a33c44de7
Remove some crap, etc
author | samer |
---|---|
date | Fri, 05 Apr 2019 21:34:25 +0100 |
parents | bf79fb79ee13 |
children |
line wrap: on
line source
(load "audio.scm") (define fmt (stereo 44100)) ; see audio.scm for other options (define in (linesrc fmt)) (define out (linesnk fmt)) (define N 2048) ; frame size for audio transfers (define x (VVector. "x" N)) ; frame of audio data ; this sets up the tasks to run in the main loop, but ; nothing happens until the loop is started (addtasks (.reader in (.array x) 0 N) ; read N samples into x (switch (.writer out (.array x) 0 N)) )