' This is file SDL2_mixer.bi.
'
' FreeBasic-Header file for libSDL2_mixer (version 2.0.0),
' translated with help of h_2_bi.bas
'
' Licence:
' (C) 2013 Thomas{dOt]Freiherr{ aT }gmx[ DoT }net
'
' This library binding is free software; you can redistribute it
' and/or modify it under the terms of the GNU Lesser General Public
' License as published by the Free Software Foundation; either
' version 2 of the License, or (at your option) ANY later version.
'
' This library binding is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
' Lesser General Public License for more details, refer to:
' http://www.gnu.org/licenses/lgpl.html
'
' Original licence text
'/*
  'SDL_mixer:  An audio mixer library based on the SDL library
  'Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>

  'This software is provided 'as-is', without any express or implied
  'warranty.  In no event will the authors be held liable for any damages
  'arising from the use of this software.

  'Permission is granted to anyone to use this software for any purpose,
  'including commercial applications, and to alter it and redistribute it
  'freely, subject to the following restrictions:

  '1. The origin of this software must not be misrepresented; you must not
     'claim that you wrote the original software. If you use this software
     'in a product, an acknowledgment in the product documentation would be
     'appreciated but is not required.
  '2. Altered source versions must be plainly marked as such, and must not be
     'misrepresented as being the original software.
  '3. This notice may not be removed or altered from any source distribution.
'*/

#IFDEF __FB_WIN32__
#PRAGMA push(msbitfields)
#ENDIF

#INCLUDE ONCE "SDL2/SDL2.bi"
#INCLIB "SDL2_mixer" ' place the name of your lib into quotes

EXTERN "C" ' (h_2_bi -P_oCD option)

#IFNDEF _SDL_MIXER_H
#DEFINE _SDL_MIXER_H

#DEFINE SDL_MIXER_MAJOR_VERSION 2
#DEFINE SDL_MIXER_MINOR_VERSION 0
#DEFINE SDL_MIXER_PATCHLEVEL 0

#DEFINE SDL_MIXER_VERSION(X) _
    (X)->major = SDL_MIXER_MAJOR_VERSION : _
    (X)->minor = SDL_MIXER_MINOR_VERSION : _
    (X)->patch = SDL_MIXER_PATCHLEVEL

#DEFINE MIX_MAJOR_VERSION SDL_MIXER_MAJOR_VERSION
#DEFINE MIX_MINOR_VERSION SDL_MIXER_MINOR_VERSION
#DEFINE MIX_PATCHLEVEL SDL_MIXER_PATCHLEVEL
#DEFINE MIX_VERSION(X) SDL_MIXER_VERSION(X)

DECLARE FUNCTION Mix_Linked_Version() AS CONST SDL_version PTR

ENUM MIX_InitFlags
	MIX_INIT_FLAC = &h00000001
	MIX_INIT_MOD = &h00000002
	MIX_INIT_MODPLUG = &h00000004
	MIX_INIT_MP3 = &h00000008
	MIX_INIT_OGG = &h00000010
	MIX_INIT_FLUIDSYNTH = &h00000020
END ENUM

DECLARE FUNCTION Mix_Init(BYVAL AS INTEGER) AS INTEGER
DECLARE SUB Mix_Quit()

#IFNDEF MIX_CHANNELS
#DEFINE MIX_CHANNELS 8
#ENDIF ' MIX_CHANNELS

#DEFINE MIX_DEFAULT_FREQUENCY 22050

#IF SDL_BYTEORDER = SDL_LIL_ENDIAN
#DEFINE MIX_DEFAULT_FORMAT AUDIO_S16LSB
#ELSE ' SDL_BYTEORDER =...
#DEFINE MIX_DEFAULT_FORMAT AUDIO_S16MSB
#ENDIF ' SDL_BYTEORDER =...

#DEFINE MIX_DEFAULT_CHANNELS 2
#DEFINE MIX_MAX_VOLUME 128

TYPE Mix_Chunk
	AS INTEGER allocated
	AS Uint8 PTR abuf
	AS Uint32 alen
	AS Uint8 volume
END TYPE

ENUM Mix_Fading
	MIX_NO_FADING
	MIX_FADING_OUT
	MIX_FADING_IN
END ENUM

ENUM Mix_MusicType
	MUS_NONE
	MUS_CMD
	MUS_WAV
	MUS_MOD
	MUS_MID
	MUS_OGG
	MUS_MP3
	MUS_MP3_MAD
	MUS_FLAC
	MUS_MODPLUG
END ENUM

TYPE Mix_Music AS _Mix_Music

