Audio Mixer 3.6
Stacks Image 7
Above: screenshots from two of the included examples (version 3.1)
Audio mixer 3.6 is a completely reworked version of the audio mixer featured in the Amiga Tech Audio Mixing example. This version has a completely reworked API, much more detailed documentation, extra examples, integration with C programs and several new features.

Note: see here for the Amiga Tech audio mixing example.

Features:
  • Up to four samples can be mixed onto a single hardware channel.
  • High performance: mixing four samples onto a single channel at 11KHz takes only 3.7% CPU time on a 7MHz 68000 without Fast RAM.
  • Optional High Quality mode that uses much more CPU time, but plays full 8-bit samples instead of pre-processed ones.
  • Can be run while a music playback routine is running, as long as the music routine does not access the hardware channel(s) used by the Audio Mixer.
  • Up to four hardware channels can be assigned to the Audio Mixer, allowing up to 16 samples being played back at the same time.
  • Sample playback is priority based, so that drowning out of important effects can be prevented.
  • Samples can be stored anywhere in RAM, including in Fast RAM and Slow RAM.
  • Samples can be set to loop and both looping/non-looping samples can be stopped on request. Looping samples can either restart from the start of the sample, or from an offset in the sample.
  • Samples can be assigned to one of the virtual channels the mixer uses (up to 4 per hardware channel), allowing fine-grained control of SFX playback.
  • Supports playback of samples of any size that will fit in RAM*.
  • Supports the use of a callback routine whenever sample playback ends, to allow custom code to be executed on sample end. The callback routine can immediately play back another sample if desired, which allows for seamless sample-to-sample playback using this method.
  • Supports the use of optional plugins via a plugin system. These plugins can either be used as control/communication mechanism to other code, or to alter sample data in real time. There are several plugins included and custom plugins are also supported. Included plugins are: MixPluginRepeat() - plays the sample sample again after a given delay; MixPluginSync() - allows various ways to synchronise sample playback with the code that calls the mixer; MixPluginVolume() - allows changing of the playback volume of the sample being played; MixPluginPitch() - allows changing of the pitch of the sample being played.
  • Sample rate used can be configured at assembly time, using standard Paula period values.
  • Fully PC relative code is used to make relocation as easy as possible.

*) in practice, this is limited by the largest maximum single block of free RAM that exists. A system with multiple memory expansions will be limited to a much smaller maximum sample size than the total RAM size would seem to indicate.

Current version:
Download the Audio Mixer 3.6
Full documentation for the Audio Mixer 3.6

Older versions:
Download the Audio Mixer 3.2
Full documentation for the Audio Mixer 3.2