SDL Mixer X

SDL mixer version 2.0 - part of Simple DirectMedia Layer (SDL) library which giving complex audio functions, mainly for sound mixing.

This part appending to SDL additional functions which giving able to play more sound and music formats.

SDL Mixer used in the PGE Project as part of default audio engine and also included by Wohlstand and Kevsoft into the LunaDLL to replace the MCI audio engine to take able play more music formats inside SMBX.

Because original SDL Mixer has some issues, Wohlstand has been forked this library to resolve them and also implement new features to it. Name of a forked version is SDL Mixer X (SDL2_mixer_ext).

Music Formats
SDL_Mixer have support of playback for next formats which can be played in the music stream:

Standard music formats

WAV 	Microsoft PCM, Uncompressed audio VOC 	Creative Labs Audio File MP3 	MPEG-2 Layer 3, Lossy data compressed audio (Will play MP3 correctly only if it was built with using of libMAD library) OGG 	OGG Vorbis, Lossy data compressed audio FLAC 	Free Lossless Audio Codec, Loss-less compressed MIDI 	Music Instrument Digital Interface, commands list

Game music emulators formats

Note: There are not supported in official (at libsdl.org) builds of SDL2_mixer but support was implemented in the modified version of this library which usually includes with LunaLUA and with PGE Project package.

AY	ZX Spectrum/Amstrad CPC GBS 	Nintendo Game Boy GYM 	Sega Genesis/Mega Drive HES 	NEC TurboGrafx-16/PC Engine KSS 	MSX Home Computer/other Z80 systems (doesn't support FM sound) NSF/NSFE 	Nintendo NES/Famicom (with VRC 6, Namco 106, and FME-7 sound) SAP 	Atari systems using POKEY sound chip SPC 	Super Nintendo/Super Famicom VGM/VGZ 	Sega Master System/Mark III, Sega Genesis/Mega Drive,BBC Micro

Tracker music formats

669 	Composer 669, Unis 669 AMF 	DSMI Advanced Module Format AMF 	ASYLUM Music Format V1.0 APUN 	APlayer DSM 	DSIK internal format FAR 	Farandole Composer GDM 	General DigiMusic IT 	Impulse Tracker IMF 	Imago Orpheus MOD 	15 and 31 instruments MED 	OctaMED MTM 	MultiTracker Module editor OKT 	Amiga Oktalyzer S3M 	Scream Tracker 3 STM 	Scream Tracker STX 	Scream Tracker Music Interface Kit ULT 	UltraTracker UNI 	MikMod XM 	FastTracker 2

SFX Formats
SDL_Mixer have a support of playback for next sound effects which can be preloaded into memory played in difference channels with mixing:

WAV 	Microsoft PCM, Uncompressed audio VOC 	Creative Labs Audio File OGG 	OGG Vorbis, Lossy data compressed audio FLAC 	Free Lossless Audio Codec, Loss-less compressed

Differences and improvements in comparison to original SDL Mixer

 * Added much more music formats (Such a game music emulators)
 * Added support of the loop points in the OGG files (via LOOPSTART and LOOPEND (or LOOPLENDTH) meta-tags)
 * In the Modplug module enabled internal loops (tracker musics with internal loops are will be looped rightly)
 * Forked version now has ADLMIDI midi sequences together with Native MIDI, Timidity and Fluidsynth. ADLMIDI is OPL-Synth Emulation based MIDI player.
 * Added new API functions
 * Ability to redefine Timidity patches path. So, patches folders are can be stored in any place!
 * Added functions to retrieve some meta-tags: Title, Artist, Album, Copyright
 * Added ADLMIDI Extra functions: Change bank ID, enable/disable high-level tremolo, enable/disable high-level vibrato, enable/disable scalable modulation
 * WIP attempt to add own re-sample function to avoid glitches caused with wrong sample rate.

Issues
Here is a list of known issues of SDL Mixer v2.0 library:
 * Fade-IN in some cases is not working correctly, but Fade-Out working perfectly [Fixed]
 * Official build of SMPEG library can't play MP3 on Windows and Linux system, but on some Mac OS computers it working fine. To fix this issue need a rebuild of SDL_mixer library with using of libMAD library.
 * Wrongly working real-time re-sampling of music files to get fit into united audio stream. For example, musics with sample rate less than sample rate of stream will cause soft breakthroughs of playback. But if musics have a sample rate more than sample rate of stream will cause noisy playback. (for example, musics with 32000 Hz will be played with breakthroughs in the 44100 Hz stream, but in the same stream musics with 48000 Hz will be played noisy and buggy). To escape this issue you should re-sample your music file manually to get correct playback in the defined sample rate of stream.

Links

 * Official documentation of SDL Mixer library API
 * Source code of a forked SDL Mixer version by Wohlstand (SDL Mixer X) (Building with qmake && make from Qt 5).