DECLARE FUNCTION Mix_OpenAudio(BYVAL AS INTEGER, BYVAL AS Uint16, BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_AllocateChannels(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_QuerySpec(BYVAL AS INTEGER PTR, BYVAL AS Uint16 PTR, BYVAL AS INTEGER PTR) AS INTEGER
DECLARE FUNCTION Mix_LoadWAV_RW(BYVAL AS SDL_RWops PTR, BYVAL AS INTEGER) AS Mix_Chunk PTR

#DEFINE Mix_LoadWAV(file) Mix_LoadWAV_RW(SDL_RWFromFile(file, @!"rb"), 1)

DECLARE FUNCTION Mix_LoadMUS(BYVAL AS CONST ZSTRING PTR) AS Mix_Music PTR
DECLARE FUNCTION Mix_LoadMUS_RW(BYVAL AS SDL_RWops PTR, BYVAL AS INTEGER) AS Mix_Music PTR
DECLARE FUNCTION Mix_LoadMUSType_RW(BYVAL AS SDL_RWops PTR, BYVAL AS Mix_MusicType, BYVAL AS INTEGER) AS Mix_Music PTR
DECLARE FUNCTION Mix_QuickLoad_WAV(BYVAL AS Uint8 PTR) AS Mix_Chunk PTR
DECLARE FUNCTION Mix_QuickLoad_RAW(BYVAL AS Uint8 PTR, BYVAL AS Uint32) AS Mix_Chunk PTR
DECLARE SUB Mix_FreeChunk(BYVAL AS Mix_Chunk PTR)
DECLARE SUB Mix_FreeMusic(BYVAL AS Mix_Music PTR)
DECLARE FUNCTION Mix_GetNumChunkDecoders() AS INTEGER
DECLARE FUNCTION Mix_GetChunkDecoder(BYVAL AS INTEGER) AS CONST ZSTRING PTR
DECLARE FUNCTION Mix_GetNumMusicDecoders() AS INTEGER
DECLARE FUNCTION Mix_GetMusicDecoder(BYVAL AS INTEGER) AS CONST ZSTRING PTR
DECLARE FUNCTION Mix_GetMusicType(BYVAL AS CONST Mix_Music PTR) AS Mix_MusicType
DECLARE SUB Mix_SetPostMix(BYVAL AS SUB(BYVAL AS ANY PTR, BYVAL AS Uint8 PTR, BYVAL AS INTEGER), BYVAL AS ANY PTR)
DECLARE SUB Mix_HookMusic(BYVAL AS SUB(BYVAL AS ANY PTR, BYVAL AS Uint8 PTR, BYVAL AS INTEGER), BYVAL AS ANY PTR)
DECLARE SUB Mix_HookMusicFinished(BYVAL AS SUB())
DECLARE FUNCTION Mix_GetMusicHookData() AS ANY PTR
DECLARE SUB Mix_ChannelFinished(BYVAL AS SUB(BYVAL AS INTEGER))

#DEFINE MIX_CHANNEL_POST -2

TYPE Mix_EffectFunc_t AS SUB(BYVAL AS INTEGER, BYVAL AS ANY PTR, BYVAL AS INTEGER, BYVAL AS ANY PTR)
TYPE Mix_EffectDone_t AS SUB(BYVAL AS INTEGER, BYVAL AS ANY PTR)

DECLARE FUNCTION Mix_RegisterEffect(BYVAL AS INTEGER, BYVAL AS Mix_EffectFunc_t, BYVAL AS Mix_EffectDone_t, BYVAL AS ANY PTR) AS INTEGER
DECLARE FUNCTION Mix_UnregisterEffect(BYVAL AS INTEGER, BYVAL AS Mix_EffectFunc_t) AS INTEGER
DECLARE FUNCTION Mix_UnregisterAllEffects(BYVAL AS INTEGER) AS INTEGER

#DEFINE MIX_EFFECTSMAXSPEED @!"MIX_EFFECTSMAXSPEED"

DECLARE FUNCTION Mix_SetPanning(BYVAL AS INTEGER, BYVAL AS Uint8, BYVAL AS Uint8) AS INTEGER
DECLARE FUNCTION Mix_SetPosition(BYVAL AS INTEGER, BYVAL AS Sint16, BYVAL AS Uint8) AS INTEGER
DECLARE FUNCTION Mix_SetDistance(BYVAL AS INTEGER, BYVAL AS Uint8) AS INTEGER

#IF 0

DECLARE FUNCTION Mix_SetReverb(BYVAL AS INTEGER, BYVAL AS Uint8) AS no_parse_DECLSPEC INTEGER

#ENDIF ' 0

DECLARE FUNCTION Mix_SetReverseStereo(BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_ReserveChannels(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_GroupChannel(BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_GroupChannels(BYVAL AS INTEGER, BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_GroupAvailable(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_GroupCount(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_GroupOldest(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_GroupNewer(BYVAL AS INTEGER) AS INTEGER

#DEFINE Mix_PlayChannel(channel,chunk,loops) Mix_PlayChannelTimed(channel,chunk,loops,-1)

DECLARE FUNCTION Mix_PlayChannelTimed(BYVAL AS INTEGER, BYVAL AS Mix_Chunk PTR, BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_PlayMusic(BYVAL AS Mix_Music PTR, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_FadeInMusic(BYVAL AS Mix_Music PTR, BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_FadeInMusicPos(BYVAL AS Mix_Music PTR, BYVAL AS INTEGER, BYVAL AS INTEGER, BYVAL AS DOUBLE) AS INTEGER

#DEFINE Mix_FadeInChannel(channel,chunk,loops,ms) Mix_FadeInChannelTimed(channel,chunk,loops,ms,-1)

DECLARE FUNCTION Mix_FadeInChannelTimed(BYVAL AS INTEGER, BYVAL AS Mix_Chunk PTR, BYVAL AS INTEGER, BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_Volume(BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_VolumeChunk(BYVAL AS Mix_Chunk PTR, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_VolumeMusic(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_HaltChannel(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_HaltGroup(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_HaltMusic() AS INTEGER
DECLARE FUNCTION Mix_ExpireChannel(BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_FadeOutChannel(BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_FadeOutGroup(BYVAL AS INTEGER, BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_FadeOutMusic(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_FadingMusic() AS Mix_Fading
DECLARE FUNCTION Mix_FadingChannel(BYVAL AS INTEGER) AS Mix_Fading
DECLARE SUB Mix_Pause(BYVAL AS INTEGER)
DECLARE SUB Mix_Resume(BYVAL AS INTEGER)
DECLARE FUNCTION Mix_Paused(BYVAL AS INTEGER) AS INTEGER
DECLARE SUB Mix_PauseMusic()
DECLARE SUB Mix_ResumeMusic()
DECLARE SUB Mix_RewindMusic()
DECLARE FUNCTION Mix_PausedMusic() AS INTEGER
DECLARE FUNCTION Mix_SetMusicPosition(BYVAL AS DOUBLE) AS INTEGER
DECLARE FUNCTION Mix_Playing(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_PlayingMusic() AS INTEGER
DECLARE FUNCTION Mix_SetMusicCMD(BYVAL AS CONST ZSTRING PTR) AS INTEGER
DECLARE FUNCTION Mix_SetSynchroValue(BYVAL AS INTEGER) AS INTEGER
DECLARE FUNCTION Mix_GetSynchroValue() AS INTEGER
DECLARE FUNCTION Mix_SetSoundFonts(BYVAL AS CONST ZSTRING PTR) AS INTEGER
DECLARE FUNCTION Mix_GetSoundFonts() AS CONST ZSTRING PTR
DECLARE FUNCTION Mix_EachSoundFont(BYVAL AS FUNCTION(BYVAL AS CONST ZSTRING PTR, BYVAL AS ANY PTR) AS INTEGER, BYVAL AS ANY PTR) AS INTEGER
DECLARE FUNCTION Mix_GetChunk(BYVAL AS INTEGER) AS Mix_Chunk PTR
DECLARE SUB Mix_CloseAudio()

#DEFINE Mix_SetError SDL_SetError
#DEFINE Mix_GetError SDL_GetError

#ENDIF ' _SDL_MIXER_H

END EXTERN ' (h_2_bi -P_oCD option)

#IFDEF __FB_WIN32__
#PRAGMA pop(msbitfields)
#ENDIF

' Translated at 13-11-08 07:59:06, by h_2_bi (version 0.2.4,
' released under GPLv3 by Thomas[ dot ]Freiherr{ at }gmx[ dot ]net)

'   Protocol: SDL2_mixer-2.0.0.bi
' Parameters:
'                                  Process time [s]: 0.03133708913810551
'                                  Bytes translated: 8327
'                                      Maximum deep: 1
'                                SUB/FUNCTION names: 76
'                                mangled TYPE names: 0
'                                        files done: 1
' SDL2_mixer-2.0.0/SDL_mixer.h
'                                      files missed: 7
' SDL_stdinc.h
' SDL_rwops.h
' SDL_audio.h
' SDL_endian.h
' SDL_version.h
' begin_code.h
' close_code.h
'                                       __FOLDERS__: 1
' SDL2_mixer-2.0.0/
'                                        __MACROS__: 3
' 75: #define extern
' 74: #define SDLCALL
' 73: #define DECLSPEC
'                                       __HEADERS__: 0
'                                         __TYPES__: 0
'                                     __POST_REPS__: 0
