~2:*~A - ~A


 

Abstract

LISPBUILDER-SDL-MIXER provides a Common Lisp binding to the SDL_mixer library. The library mixes multiple samples into one or more audio output channels. Lisp callbacks provide the capability to implement custom mixing algorithms and custom audio effects over and above the distance attenuation, panning and reverse stereo effects provided by the SDL_mixer library. WAVE, MOD, MIDI, OGG, AIFF, RIFF and VOC formats are supported.

LISPBUILDER-SDL-MIXER has a dependency on LISPBUILDER-SDL.

The code comes with a MIT-style license so you can basically do with it whatever you want.

Download shortcut: http://www.balooga.com/lispbuilder/~:*~A.tgz.


 

Example of Usage

;; Load an mp3 music file and play the file continuously.
(sdl:with-init (sdl:sdl-init-video sdl:sdl-init-audio)
  (sdl:window 50 10)

  (sdl-mixer:OPEN-AUDIO)
  (let ((music (sdl-mixer:load-music "sample.mp3")))
    (sdl-mixer:play-music music :loop t)

    (sdl:with-events ()
      (:quit-event ()
		   (sdl-mixer:Halt-Music)
		   (sdl-mixer:free music)
		   (sdl-mixer:close-audio)
		   t)
      (:idle () (sdl:update-display)))))
	

 

Contents

  1. Abstract
  2. Dependencies
  3. Download
  4. Installation
  5. Usage
  6. Examples
  7. Support
  8. License
  9. API Overview
  10. The ~A dictionary
  11. Acknowledgements

 

Dependencies


 

Download

Current Version: The latest stable version of ~2:*~A, together with this documentation can be downloaded from http://www.balooga.com/lispbuilder/~:*~A.tgz. The current version is 0.2.0.

Development: The latest developement version is available via anonymous SVN:

svn co https://lispbuilder.svn.sourceforge.net/svnroot/lispbuilder lispbuilder-sdl-mixer


 

Installation

See the LISPBUILDER documentation for installation instructions for Windows, Mac OS-X and Linux.
 

Using LISPBUILDER-SDL-MIXER

Enter the following at the REPL to compile and load the LISPBUILDER-SDL-MIXER package:
(asdf:operate 'asdf:load-op :lispbuilder-sdl-mixer)
ASDF will automatically load and compile the CFFI and :LISPBUILDER-SDL dependencies.
 

Included Examples

Enter the following at the REPL to compile and load the examples included in the LISPBUILDER-SDL-MIXER-EXAMPLES package:
(asdf:operate 'asdf:load-op :lispbuilder-sdl-mixer-examples)
Run the examples by entering any of the following at the REPL:
(SDL-MIXER-EXAMPLES:MIXER)

 

Documentation, Support & Mailing Lists

Questions answered and help given on the lispbuilder discussion list. Documentation for LISPBUILDER-SDL and related packages is available on the LISPBUILDER project page on Sourceforge. For additional information, look at the Lisp Gardeners page, and Application Builder page on the ALU's (Association of Lisp Users) wiki.
 

License

LISPBUILDER-SDL-MIXER is distributed under the MIT-style license.
 

API Overview


 

The ~A dictionary