An audio mixer that supports various file formats for Simple Directmedia Layer.

Overview
SDL_mixer 2.0

The latest version of this library is available from:
http://www.libsdl.org/projects/SDL_mixer/

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.

See the header file SDL_mixer.h and the examples playwave.c and playmus.c
for documentation on this mixer library.

The mixer can currently load Microsoft WAVE files and Creative Labs VOC
files as audio samples, it can load FLAC files with libFLAC, it can load
Ogg Vorbis files with Ogg Vorbis or Tremor libraries, it can load MP3 files
using mpg123 or libmad, and it can load MIDI files with Timidity,
FluidSynth, and natively on Windows, Mac OSX, and Linux, and finally it can
load the following file formats via ModPlug or MikMod: .MOD .S3M .IT .XM.

Tremor decoding is disabled by default; you can enable it by passing
	--enable-music-ogg-tremor
to configure, or by defining MUSIC_OGG and OGG_USE_TREMOR.

libmad decoding is disabled by default; you can enable it by passing
	--enable-music-mp3-mad
to configure, or by defining MUSIC_MP3_MAD
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
WARNING: The license for libmad is GPL, which means that in order to
         use it your application must also be GPL!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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.

To play MIDI files using FluidSynth, 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.

iOS:
In order to use this library on iOS, you should include the SDL.xcodeproj
and Xcode-iOS/SDL_mixer.xcodeproj in your application, add the SDL/include
and SDL_mixer directories to your "Header Search Paths" setting, then add the
libSDL2.a and libSDL2_mixer.a to your "Link Binary with Libraries" setting.

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

Comments
  • Add GME for video game music support

    Add GME for video game music support

    This is a partial merge of the work by @Wohlstand referenced in #233.

    • ~Grabs the latest GME from https://bitbucket.org/mpyne/game-music-emu/src/master/ (commit b3d158)~
    • Grabs music_gme.c and edits to music.c from https://github.com/WohlSoft/SDL-Mixer-X (commit bed335)
    • Modifies music_gme.c to use a new GME_StartTrack, which is simpler to work with than the "process string args" approach that exists in the fork. With this, a single Mix_Music handle can be used and its track changed at any time
    • Modifies music_gme.c to better match the code style in other files (probably could use more work here)

    This is working for me when compiling with Emscripten and running in the browser. I verified these formats work:

    • gbs
    • nsf
    • spc
    • vgm

    I don't have an m3u. There are probably other formats, but I couldn't find a list of what GME supports.

    Unfortunately I'm not sure how to verify this would work on other platforms, hopefully someone can help out there. Particularly, I have no idea how to edit the configure file.

    opened by connorjclark 47
  • Android build with SDL2MIXER_FLAC=ON can't find libFLAC.so

    Android build with SDL2MIXER_FLAC=ON can't find libFLAC.so

    The build can't find libFLAC.so with SDL2MIXER_FLAC=ON on an Android build, causing the build to fail:

    $ ./gradlew build
    
    ...
    
    > Task :buildCMakeDebug FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':buildCMakeDebug'.
    > Expected output file at /project-name/android/build/intermediates/cxx/Debug/6w2m3w14/obj/arm64-v8a/libFLAC.so for target FLAC but there was none
    
    ...
    

    CMakeLists.txt:

    cmake_minimum_required( VERSION 3.18.0 )
    cmake_policy( SET CMP0091 NEW )
    project( appname )
    
    set( SDL_LIBC ON CACHE BOOL "" FORCE )
    set( SDL_TEST OFF CACHE BOOL "" FORCE )
    # https://github.com/libsdl-org/SDL.git
    # release-2.24.1
    add_subdirectory( external/sdl )
    
    set( BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE )
    set( SDL2MIXER_FLAC ON CACHE BOOL "" FORCE )
    set( SDL2MIXER_OPUS OFF CACHE BOOL "" FORCE )
    set( SDL2MIXER_SAMPLES OFF CACHE BOOL "" FORCE )
    set( SDL2MIXER_VENDORED ON CACHE BOOL "" FORCE )
    # https://github.com/libsdl-org/SDL_mixer.git
    # HEAD of 'main' branch as of today: db9da3d416077195a2f84403b2fb40955518b4ab
    add_subdirectory( external/sdl-mixer )
    
    set( SRCS "src/main.cpp" )
    
    set( LIBS
        SDL2::SDL2main
        SDL2::SDL2-static
        SDL2_mixer::SDL2_mixer-static
        )
    
    if( ${CMAKE_SYSTEM_NAME} MATCHES "Android")
        add_library( main SHARED ${SRCS} )
        target_link_libraries( main ${LIBS} )
    else()
        add_executable( ${CMAKE_PROJECT_NAME} ${SRCS} )
        target_link_libraries( ${CMAKE_PROJECT_NAME} ${LIBS} )
    endif()
    

    src/main.cpp:

    #include <SDL.h>
    #include <SDL_mixer.h>
    
    int main( int argc, char** argv )
    {
        SDL_Init( SDL_INIT_EVERYTHING );
        SDL_Quit();
        return 0;
    }
    

    The same CMakeLists.txt builds successfully with SDL2MIXER_FLAC=OFF, as well as on the host Debian 11 system with:

    cmake -B build -G "Ninja Multi-Config" .
    cmake --build build --config Release --parallel $(nproc)
    
    opened by genpfault 22
  • Rebase and update stb_vorbis.h to SDL_sound's version :

    Rebase and update stb_vorbis.h to SDL_sound's version :

    • Keeps the original stb_vorbis as intact as possible so that future updates from mainstream would be painless.
    • Reduces STB_VORBIS_MAX_CHANNELS from 16 to 6 (objections?)
    • Adds several missing libm function overrides,
    • SDL_mixer now requires SDL >= 2.0.9 because of SDL_exp()
    • Fixes slow loads and leaks in start_decoder: https://github.com/nothings/stb/pull/1174
    • Fixes submap array out-of-bounds indexing bug: https://github.com/nothings/stb/pull/1312
    • Replace signed overflow clamps with unsigned overflow: https://github.com/nothings/stb/issues/1168
    • Replaces alloca() usage with setup_malloc() (from libxmp.)
    • Fixes '-Wmaybe-uninitialized' warnings in get_seek_page_info: https://github.com/nothings/stb/pull/1172
    • A minor UBSan fix and suppression: https://github.com/nothings/stb/issues/1168
    • Fixes signature of dummy realloc() for STB_VORBIS_NO_CRT: https://github.com/nothings/stb/pull/1198
    • Renames BUFFER_SIZE macro to STB_BUFFER_SIZE: https://github.com/nothings/stb/pull/1078
    • Pulls in sample-accurate offset patch of Vitaly Novichkov: (stb_vorbis_get_playback_sample_offset, because it's used in OGG_Tell and OGG_GetSome): https://github.com/nothings/stb/issues/1294 https://github.com/nothings/stb/pull/1295
    • Fixes a few warnings here and there in some environments.
    • Replaces two dummy '(void) 0' with 'do {} while(0)'
    opened by sezero 22
  • Use after free bug in Mixer's `OPUS_Delete()` on macOS

    Use after free bug in Mixer's `OPUS_Delete()` on macOS

    There's some background on this issue in the rust-sdl2 project. It seems that on the Mac while Wave files work happily if mixer is unload before the music file is but Opus causes a SEGFAULT.

    Digging deeper, it turns out that there isn't a proper guard in OPUS_Delete to make sure that the Opus library is still loaded.

    The fix seems to be to make sure "opus.loaded" is greater than zero before calling opus.op_free().

    Does this seem reasonable? Also, I noticed that you can leak the Opus libraries if calling OPUS_Load() more than once.

    If this does make sense, I'm happy to write a merge request here. It seems like @Wohlstand would be a good mentor for this if they're willing to help me out.

    invalid 
    opened by RandomInsano 21
  • MOD, native MIDI, and Opus support removed from macOS binaries?

    MOD, native MIDI, and Opus support removed from macOS binaries?

    Hi all,

    This is essentially the same as my issue for SDL_image (https://github.com/libsdl-org/SDL_image/issues/288). Basically, native MIDI as well as decoders for Modplug and Opus have been removed from the official macOS binaries, while they are all still enabled/included (albeit in an "optional" folder) for the Windows binaries.

    I understand making various dependency libraries optional, but is there a way to have pre-built optional dependencies included for the macOS release, the same way they are for Windows? A folder of pre-built frameworks that can be dragged inside the mixer framework or into the same folder as the framework?

    Thanks in advance!

    Austin

    opened by a-hurst 20
  • Fixes of the master_volume behaviour

    Fixes of the master_volume behaviour

    • Make the master_volume variable being atomic
    • Fixed the master_volume behavior at the music (there a middle buffer should be allocated to safely apply the volume effect)

    Bonus: whitespace clean-up at the mixer.c.

    opened by Wohlstand 19
  • Added support of quoted strings in Timidity config

    Added support of quoted strings in Timidity config

    Resolves #334

    An argument of property in Timidity config can be surrounded with " or ' characters to prevent splitting into several arguments if it contains spaces or other delimiter characters.

    If an argument itself contains " characters it should be surrounded with ' characters and vice versa.

    opened by Dasperal 18
  • Release plans

    Release plans

    As far as I can tell, the last release was 2018 and there have been > 300 commits since then. Any chance for a new release? Or perhaps there are blockers for that?

    opened by fingolfin 15
  • Add 'Libs.private' field to pkg-config file

    Add 'Libs.private' field to pkg-config file

    In order to support static linking, SDL_mixer.pc should include a 'Libs.private' field listing all the libraries that SDL_mixer requires.

    This patch adds such a field and also modifies configure.ac so that EXTRA_LDFLAGS (which is now also used as the value of 'Libs.private') no longer includes SDL_LIBS. This is done so as to prevent libraries required by SDL from being listed twice when 'pkg-config --libs --static SDL_mixer' is run (they're already shown because of the 'Requires: sdl' line in SDL_mixer.pc). Makefile.in is also adjusted accordingly.

    Upstream status: submitted https://bugzilla.libsdl.org/show_bug.cgi?id=3278

    Signed-off-by: Rodrigo Rebello [email protected] [Retrieved from: https://git.buildroot.net/buildroot/tree/package/sdl_mixer/0001-Add-Libs.private-field-to-pkg-config-file.patch] Signed-off-by: Fabrice Fontaine [email protected]

    opened by ffontaine 15
  • CMake support for libxmp?

    CMake support for libxmp?

    The current CI fails because libxmp is missing vendored library CMake support: https://github.com/libsdl-org/SDL_mixer/runs/7365768492?check_suite_focus=true

    Maybe we don't need it? It's provided for Visual Studio in VisualC/external

    What's the best way to fix this?

    opened by slouken 14
  • VCRUNTIME140.dll dependency in SDL2_mixer.dll

    VCRUNTIME140.dll dependency in SDL2_mixer.dll

    due to the compiler option /MD and the use of memcpy and memset, including SDL2_mixer.dll will create a dependency on the visual studio run time DLLs, which isn't desirable. Either use SDL_memset / SDL_memcpy or /MT instead of /MD.

    opened by AntTheAlchemist 14
  • API/ABI change request for SDL3

    API/ABI change request for SDL3

    Hello,

    I have a use case to play digital audio samples that have loop points. Loop points are supported by various digital formats, for example RIFF WAV files can store sample points in "smpl" chunks. E.g. the audio sample has a ramp up phase that plays once and then a relatively short segment follows that needs to be looped or repeated seamlessly until the sample is stopped by an API call. Loop points in music samples are supported for certain digital audio formats by SDL_mixer now, but the feature is not possible to do with Mix_Chunk samples without breaking the ABI as I was told.

    Please consider to add some placeholder in the SDL_Chunk structure to allow later addition of support for loop points in digital audio samples that are not music.

    Alternative suggestion: Please unify or merge the digital non music and digital music playback API. This way there is a single interface to play any type of digital audio with optional support for loop points. One historical API that worked that way is HMI Sound Operating System for which the API specification can be found here for an example.

    Thanks.

    opened by klei1984 1
  • add Mix_SetMusicBeat and Mix_GetMusicBeat

    add Mix_SetMusicBeat and Mix_GetMusicBeat

    I have a use case where I must set the position of MIDI music to a particular beat index (something supported by the old allegro 4 midi player, and perhaps other midi players).

    Example MIDI: https://drive.google.com/file/d/1qiE7sVyvQoVRxJftKhz-n4juuArfwri8/view?usp=share_link

    And positions of tunes within:

    0:    Wind Fish
    81:   Overworld
    233:  Hyrule Castle
    553:  Lost Woods
    814:  Great Sea
    985:  East Hyrule
    1153: Dancing Dragon
    1333: Stone Tower
    1556: Villages
    1801: Swamp + Desert
    2069: Outset Island
    2189: Kakariko Village
    2569: Clock Town
    2753: Temple
    2856: Dark World
    3042: Dragon Roost
    3125: Horse Race
    3217: Credits
    3296: Zelda's Lullaby
    

    Note: I'm not certain if there's an off-by-one error in this code, or in the source midi player these positions are defined to work in (allegro 4), but I found I need to take the beat values above and subtract one to get the exact right positioning.

    You can use the playmus example program to seek to a specific tune (you'll need a timidity.cfg and soundfont within your build directory, as always):

    ./playmus -n 552 TheTravelsOfLink.mid
    

    Draft until some feedback (then I'll update the other music interfaces with NULL stubs).

    opened by connorjclark 0
  • cmake: add gme support

    cmake: add gme support

    This adds cmake support for building sdl_mixer with GME music support.

    todo:

    • [ ] libgme is currently unable to be built as a vendored library (like modplug and fluidsynth).
    opened by madebr 0
  • MinGW development package Makefile is missing sed instructions for its pkgconfig

    MinGW development package Makefile is missing sed instructions for its pkgconfig

    I was going to make a PR for this, but I couldn't for the life of me discern how this file was generated by searching through the source and repo history. So, I apologize if perhaps this issue has already been addressed, but as far as I can tell it hasn't.

    This is specifically referring to the consumer Makefile within the MinGW development package, which in the most recent release is located at the root of SDL2_mixer-devel-2.6.2-mingw.zip.

    The equivalent Makefile of the primary SDL2 library has the following sed command under the install-package section:

    install-package:
                (...)
    	    sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/sdl2.pc >$(prefix)/lib/pkgconfig/sdl2.pc; \
                (...)
    

    which of course updates the pkgconfig for the lib so that the prefix entry points to the correct location after installing.

    The aforementioned SDL_mixer version of the Makefile is missing this however, and has such, no matter how the file is used the installed package config will always used the default prefix value of /opt/local/i686-w64-mingw32. If for example one installed the development libraries with make native, they get installed to /usr with the prefix in the pkgconfig then pointing to the wrong location in /opt. This causes any consumers that try to locate the MinGW lib via its '.pc' to experience errors during linking or related auto tests.

    I believe the SDL_mixer equivalent should be:

    install-package:
                (...)
    	    sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/SDL2_mixer.pc >$(prefix)/lib/pkgconfig/SDL2_mixer.pc; \
                (...)
    

    I'm just not sure where to enact this change.

    opened by oblivioncth 3
  • Mix_Chunk sound is buggy and broken (in Windows11)

    Mix_Chunk sound is buggy and broken (in Windows11)

    I was using version 2.0.4 of SDL_mixer and everything worked correctly, after I changed to 2.6.2 the sounds that come out when I play the mix_chunk come out all broken and buggy... but when I all a mix_music everything works correctly... edit1: In addition to these errors, which are generalized to any sound .wav file, also had 1 file .wav (Name: RetroGame.wav, is on github along with all the code) which approximately 10% of the time that started the app, the "Mix_LoadWAV" function of the error saying that "attempt to write protected memory"

    I am using C#, but I am confident that this is not the problem, here is my program code:

    to facilitate c# code analysis, translations of c# links have some changes such as Mix_Chunk ==> Chunk and MixChunk* ==> PChunk 
    and the functions that returned MixChunk* were changed to the last argument of them to be a reference of the returned argument...
    function(..., out chunck)
    
    using SDL_Sharp.Mixer;
    using System;
    
    namespace SDL_PLUS_EXTENSIONS;
    class SoundChunk
    {
        PChunk chunk;
        int volume = MIX.MAX_VOLUME;
    
        public static SoundChunk CreateSoundChunk(string path)
        {
            return new SoundChunk(path);
        }
    
        SoundChunk(string path)
        {
            MIX.LoadWAV(path, out chunk);
            //Console.WriteLine(MIX.GetError());
            if (chunk.IsNull)
                throw new Exception("PChunk not create");
            MIX.VolumeChunk(chunk, volume);
        }
    
        public void Play(int loop)
        {
            if (MIX.PlayChannel(0, chunk, loop) == -1)
            {
                Console.WriteLine(MIX.GetError());
            }
        }
    
        public void SetVolume(int volume)
        {
            this.volume = volume;
            MIX.VolumeChunk(chunk, volume);
        }
    
        ~SoundChunk()
        {
            MIX.FreeChunk(chunk);
        }
    }
    
    class SoundMusic
    {
        public Music music;
        public static SoundMusic CurrentMusic { get; private set; }
    
        static int volume = MIX.MAX_VOLUME;
        public static int CurrentVolume { get => volume; }
    
        public static SoundMusic CreateSoundMusic(string path)
        {
            return new SoundMusic(path);
        }
    
        SoundMusic(string path)
        {
            music = MIX.LoadMUS(path);
            if (music.IsNull)
                throw new Exception("Music not create");
        }
    
        public static void PlayMusic(SoundMusic music, int loop)
        {
            CurrentMusic = music;
            if (MIX.PlayMusic(music.music, loop) == -1)
            {
                Console.WriteLine(MIX.GetError());
            }
        }
    
        public static void SetVolume(int volume)
        {
            SoundMusic.volume = volume;
            MIX.VolumeMusic(SoundMusic.volume);
        }
    
        ~SoundMusic()
        {
            MIX.FreeMusic(music);
        }
    }
    
    static void Main(){
    ...
            SDL.Init(SdlInitFlags.Video | SdlInitFlags.Video);
            MIX.Init(MixInitFlags.Mod);
            const int audio_buffer = 4096;
            MIX.OpenAudio(MIX.DEFAULT_FREQUENCY, MIX.DEFAULT_FORMAT, MIX.DEFAULT_CHANNELS, audio_buffer);
            MIX.AllocateChannels(MIX.CHANNELS);
            //Init SDL/Image/Mixer/Ttf
    
            SoundMusic soundMusic = SoundMusic.CreateSoundMusic("./Files/MUSIC.wav");
            SoundMusic.SetVolume(8);
            SoundMusic.PlayMusic(soundMusic, -1);
    
            SoundChunk soundChunk = SoundChunk.CreateSoundChunk("./Files/RetroGame.wav");
            soundChunk.SetVolume(32);
            soundChunk.Play(3);
    ... loop ...
            MIX.CloseAudio();
            MIX.Quit();
    }
    

    edit2: c++ code (continues with the same error)

    #include <iostream>
    #include "SDL2/SDL.h"
    #include "SDL2/SDL_mixer.h"
    
    int SDL_main(int argc, char* args[]) {
        std::cout << "app start" << std::endl;
    
        SDL_Init(SDL_INIT_EVERYTHING);
        Mix_Init(MIX_INIT_MOD);
        std::cout << "SDL_Init && Mix_Init" << std::endl;
    
        const int audio_buffer = 4096;
        Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, audio_buffer);
        Mix_AllocateChannels(MIX_CHANNELS);
        std::cout << "Mixer Open" << std::endl;
    
        Mix_Chunk* chunk;
        chunk = Mix_LoadWAV("./MUSIC.wav");
        Mix_VolumeChunk(chunk, MIX_MAX_VOLUME);
        std::cout << "Mix_Chunk Load" << std::endl;
    
        Mix_PlayChannel(0, chunk, -1);
    
        bool loop = true;
        while (loop) { /* loop */ }
    
        Mix_FreeChunk(chunk);
        SDL_Quit();
        Mix_Quit();
    
        return 0;
    }
    

    What is wrong with this code? The complete code for this program is on github: https://github.com/GabrielFrigo4/SDL-Sharp/tree/master/Exemples/SDL_EXTENSIONS

    (This is my first time I do an issue, any error or lack of information warns me that I fix)

    opened by GabrielFrigo4 7
Releases(release-2.6.2)
  • release-2.6.1(Jul 12, 2022)

    This is a minor bug-fix release, fixing a packaging issue on Linux.

    Here are the highlights for the 2.6.0 release:

    • API documentation is now available on the wiki: https://wiki.libsdl.org/SDL_mixer
    • Added support for building with CMake
    • Added support for playing Ogg files using stb_vorbis, which is now the default Vorbis backend. To use libvorbis instead, configure using --disable-music-ogg-stb --enable-music-ogg-vorbis
    • Added support for playing FLAC files using dr_flac, which is now the default FLAC music backend. To use libflac instead, configure using --disable-music-flac-drflac --enable-music-flac-libflac
    • Added support for playing MP3 files using dr_mp3, which is now the default MP3 music backend. To use libmpg123 instead, configure using --disable-music-mp3-drmp3 --enable-music-mp3-mpg123
    • Added libxmp support for mod music playback. Modplug is still the default backend for MOD music. To use libxmp instead, configure using --disable-music-mod-modplug --enable-music-mod-xmp
    • Removed support for libmad as a MP3 music backend.
    • Removed support for libmikmod as a MOD music backend.
    • Added Mix_MasterVolume() for additional volume control over all channels
    • Update Mix_Init() return value to match documentation, including MIXER_INIT_* flags for already-initialized modules
    • Added Mix_HasMusicDecoder()
    • Memory leak fixes and F32 format support to fluidsynth player
    • Fixed distorted MIDI playback with FluidSynth if sample rate is out of library's limits
    • Added Mix_ModMusicJumpToOrder() for mod music formats
    • Enabled module internal loops in modplug player
    • Respect original mp3 file offset
    • Support setting soundfont via SDL_SOUNDFONTS in OSX native midi
    • Fixed mp3 file detection
    • Fixes to ogg playback on big-endian devices
    • Added functions to get metadata information: Mix_GetMusicTitle() Mix_GetMusicTitleTag() Mix_GetMusicArtistTag() Mix_GetMusicAlbumTag() Mix_GetMusicCopyrightTag()
    • Add functions to get loop point information: Mix_GetMusicLoopStartTime() Mix_GetMusicLoopEndTime() Mix_GetMusicLoopLengthTime()
    • Added Mix_GetMusicVolume() and Mix_GetMusicPosition()
    • Added Mix_MusicDuration() to return music duration in seconds
    • Fixed music_mpg123 seek bug when sample rate of the file and the stream don't match
    • Timidity improvements, added Mix_SetTimidityCfg()
    • Improved mp3 tag detection/skipping
    • Extended support for WAV files
    • Allow rmid files be opened by native midi
    • Fixed possible crash in win32 native midi
    • Prevent clipping due to volume settings in modplug music
    • Added looping support for Opus files
    • Added looping support for FLAC files
    • Improved OGG looping support
    • Fixed loading Opus audio as audio chunks
    Source code(tar.gz)
    Source code(zip)
    SDL2_mixer-2.6.1-win32-x64.zip(526.13 KB)
    SDL2_mixer-2.6.1-win32-x86.zip(501.57 KB)
    SDL2_mixer-2.6.1.dmg(308.30 KB)
    SDL2_mixer-2.6.1.tar.gz(9.46 MB)
    SDL2_mixer-2.6.1.tar.gz.sig(95 bytes)
    SDL2_mixer-2.6.1.zip(12.74 MB)
    SDL2_mixer-2.6.1.zip.sig(95 bytes)
    SDL2_mixer-devel-2.6.1-mingw.tar.gz(2.70 MB)
    SDL2_mixer-devel-2.6.1-mingw.zip(2.71 MB)
    SDL2_mixer-devel-2.6.1-VC.zip(1.04 MB)
  • release-2.6.0(Jul 8, 2022)

    In addition to new CMake support by @madebr and many bug fixes, here are the highlights since the last release:

    • API documentation is now available on the wiki: https://wiki.libsdl.org/SDL_mixer
    • Added support for building with CMake
    • Added support for playing Ogg files using stb_vorbis, which is now the default Vorbis backend. To use libvorbis instead, configure using --disable-music-ogg-stb --enable-music-ogg-vorbis
    • Added support for playing FLAC files using dr_flac, which is now the default FLAC music backend. To use libflac instead, configure using --disable-music-flac-drflac --enable-music-flac-libflac
    • Added support for playing MP3 files using dr_mp3, which is now the default MP3 music backend. To use libmpg123 instead, configure using --disable-music-mp3-drmp3 --enable-music-mp3-mpg123
    • Added libxmp support for mod music playback. Modplug is still the default backend for MOD music. To use libxmp instead, configure using --disable-music-mod-modplug --enable-music-mod-xmp
    • Removed support for libmad as a MP3 music backend.
    • Removed support for libmikmod as a MOD music backend.
    • Added Mix_MasterVolume() for additional volume control over all channels
    • Update Mix_Init() return value to match documentation, including MIXER_INIT_* flags for already-initialized modules
    • Added Mix_HasMusicDecoder()
    • Memory leak fixes and F32 format support to fluidsynth player
    • Fixed distorted MIDI playback with FluidSynth if sample rate is out of library's limits
    • Added Mix_ModMusicJumpToOrder() for mod music formats
    • Enabled module internal loops in modplug player
    • Respect original mp3 file offset
    • Support setting soundfont via SDL_SOUNDFONTS in OSX native midi
    • Fixed mp3 file detection
    • Fixes to ogg playback on big-endian devices
    • Added functions to get metadata information: Mix_GetMusicTitle() Mix_GetMusicTitleTag() Mix_GetMusicArtistTag() Mix_GetMusicAlbumTag() Mix_GetMusicCopyrightTag()
    • Add functions to get loop point information: Mix_GetMusicLoopStartTime() Mix_GetMusicLoopEndTime() Mix_GetMusicLoopLengthTime()
    • Added Mix_GetMusicVolume() and Mix_GetMusicPosition()
    • Added Mix_MusicDuration() to return music duration in seconds
    • Fixed music_mpg123 seek bug when sample rate of the file and the stream don't match
    • Timidity improvements, added Mix_SetTimidityCfg()
    • Improved mp3 tag detection/skipping
    • Extended support for WAV files
    • Allow rmid files be opened by native midi
    • Fixed possible crash in win32 native midi
    • Prevent clipping due to volume settings in modplug music
    • Added looping support for Opus files
    • Added looping support for FLAC files
    • Improved OGG looping support
    • Fixed loading Opus audio as audio chunks
    Source code(tar.gz)
    Source code(zip)
    SDL2_mixer-2.6.0-win32-x64.zip(526.13 KB)
    SDL2_mixer-2.6.0-win32-x86.zip(501.57 KB)
    SDL2_mixer-2.6.0.dmg(308.28 KB)
    SDL2_mixer-2.6.0.tar.gz(9.46 MB)
    SDL2_mixer-2.6.0.tar.gz.sig(95 bytes)
    SDL2_mixer-2.6.0.zip(12.74 MB)
    SDL2_mixer-2.6.0.zip.sig(95 bytes)
    SDL2_mixer-devel-2.6.0-mingw.tar.gz(2.70 MB)
    SDL2_mixer-devel-2.6.0-mingw.zip(2.71 MB)
    SDL2_mixer-devel-2.6.0-VC.zip(1.04 MB)
  • prerelease-2.5.2(Jun 17, 2022)

    This is a release candidate for 2.6.0.

    In addition to new CMake support by @madebr and many bug fixes, here are the highlights since the last release:

    • Added support for playing Ogg files using stb_vorbis, which is now the default Vorbis backend. To use libvorbis instead, configure using --disable-music-ogg-stb --enable-music-ogg-vorbis
    • Added support for playing FLAC files using dr_flac, which is now the default FLAC music backend. To use libflac instead, configure using --disable-music-flac-drflac --enable-music-flac-libflac
    • Added support for playing MP3 files using dr_mp3, which is now the default MP3 music backend. To use libmpg123 instead, configure using --disable-music-mp3-drmp3 --enable-music-mp3-mpg123
    • Added libxmp support for mod music playback. Modplug is still the default backend for MOD music. To use libxmp instead, configure using --disable-music-mod-modplug --enable-music-mod-xmp
    • Removed support for libmad as a MP3 music backend.
    • Removed support for libmikmod as a MOD music backend.
    • Added Mix_MasterVolume() for additional volume control over all channels
    • Update Mix_Init() return value to match documentation, including MIXER_INIT_* flags for already-initialized modules
    • Added Mix_HasMusicDecoder()
    • Memory leak fixes and F32 format support to fluidsynth player
    • Fixed distorted MIDI playback with FluidSynth if sample rate is out of library's limits
    • Added Mix_ModMusicJumpToOrder() for mod music formats
    • Enabled module internal loops in modplug player
    • Respect original mp3 file offset
    • Support setting soundfont via SDL_SOUNDFONTS in OSX native midi
    • Fixed mp3 file detection
    • Fixes to ogg playback on big-endian devices
    • Added functions to get metadata information: Mix_GetMusicTitle() Mix_GetMusicTitleTag() Mix_GetMusicArtistTag() Mix_GetMusicAlbumTag() Mix_GetMusicCopyrightTag()
    • Add functions to get loop point information: Mix_GetMusicLoopStartTime() Mix_GetMusicLoopEndTime() Mix_GetMusicLoopLengthTime()
    • Added Mix_GetMusicVolume() and Mix_GetMusicPosition()
    • Added Mix_MusicDuration() to return music duration in seconds
    • Fixed music_mpg123 seek bug when sample rate of the file and the stream don't match
    • Timidity improvements, added Mix_SetTimidityCfg()
    • Improved mp3 tag detection/skipping
    • Extended support for WAV files
    • Allow rmid files be opened by native midi
    • Fixed possible crash in win32 native midi
    • Prevent clipping due to volume settings in modplug music
    • Added looping support for Opus files
    • Added looping support for FLAC files
    • Improved OGG looping support
    • Fixed loading Opus audio as audio chunks
    Source code(tar.gz)
    Source code(zip)
    SDL2_mixer-2.5.2-win32-x64.zip(522.23 KB)
    SDL2_mixer-2.5.2-win32-x86.zip(497.98 KB)
    SDL2_mixer-2.5.2.dmg(289.20 KB)
    SDL2_mixer-2.5.2.tar.gz(9.45 MB)
    SDL2_mixer-2.5.2.zip(12.73 MB)
    SDL2_mixer-devel-2.5.2-mingw.tar.gz(2.40 MB)
    SDL2_mixer-devel-2.5.2-mingw.zip(2.41 MB)
    SDL2_mixer-devel-2.5.2-VC.zip(1.02 MB)
  • candidate-2.5.1(May 25, 2022)

  • release-2.0.4(Jan 11, 2022)

    Changes in this release:

    • Removed smpeg support for mp3 music, now that it's replaced by libmpg123
    • Fixed mp3 mad decoder to skip tags, which otherwise would lead to crashes
    • Added support for Opus music playback using opusfile library
    Source code(tar.gz)
    Source code(zip)
Owner
Simple Directmedia Layer
Simple Directmedia Layer (SDL) is a framework for creating cross-platform games and applications.
Simple Directmedia Layer
simple audio mixer for native and web

?? auph ?? Trivial audio mixer API for native and web targets. Online Demo ⚠️ Work in progress! API is constantly changing. The native playback at the

Elias Ku 13 Jul 1, 2022
A simple CLI to extract & save artwork of a 🎵 music/audio file.

artwork-extractor A simple CLI to extract & save artwork of a ?? music/audio file. Usage Dependencies MediaInfoLib On Debian based distros, one may in

Hitesh Kumar Saini 5 Aug 4, 2021
PortAudio is a portable audio I/O library designed for cross-platform support of audio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.

PortAudio 786 Jan 1, 2023
Single file audio playback and capture library written in C.

A single file library for audio playback and capture. Example - Documentation - Supported Platforms - Backends - Major Features - Building - Unofficia

David Reid 2.6k Jan 8, 2023
Audio File Library

Audio File Library

michael pruett 140 Dec 30, 2022
Single file C library for decoding MPEG1 Video and MP2 Audio

PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer Single-file MIT licensed library for C/C++ See pl_mpeg.h for the documentation. Why?

Dominic Szablewski 605 Dec 27, 2022
A simple C++ library for reading and writing audio files.

AudioFile A simple header-only C++ library for reading and writing audio files. Current supported formats: WAV AIFF Author AudioFile is written and ma

Adam Stark 683 Jan 4, 2023
SimplE Lossless Audio

SELA SimplE Lossless Audio A lossless audio codec which aims to be as simple as possible while still having good enough compression ratios. Code Quali

Ratul Saha 207 Sep 13, 2022
A simple and easy-to-use audio library based on miniaudio

raudio A simple and easy-to-use audio library based on miniaudio raudio forks from raylib.audio module to become an standalone library. Actually, it w

Ray 67 Dec 21, 2022
ASS: Audio Stupidly Simple

A single header library for audio decoding and playback

Danny Angelo Carminati Grein 32 Nov 13, 2022
🎵 Music notation engraving library for MEI with MusicXML and Humdrum support and various toolkits (JavaScript, Python)

Verovio is a fast, portable and lightweight library for engraving Music Encoding Initiative (MEI) digital scores into SVG images. Verovio also contain

RISM Switzerland 519 Jan 1, 2023
cute_dsp is a C API for various DSP effects suitable for video games

cute_dsp is a C API for various DSP effects suitable for video games and meant to interface directly with the cute_sound library created by Randy Gaul

Matt Rosen 14 Jan 2, 2023
A C library for reading and writing sound files containing sampled audio data.

libsndfile libsndfile is a C library for reading and writing files containing sampled audio data. Authors The libsndfile project was originally develo

null 1.1k Jan 2, 2023
C library for cross-platform real-time audio input and output

libsoundio C library providing cross-platform audio input and output. The API is suitable for real-time software such as digital audio workstations as

Andrew Kelley 1.6k Jan 6, 2023
C++ Audio and Music DSP Library

_____ _____ ___ __ _ _____ __ __ __ ____ ____ / \\_ \\ \/ / |/ \| | | | \_ \/ \ | Y Y \/ /_ \> <| | Y Y \ | |_|

Mick Grierson 1.4k Jan 7, 2023
Easy and efficient audio synthesis in C++

Tonic Fast and easy audio synthesis in C++. Prefer coding to patching? Love clean syntax? Care about performance? That's how we feel too, and why we m

null 482 Dec 26, 2022
Explore fractals in an audio-visual sandbox

Fractal Sound Explorer Explore fractals in an audio-visual sandbox Download executable on my itch.io page: https://codeparade.itch.io/fractal-sound-ex

null 983 Jan 4, 2023
Audio out with an FTDI UART cable

Audio out with an FTDI UART cable This encodes audio as either PDM (using a first order sigma-delta stage), 32-bits PWM or 64-bits PWM and sends it as

Konrad Beckmann 42 Jun 23, 2022
Sexy, audio-responsive effects on LED strips.

Striptease Sexy, audio-responsive effects on LED strips. For Teensy 4 with Audio Adapter Board, by PJRC. Quick demo Shooting video of LEDs is very tri

Luca Paolini 35 Jun 19, 2022