Show / Hide Table of Contents

# Class SDL_mixer

##### Inheritance

System.Object
SDL_mixer

##### Inherited Members

System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: SDL2

###### Assembly: SDL2-CS.dll

##### Syntax

    public static class SDL_mixer

### Fields

| Improve this Doc View Source

#### MIX_CHANNELS

##### Declaration

    public const int MIX_CHANNELS = 8

##### Field Value

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### MIX_DEFAULT_CHANNELS

##### Declaration

    public static readonly int MIX_DEFAULT_CHANNELS

##### Field Value

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### MIX_DEFAULT_FORMAT

##### Declaration

    public static readonly ushort MIX_DEFAULT_FORMAT

##### Field Value

Type | Description
--- | ---
System.UInt16 |

| Improve this Doc View Source

#### MIX_DEFAULT_FREQUENCY

##### Declaration

    public static readonly int MIX_DEFAULT_FREQUENCY

##### Field Value

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### MIX_MAX_VOLUME

##### Declaration

    public static readonly byte MIX_MAX_VOLUME

##### Field Value

Type | Description
--- | ---
System.Byte |

| Improve this Doc View Source

#### SDL_MIXER_MAJOR_VERSION

##### Declaration

    public const int SDL_MIXER_MAJOR_VERSION = 2

##### Field Value

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### SDL_MIXER_MINOR_VERSION

##### Declaration

    public const int SDL_MIXER_MINOR_VERSION = 0

##### Field Value

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### SDL_MIXER_PATCHLEVEL

##### Declaration

    public const int SDL_MIXER_PATCHLEVEL = 2

##### Field Value

Type | Description
--- | ---
System.Int32 |

### Methods

#### Mix_AllocateChannels(Int32)

##### Declaration

    public static int Mix_AllocateChannels(int numchans)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | numchans |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_ChannelFinished(SDL_mixer.ChannelFinishedDelegate)

##### Declaration

    public static void Mix_ChannelFinished(SDL_mixer.ChannelFinishedDelegate channel_finished)

##### Parameters

Type | Name | Description
--- | --- | ---
SDL_mixer.ChannelFinishedDelegate | channel_finished |

#### Mix_CloseAudio()

##### Declaration

    public static void Mix_CloseAudio()

#### Mix_EachSoundFont(SDL_mixer.SoundFontDelegate, IntPtr)

##### Declaration

    public static int Mix_EachSoundFont(SDL_mixer.SoundFontDelegate function, IntPtr data)

##### Parameters

Type | Name | Description
--- | --- | ---
SDL_mixer.SoundFontDelegate | function |
System.IntPtr | data |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_ExpireChannel(Int32, Int32)

##### Declaration

    public static int Mix_ExpireChannel(int channel, int ticks)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.Int32 | ticks |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### Mix_FadeInChannel(Int32, IntPtr, Int32, Int32)

##### Declaration

    public static int Mix_FadeInChannel(int channel, IntPtr chunk, int loops, int ms)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.IntPtr | chunk |
System.Int32 | loops |
System.Int32 | ms |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_FadeInChannelTimed(Int32, IntPtr, Int32, Int32, Int32)

##### Declaration

    public static int Mix_FadeInChannelTimed(int channel, IntPtr chunk, int loops, int ms, int ticks)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.IntPtr | chunk |
System.Int32 | loops |
System.Int32 | ms |
System.Int32 | ticks |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_FadeInMusic(IntPtr, Int32, Int32)

##### Declaration

    public static int Mix_FadeInMusic(IntPtr music, int loops, int ms)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IntPtr | music |
System.Int32 | loops |
System.Int32 | ms |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_FadeInMusicPos(IntPtr, Int32, Int32, Double)

##### Declaration

    public static int Mix_FadeInMusicPos(IntPtr music, int loops, int ms, double position)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IntPtr | music |
System.Int32 | loops |
System.Int32 | ms |
System.Double | position |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_FadeOutChannel(Int32, Int32)

