| | |
| | | (defmethod! sox-process ((sox-input sox-hoaencode) (sox-effect string) &key output filetype samplerate bitdepth recursive batch-mode) |
| | | (if (probe-file *sox-path*) |
| | | (progn |
| | | (when |
| | | (not (listp (sound sox-input))) |
| | | (om-message-abort "sound must be a list.") |
| | | ) |
| | | (when |
| | | (not |
| | | (or |
| | | (subtypep (type-of (positions sox-input)) '3dc) |
| | | (and (subtypep (type-of (positions sox-input)) 'list) (> (length (positions sox-input)) 0) (subtypep (type-of (first (positions sox-input))) 'list) (> (length (first (positions sox-input))) 1))) |
| | | ) |
| | | (om-message-abort "positions must be of type 3dc, or a list of lists.") |
| | | ) |
| | | (let* |
| | | ( |
| | | (sound |
| | | (if (> (length (positions sox-input)) (length (list! (sound sox-input)))) |
| | | (repeat-n (first (list! (sound sox-input))) (length (positions sox-input))) |
| | | (sound sox-input) |
| | | ) |
| | | (sound sox-input) |
| | | ) |
| | | (positions-ae |
| | | (sox-hoaencode-auto-convert-positions (positions sox-input)) |
| | |
| | | ) |
| | | (let* |
| | | ( |
| | | (outfile (create-path nil output filetype)) |
| | | (filenames (loop for soundfile in sound collect (namestring soundfile))) |
| | | (outfile (create-path nil output filetype)) |
| | | ) |
| | | (setf str (format nil " ~s ~a" (namestring *sox-path*) *sox-options*)) |
| | | (if (= (length filenames) 1) |
| | |
| | | ) |
| | | (setf str |
| | | (cond |
| | | ((equal output "realtime") (sox-samplebits (string+ str " -q ") bitdepth samplerate *sox-audio-device*)) |
| | | ((equal output "pipe") (sox-samplebits str bitdepth samplerate "-p")) |
| | | (t (sox-samplebits str bitdepth samplerate outfile)) |
| | | ((equal output "realtime") |
| | | (sox-samplebits (string+ str " -q ") bitdepth samplerate *sox-audio-device*)) |
| | | ((equal output "pipe") |
| | | (sox-samplebits str bitdepth samplerate "-p")) |
| | | (t |
| | | (sox-samplebits str bitdepth samplerate outfile)) |
| | | ) |
| | | ) |
| | | (setf str (string+ str sox-effect)) |