(index ("with-sound-from-file" 0) ("with-sound-to-file" 604) ("read-items!/u8" 975) ("read-items!/s8" 975) ("read-items!/s16" 975) ("read-items!/s32" 975) ("read-items!/f32" 975) ("read-items!/f64" 975) ("write-items/u8" 1787) ("write-items/s8" 1787) ("write-items/s16" 1787) ("write-items/s32" 1787) ("write-items/f32" 1787) ("write-items/f64" 1787))
(def (sig (procedure "(with-sound-from-file file thunk)" (id with-sound-from-file))) (p "Opens the file named by " (b "file") " for reading (the format is autodetected) and then executes " (b "thunk") " which is a procedure accepting five arguments:") (ul (li (b "handle") ": an opaque pointer to the underlying sndfile object") (li (b "format") ": a three-element list containing the format, the subformat and the endianness of the file") (li (b "samplerate") ": the sample rate of the file") (li (b "channels") ": the number of channels of the file") (li (b "frames") ": the number of audio frames")))
(def (sig (procedure "(with-sound-to-file file format samplerate channels thunk)" (id with-sound-to-file))) (p "Opens the file named by " (b "file") " for writing using the specified parameters. Please refer to the previous section for more informations about the format of the parameters. The procedure thunk is then executed with a single argument " (b "handle") "."))
(def (sig (procedure "(read-items!/u8 handle buffer [n])" (id read-items!/u8)) (procedure "(read-items!/s8 handle buffer [n])" (id read-items!/s8)) (procedure "(read-items!/s16 handle buffer [n])" (id read-items!/s16)) (procedure "(read-items!/s32 handle buffer [n])" (id read-items!/s32)) (procedure "(read-items!/f32 handle buffer [n])" (id read-items!/f32)) (procedure "(read-items!/f64 handle buffer [n])" (id read-items!/f64))) (p "Reads " (b "n") " items from the open file " (b "handle") " in " (b "buffer") " and returns the number of items read. The procedure is safe and it makes sure you're using the right kind of srfi-4 vector and that it is big enough to hold the data. Note that " (b "n") " is optional, by omitting it the library assumes you want to read enough data to fill the whole buffer."))
(def (sig (procedure "(write-items/u8 handle buffer [n])" (id write-items/u8)) (procedure "(write-items/s8 handle buffer [n])" (id write-items/s8)) (procedure "(write-items/s16 handle buffer [n])" (id write-items/s16)) (procedure "(write-items/s32 handle buffer [n])" (id write-items/s32)) (procedure "(write-items/f32 handle buffer [n])" (id write-items/f32)) (procedure "(write-items/f64 handle buffer [n])" (id write-items/f64))) (p "Writes " (b "n") " items to the open file " (b "handle") " from " (b "buffer") " and returns the number of items written. The procedure is safe and it makes sure you're using the right kind of srfi-4 vector and that it holds enough data. Note that " (b "n") " is optional, by omitting it the library assumes you want to write out the whole buffer."))