##### Declaration

    public static int Mix_FadeOutChannel(int which, int ms)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | which |
System.Int32 | ms |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_FadeOutGroup(Int32, Int32)

##### Declaration

    public static int Mix_FadeOutGroup(int tag, int ms)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | tag |
System.Int32 | ms |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_FadeOutMusic(Int32)

##### Declaration

    public static int Mix_FadeOutMusic(int ms)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | ms |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_FadingChannel(Int32)

##### Declaration

    public static SDL_mixer.Mix_Fading Mix_FadingChannel(int which)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | which |

##### Returns

Type | Description
--- | ---
SDL_mixer.Mix_Fading |

#### Mix_FadingMusic()

##### Declaration

    public static SDL_mixer.Mix_Fading Mix_FadingMusic()

##### Returns

Type | Description
--- | ---
SDL_mixer.Mix_Fading |

#### Mix_FreeChunk(IntPtr)

##### Declaration

    public static void Mix_FreeChunk(IntPtr chunk)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IntPtr | chunk |

#### Mix_FreeMusic(IntPtr)

##### Declaration

    public static void Mix_FreeMusic(IntPtr music)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IntPtr | music |

#### Mix_GetChunk(Int32)

##### Declaration

    public static IntPtr Mix_GetChunk(int channel)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |

##### Returns

Type | Description
--- | ---
System.IntPtr |

| Improve this Doc View Source

#### Mix_GetChunkDecoder(Int32)

##### Declaration

    public static string Mix_GetChunkDecoder(int index)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | index |

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### Mix_GetMusicDecoder(Int32)

##### Declaration

    public static string Mix_GetMusicDecoder(int index)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | index |

##### Returns

Type | Description
--- | ---
System.String |

#### Mix_GetMusicHookData()

##### Declaration

    public static IntPtr Mix_GetMusicHookData()

##### Returns

Type | Description
--- | ---
System.IntPtr |

#### Mix_GetMusicType(IntPtr)

##### Declaration

    public static SDL_mixer.Mix_MusicType Mix_GetMusicType(IntPtr music)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IntPtr | music |

##### Returns

Type | Description
--- | ---
SDL_mixer.Mix_MusicType |

#### Mix_GetNumChunkDecoders()

##### Declaration

    public static int Mix_GetNumChunkDecoders()

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_GetNumMusicDecoders()

##### Declaration

    public static int Mix_GetNumMusicDecoders()

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### Mix_GetSoundFonts()

##### Declaration

    public static string Mix_GetSoundFonts()

##### Returns

Type | Description
--- | ---
System.String |

#### Mix_GetSynchroValue()

##### Declaration

    public static int Mix_GetSynchroValue()

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_GroupAvailable(Int32)

##### Declaration

    public static int Mix_GroupAvailable(int tag)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | tag |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_GroupChannel(Int32, Int32)

##### Declaration

    public static int Mix_GroupChannel(int which, int tag)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | which |
System.Int32 | tag |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_GroupChannels(Int32, Int32, Int32)

##### Declaration

    public static int Mix_GroupChannels(int from, int to, int tag)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | from |
System.Int32 | to |
System.Int32 | tag |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_GroupCount(Int32)

##### Declaration

    public static int Mix_GroupCount(int tag)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | tag |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_GroupNewer(Int32)

##### Declaration

    public static int Mix_GroupNewer(int tag)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | tag |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_GroupOldest(Int32)

##### Declaration

    public static int Mix_GroupOldest(int tag)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | tag |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_HaltChannel(Int32)

##### Declaration

    public static int Mix_HaltChannel(int channel)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_HaltGroup(Int32)

##### Declaration

    public static int Mix_HaltGroup(int tag)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | tag |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_HaltMusic()

##### Declaration

    public static int Mix_HaltMusic()

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_HookMusic(SDL_mixer.MixFuncDelegate, IntPtr)

##### Declaration

    public static void Mix_HookMusic(SDL_mixer.MixFuncDelegate mix_func, IntPtr arg)

##### Parameters

Type | Name | Description
--- | --- | ---
SDL_mixer.MixFuncDelegate | mix_func |
System.IntPtr | arg |

#### Mix_HookMusicFinished(SDL_mixer.MusicFinishedDelegate)

##### Declaration

    public static void Mix_HookMusicFinished(SDL_mixer.MusicFinishedDelegate music_finished)

##### Parameters

Type | Name | Description
--- | --- | ---
SDL_mixer.MusicFinishedDelegate | music_finished |

#### Mix_Init(SDL_mixer.MIX_InitFlags)

##### Declaration

    public static int Mix_Init(SDL_mixer.MIX_InitFlags flags)

##### Parameters

Type | Name | Description
--- | --- | ---
SDL_mixer.MIX_InitFlags | flags |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### MIX_Linked_Version()

##### Declaration

    public static SDL.SDL_version MIX_Linked_Version()

##### Returns

Type | Description
--- | ---
SDL.SDL_version |

| Improve this Doc View Source

#### Mix_LoadMUS(String)

##### Declaration

    public static IntPtr Mix_LoadMUS(string file)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | file |

##### Returns

Type | Description
--- | ---
System.IntPtr |

| Improve this Doc View Source

#### Mix_LoadWAV(String)

##### Declaration

    public static IntPtr Mix_LoadWAV(string file)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | file |

##### Returns

Type | Description
--- | ---
System.IntPtr |

#### Mix_LoadWAV_RW(IntPtr, Int32)

##### Declaration

    public static IntPtr Mix_LoadWAV_RW(IntPtr src, int freesrc)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IntPtr | src |
System.Int32 | freesrc |

##### Returns

Type | Description
--- | ---
System.IntPtr |

#### Mix_OpenAudio(Int32, UInt16, Int32, Int32)

##### Declaration

    public static int Mix_OpenAudio(int frequency, ushort format, int channels, int chunksize)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | frequency |
System.UInt16 | format |
System.Int32 | channels |
System.Int32 | chunksize |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_Pause(Int32)

##### Declaration

    public static void Mix_Pause(int channel)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |

#### Mix_Paused(Int32)

##### Declaration

    public static int Mix_Paused(int channel)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_PausedMusic()

##### Declaration

    public static int Mix_PausedMusic()

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_PauseMusic()

##### Declaration

    public static void Mix_PauseMusic()

| Improve this Doc View Source

#### Mix_PlayChannel(Int32, IntPtr, Int32)

##### Declaration

    public static int Mix_PlayChannel(int channel, IntPtr chunk, int loops)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.IntPtr | chunk |
System.Int32 | loops |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_PlayChannelTimed(Int32, IntPtr, Int32, Int32)

##### Declaration

    public static int Mix_PlayChannelTimed(int channel, IntPtr chunk, int loops, int ticks)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.IntPtr | chunk |
System.Int32 | loops |
System.Int32 | ticks |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_Playing(Int32)

##### Declaration

    public static int Mix_Playing(int channel)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_PlayingMusic()

##### Declaration

    public static int Mix_PlayingMusic()

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_PlayMusic(IntPtr, Int32)

##### Declaration

    public static int Mix_PlayMusic(IntPtr music, int loops)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IntPtr | music |
System.Int32 | loops |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_QuerySpec(out Int32, out UInt16, out Int32)

##### Declaration

    public static int Mix_QuerySpec(out int frequency, out ushort format, out int channels)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | frequency |
System.UInt16 | format |
System.Int32 | channels |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_QuickLoad_RAW(Byte[], UInt32)

##### Declaration

    public static IntPtr Mix_QuickLoad_RAW(byte[] mem, uint len)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Byte[] | mem |
System.UInt32 | len |

##### Returns

Type | Description
--- | ---
System.IntPtr |

