samer@0: (load "audio.scm") samer@0: samer@0: (define fmt (stereo 44100)) ; see audio.scm for other options samer@0: samer@0: (define in (linesrc fmt)) samer@0: (define out (linesnk fmt)) samer@0: (define N 2048) ; frame size for audio transfers samer@0: (define x (VVector. "x" N)) ; frame of audio data samer@0: samer@0: ; this sets up the tasks to run in the main loop, but samer@0: ; nothing happens until the loop is started samer@0: (addtasks samer@0: (.reader in (.array x) 0 N) ; read N samples into x samer@0: (switch (.writer out (.array x) 0 N)) samer@0: ) samer@0: