diff --git a/README.md b/README.md new file mode 100644 index 0000000..714bc56 --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +
Mixalot is a collection of systems related to audio in Common Lisp, +under an MIT-style license. Currently it consists of a mixer component +providing real-time audio output on Linux (via ALSA) and other +platforms (using libao), +CFFI bindings to +the libmpg123, libFLAC, +and libvorbisfile +libraries, and audio stream classes for simple playback of MP3, Ogg, +and FLAC files through the mixer.
+ +The documentation is available at [http://vintage-digital.com/hefner/software/mixalot/mixalot.html](http://vintage-digital.com/hefner/software/mixalot/mixalot.html) + +This library is for example used in the +[Shuffletron](https://github.com/ahefner/shuffletron/) music player. + + +The most recent development version of Mixalot is hosted on github and can be obtained as follows:
++git clone git://github.com/ahefner/mixalot.git+ +
Mixalot includes several ASDF systems which should be symlinked into the ASDF central registry in the usual fashion. It depends directly on the following systems:
+You may find this library useful for the following purposes:
+The CFFI and bordeaux-threads libraries are used to ease porting +between lisp implementations. The mixer component of Mixalot chooses +at compile time to use ALSA (on Linux) +or libao (everywhere else) and +should be able to produce audio on any platform supported by libao. In +order to be useful in an application, the mixer must also run in its +own (native) thread. Therefore, the mixalot +and mixalot-mp3 systems should be usable on CL +implementations capable of running multiple threads, on Linux or +platforms supported by libao. It has been tested and is known to work +in the following configurations:
+The mpg123-ffi system is independent and should be usable on any CL supported by CFFI.
diff --git a/vorbis-stream.lisp b/vorbis-stream.lisp index 3b79be7..8dd0eb4 100644 --- a/vorbis-stream.lisp +++ b/vorbis-stream.lisp @@ -36,12 +36,12 @@ ;; XXX DUBIOUS (unless (= output-rate rate) #+NIL - (raise-vorbis-error "Open Ogg Vorbis file" + (warn-vorbis-error "Open Ogg Vorbis file" "Sample rate doesn't match requested rate.") (warn "Sample rate doesn't match requested rate: ~:D vs expected ~:D" rate output-rate)) (unless (or (= channels 2) (= channels 1)) - (raise-vorbis-error "Open Ogg Vorbis file" + (warn-vorbis-error "Open Ogg Vorbis file" "Vorbis file is not mono or stereo.")) (rotatef handle uhandle)) (when uhandle (vorbis-close uhandle)))) diff --git a/vorbisfile-package.lisp b/vorbisfile-package.lisp index 5153b2c..8a70f46 100644 --- a/vorbisfile-package.lisp +++ b/vorbisfile-package.lisp @@ -3,7 +3,7 @@ (:export #:vorbis-error #:vorbis-strerror #:check-vorbis-error - #:raise-vorbis-error + #:warn-vorbis-error #:vorbis-new #:vorbis-delete diff --git a/vorbisfile.lisp b/vorbisfile.lisp index 89791cd..bfe6282 100644 --- a/vorbisfile.lisp +++ b/vorbisfile.lisp @@ -147,23 +147,22 @@ (defun vorbis-strerror (result) (cdr (assoc result *vorbis-strerror* :test #'eql))) -(defun raise-vorbis-error (circumstance message) - "Raise an error for the vorbisfile library. Circumstance is a string - that describes the circumstance under which this error was raised, and - message is a string that (tries to) explain the error." - (error 'vorbis-error - :text (format nil "~A: ~A" circumstance message))) +(defun warn-vorbis-error (circumstance message) + "Warn for an error for the vorbisfile library. Circumstance is a string + that describes the circumstance under which this warning was raised, and + message is a string that (tries to) explain it." + (warn "~A: ~A" circumstance message)) (defun check-vorbis-error (circumstance result) "Check if an error has occured in the vorbisfile library calls." (when (< result 0) - (raise-vorbis-error circumstance + (warn-vorbis-error circumstance (vorbis-strerror result)))) (defun check-vorbis-pointer-error (circumstance pointer) "Check if an error has occured in the vorbisfile library calls pertaining to a pointer." (if (null-pointer-p pointer) - (raise-vorbis-error circumstance + (warn-vorbis-error circumstance "Operation performed on invalid physical or logical stream.") pointer))