#### Mix_QuickLoad_WAV(Byte[])

##### Declaration

    public static IntPtr Mix_QuickLoad_WAV(byte[] mem)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Byte[] | mem |

##### Returns

Type | Description
--- | ---
System.IntPtr |

#### Mix_Quit()

##### Declaration

    public static void Mix_Quit()

#### Mix_RegisterEffect(Int32, SDL_mixer.Mix_EffectFunc_t, SDL_mixer.Mix_EffectDone_t, IntPtr)

##### Declaration

    public static int Mix_RegisterEffect(int chan, SDL_mixer.Mix_EffectFunc_t f, SDL_mixer.Mix_EffectDone_t d, IntPtr arg)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | chan |
SDL_mixer.Mix_EffectFunc_t | f |
SDL_mixer.Mix_EffectDone_t | d |
System.IntPtr | arg |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_ReserveChannels(Int32)

##### Declaration

    public static int Mix_ReserveChannels(int num)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | num |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_Resume(Int32)

##### Declaration

    public static void Mix_Resume(int channel)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |

#### Mix_ResumeMusic()

##### Declaration

    public static void Mix_ResumeMusic()

#### Mix_RewindMusic()

##### Declaration

    public static void Mix_RewindMusic()

#### Mix_SetDistance(Int32, Byte)

##### Declaration

    public static int Mix_SetDistance(int channel, byte distance)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.Byte | distance |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### Mix_SetMusicCMD(String)

##### Declaration

    public static int Mix_SetMusicCMD(string command)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | command |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_SetMusicPosition(Double)

##### Declaration

    public static int Mix_SetMusicPosition(double position)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Double | position |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_SetPanning(Int32, Byte, Byte)

##### Declaration

    public static int Mix_SetPanning(int channel, byte left, byte right)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.Byte | left |
System.Byte | right |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_SetPosition(Int32, Int16, Byte)

##### Declaration

    public static int Mix_SetPosition(int channel, short angle, byte distance)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.Int16 | angle |
System.Byte | distance |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_SetPostMix(SDL_mixer.MixFuncDelegate, IntPtr)

##### Declaration

    public static void Mix_SetPostMix(SDL_mixer.MixFuncDelegate mix_func, IntPtr arg)

##### Parameters

Type | Name | Description
--- | --- | ---
SDL_mixer.MixFuncDelegate | mix_func |
System.IntPtr | arg |

#### Mix_SetReverseStereo(Int32, Int32)

##### Declaration

    public static int Mix_SetReverseStereo(int channel, int flip)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.Int32 | flip |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### Mix_SetSoundFonts(String)

##### Declaration

    public static int Mix_SetSoundFonts(string paths)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | paths |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_SetSynchroValue(Int32)

##### Declaration

    public static int Mix_SetSynchroValue(int value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | value |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_UnregisterAllEffects(Int32)

##### Declaration

    public static int Mix_UnregisterAllEffects(int channel)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_UnregisterEffect(Int32, SDL_mixer.Mix_EffectFunc_t)

##### Declaration

    public static int Mix_UnregisterEffect(int channel, SDL_mixer.Mix_EffectFunc_t f)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
SDL_mixer.Mix_EffectFunc_t | f |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_Volume(Int32, Int32)

##### Declaration

    public static int Mix_Volume(int channel, int volume)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | channel |
System.Int32 | volume |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_VolumeChunk(IntPtr, Int32)

##### Declaration

    public static int Mix_VolumeChunk(IntPtr chunk, int volume)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IntPtr | chunk |
System.Int32 | volume |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Mix_VolumeMusic(Int32)

##### Declaration

    public static int Mix_VolumeMusic(int volume)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | volume |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### SDL_MIXER_VERSION(out SDL.SDL_version)

##### Declaration

    public static void SDL_MIXER_VERSION(out SDL.SDL_version X)

##### Parameters

Type | Name | Description
--- | --- | ---
SDL.SDL_version | X |