Go to file
Sam Lantinga 4ed68d19e9 Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:36:34 -07:00
.github cmake: disable documentation installation by default 2024-05-02 19:57:45 +02:00
VisualC Updated for SDL3 version changes 2024-05-15 13:04:12 -07:00
VisualC-WinRT Revert "Use dr_mp3 instead of minimp3 for default MP3 support" 2024-01-14 12:10:37 -08:00
Xcode Updated for SDL3 version changes 2024-05-15 13:04:12 -07:00
build-scripts wikiheaders: Updated to latest from SDL3. 2024-05-16 11:44:35 -04:00
cmake Add Mix_Version to symbol version script 2024-05-15 22:46:44 +02:00
examples Updated for the SDL3 RW -> IO changes 2024-03-18 15:00:34 -07:00
external Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:36:34 -07:00
include/SDL3_mixer Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:36:34 -07:00
mingw/pkg-support/cmake CMake updates for SDL3 2023-01-07 13:49:27 +01:00
src update after SDL3 SDL_MIX_MAXVOLUME removal and SDL_MixAudio api change 2024-05-17 18:55:50 +03:00
.clang-format Updated .editorconfig and added .clang-format for SDL_mixer 2023-07-03 07:18:24 -07:00
.editorconfig README.txt also uses DOS linefeeds 2023-07-03 07:25:29 -07:00
.gitignore cmake: clone manpage scripts from SDL repo 2023-06-27 20:11:38 +02:00
.gitmodules update vendored wavpack to latest release 5.7.0 2024-03-03 03:01:40 +03:00
.wikiheaders-options Updated for SDL3 version changes 2024-05-15 13:04:12 -07:00
Android.mk Revert "Use dr_mp3 instead of minimp3 for default MP3 support" 2024-01-14 12:10:37 -08:00
CHANGES.txt Updated patch notes for SDL_mixer 3.0 2023-01-11 17:39:00 -08:00
CMakeLists.txt cmake: disable documentation installation by default 2024-05-02 19:57:45 +02:00
LICENSE.txt Updated copyright for 2024 2024-01-01 13:23:55 -08:00
README-versions.md build: Use minor version number for feature releases 2022-05-05 20:15:10 +03:00
README.txt Revert "Use dr_mp3 instead of minimp3 for default MP3 support" 2024-01-14 12:10:37 -08:00
release_checklist.md Removed references to patchlevel 2024-05-15 13:21:00 -07:00

README.txt

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.


SDL_mixer 3.0

The latest version of this library is available from GitHub:
https://github.com/libsdl-org/SDL_mixer/releases

Due to popular demand, here is a simple multi-channel audio mixer.
It supports 8 channels of 16 bit stereo audio, plus a single channel of music. It can load FLAC, MP3, Ogg, VOC, and WAV format audio. It can also load MIDI, MOD, and Opus audio, depending on build options (see the note below for details.)

See the header file SDL_mixer.h and the examples playwave.c and playmus.c for documentation on this mixer library. This documentation is also available online at https://wiki.libsdl.org/SDL_mixer

The process of mixing MIDI files to wave output is very CPU intensive, so if playing regular WAVE files sound great, but playing MIDI files sound choppy, try using 8-bit audio, mono audio, or lower frequencies.

If you have built with FluidSynth support, you'll need to set the SDL_SOUNDFONTS environment variable to a Sound Font 2 (.sf2) file containing the musical instruments you want to use for MIDI playback.
(On some Linux distributions you can install the fluid-soundfont-gm package)

To play MIDI files using Timidity, you'll need to get a complete set of GUS patches from:
http://www.libsdl.org/projects/mixer/timidity/timidity.tar.gz
and unpack them in /usr/local/lib under UNIX, and C:\ under Win32.

This library is under the zlib license, see the file "LICENSE.txt" for details.

Note:
Support for software MIDI, MOD, and Opus are not included by default because of the size of the decode libraries, but you can get them by running external/download.sh
- When building with CMake, you can enable the appropriate SDL3MIXER_* options defined in CMakeLists.txt. SDL3MIXER_VENDORED allows switching between system and vendored libraries.
- When building with configure/make, you can build and install them normally and the configure script will detect and use them.
- When building with Visual Studio, you will need to build the libraries and then add the appropriate LOAD_* preprocessor define to the Visual Studio project.
- When building with Xcode, you can edit the config at the top of the project to enable them, and you will need to include the appropriate framework in your application.
- For Android, you can edit the config at the top of Android.mk to enable them.

The default MP3 support is provided using minimp3. SDL_mixer also supports using libmpg123: you can enable it by passing --enable-music-mp3-mpg123 to configure.