#lang racket/base (require (planet gcr/libvorbisfile) (planet gcr/libvorbisfile/rsound-compat)) ;; I don't want clements/rsound to be a dependency of vorbisfile ;; unless this file is run. ;; Replace all this junk with (require (planet clements/rsound)) to ;; see what's going on here. (Sorry for all the verbosity!) (define play (dynamic-require '(planet clements/rsound) 'play)) (define filename (vector-ref (current-command-line-arguments) 0)) (displayln "Loading sound...") (define o (open-vorbis-file filename)) (define s (vorbis->rsound o)) (displayln "Playing 30s of sound...") (play s) (sleep 30)