/* Ofront+ 1.0 -sC -48 */
#include "SYSTEM.oh"
#include "SDL2.oh"

typedef
  struct SDL2mixer_Mix_Chunk {
    INTEGER allocated, abuf, alen;
    BYTE volume;
  } SDL2mixer_Mix_Chunk;

typedef
  struct SDL2mixer_MusicUnion {
    BYTE x;
  } SDL2mixer_MusicUnion;

typedef
  struct SDL2mixer_Mix_Music {
    BYTE type;
    SDL2mixer_MusicUnion data;
    BYTE fading;
    INTEGER fade_volume, fade_step, fade_steps, error;
  } SDL2mixer_Mix_Music;

typedef
  SDL2mixer_Mix_Chunk *SDL2mixer_PMix_Chunk;

typedef
  SDL2mixer_Mix_Music *SDL2mixer_PMix_Music;





#include "SDL2.h0"
import INTEGER SDL2mixer_Mix_AllocateChannels (INTEGER numchannels);
import void SDL2mixer_Mix_CloseAudio (void);
import INTEGER SDL2mixer_Mix_ExpireChannel (INTEGER channel, INTEGER ticks);
#define SDL2mixer_Mix_FadeInChannel(channel, chunk, loops, ms)  Mix_FadeInChannelTimed(channel, chunk, loops, ms, -1)
import INTEGER SDL2mixer_Mix_FadeInChannelTimed (INTEGER channel, SDL2mixer_PMix_Chunk chunk, INTEGER loops, INTEGER ms, INTEGER ticks);
import INTEGER SDL2mixer_Mix_FadeInMusic (SDL2mixer_PMix_Music music, INTEGER loops, INTEGER ms);
import INTEGER SDL2mixer_Mix_FadeOutChannel (INTEGER which, INTEGER ms);
import INTEGER SDL2mixer_Mix_FadeOutGroup (INTEGER tag, INTEGER ms);
import INTEGER SDL2mixer_Mix_FadeOutMusic (INTEGER ms);
import BYTE SDL2mixer_Mix_FadingChannel (INTEGER which);
import BYTE SDL2mixer_Mix_FadingMusic (void);
import void SDL2mixer_Mix_FreeChunk (SDL2mixer_PMix_Chunk chunk);
import void SDL2mixer_Mix_FreeMusic (SDL2mixer_PMix_Music music);
#define SDL2mixer_Mix_GetError()  SDL_GetError()
import BYTE SDL2mixer_Mix_GetMusicType (SDL2mixer_PMix_Music music);
import INTEGER SDL2mixer_Mix_GroupAvailable (INTEGER tag);
import INTEGER SDL2mixer_Mix_GroupChannel (INTEGER which, INTEGER tag);
import INTEGER SDL2mixer_Mix_GroupChannels (INTEGER from, INTEGER to, INTEGER tag);
import INTEGER SDL2mixer_Mix_GroupCount (INTEGER tag);
import INTEGER SDL2mixer_Mix_GroupNewer (INTEGER tag);
import INTEGER SDL2mixer_Mix_GroupOldest (INTEGER tag);
import INTEGER SDL2mixer_Mix_HaltChannel (INTEGER channel);
import INTEGER SDL2mixer_Mix_HaltGroup (INTEGER tag);
import INTEGER SDL2mixer_Mix_HaltMusic (void);
import SDL2mixer_PMix_Music SDL2mixer_Mix_LoadMUS (INTEGER file);
import SDL2mixer_PMix_Music SDL2mixer_Mix_LoadMUS_RW (INTEGER rw);
#define SDL2mixer_Mix_LoadWAV(file)  Mix_LoadWAV_RW((SYSTEM_ADRINT)SDL_RWFromFile((SYSTEM_PTR)file, (SYSTEM_PTR)"rb"), 1)
import SDL2mixer_PMix_Chunk SDL2mixer_Mix_LoadWAV_RW (INTEGER src, INTEGER freesrc);
import INTEGER SDL2mixer_Mix_OpenAudio (INTEGER frequency, SHORTINT format, INTEGER channels, INTEGER chunksize);
import void SDL2mixer_Mix_Pause (INTEGER channel);
import void SDL2mixer_Mix_PauseMusic (void);
import INTEGER SDL2mixer_Mix_Paused (INTEGER channel);
import INTEGER SDL2mixer_Mix_PausedMusic (void);
#define SDL2mixer_Mix_PlayChannel(channel, chunk, loops)  Mix_PlayChannelTimed(channel, chunk, loops, -1)
import INTEGER SDL2mixer_Mix_PlayChannelTimed (INTEGER channel, SDL2mixer_PMix_Chunk chunk, INTEGER loops, INTEGER ticks);
import INTEGER SDL2mixer_Mix_PlayMusic (SDL2mixer_PMix_Music music, INTEGER loops);
import INTEGER SDL2mixer_Mix_Playing (INTEGER channel);
import INTEGER SDL2mixer_Mix_PlayingMusic (void);
import INTEGER SDL2mixer_Mix_QuerySpec (INTEGER *frequency, SHORTINT *format, INTEGER *channels);
import SDL2mixer_PMix_Chunk SDL2mixer_Mix_QuickLoad_WAV (INTEGER mem);
import INTEGER SDL2mixer_Mix_ReserveChannels (INTEGER num);
import void SDL2mixer_Mix_Resume (INTEGER channel);
import void SDL2mixer_Mix_ResumeMusic (void);
import void SDL2mixer_Mix_RewindMusic (void);
import INTEGER SDL2mixer_Mix_SetDistance (INTEGER channel, BYTE distance);
#define SDL2mixer_Mix_SetError(fmt)  SDL_SetError(fmt)
import INTEGER SDL2mixer_Mix_SetMusicCMD (INTEGER command);
import INTEGER SDL2mixer_Mix_SetMusicPosition (REAL position);
import INTEGER SDL2mixer_Mix_SetPanning (INTEGER channel, BYTE left, BYTE right);
import INTEGER SDL2mixer_Mix_SetPosition (INTEGER channel, SHORTINT angle, BYTE distance);
import INTEGER SDL2mixer_Mix_SetReverseStereo (INTEGER channel, INTEGER flip);
import INTEGER SDL2mixer_Mix_Volume (INTEGER channel, INTEGER volume);
import INTEGER SDL2mixer_Mix_VolumeChunk (SDL2mixer_PMix_Chunk chunk, INTEGER volume);
import INTEGER SDL2mixer_Mix_VolumeMusic (INTEGER volume);

/*============================================================================*/


export void *SDL2mixer__init (void)
{
  __DEFMOD;
  __IMPORT(SDL2__init);
  __REGMOD("SDL2mixer", 0);
/* BEGIN */
  __ENDMOD;
}
