dynamic_mod.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 03 Oct 2009 20:43:33 +0000
changeset 419 e27fe0bfe470
child 470 5cebd6c5be2d
permissions -rw-r--r--
Sam Lantinga - Sat Oct 3 13:33:36 PDT 2009
* MOD support uses libmikmod and is dynamically loaded by default
slouken@419
     1
/*
slouken@419
     2
    SDL_mixer:  An audio mixer library based on the SDL library
slouken@419
     3
    Copyright (C) 1997-2009 Sam Lantinga
slouken@419
     4
slouken@419
     5
    This library is free software; you can redistribute it and/or
slouken@419
     6
    modify it under the terms of the GNU Library General Public
slouken@419
     7
    License as published by the Free Software Foundation; either
slouken@419
     8
    version 2 of the License, or (at your option) any later version.
slouken@419
     9
slouken@419
    10
    This library is distributed in the hope that it will be useful,
slouken@419
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@419
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@419
    13
    Library General Public License for more details.
slouken@419
    14
slouken@419
    15
    You should have received a copy of the GNU Library General Public
slouken@419
    16
    License along with this library; if not, write to the Free
slouken@419
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@419
    18
slouken@419
    19
    Sam Lantinga
slouken@419
    20
    slouken@libsdl.org
slouken@419
    21
*/
slouken@419
    22
slouken@419
    23
#ifdef MOD_MUSIC
slouken@419
    24
slouken@419
    25
#include "mikmod.h"
slouken@419
    26
slouken@419
    27
typedef struct {
slouken@419
    28
	int loaded;
slouken@419
    29
	void *handle;
slouken@419
    30
slouken@419
    31
	void (*MikMod_Exit)(void);
slouken@419
    32
	CHAR* (*MikMod_InfoDriver)(void);
slouken@419
    33
	CHAR* (*MikMod_InfoLoader)(void);
slouken@419
    34
	BOOL (*MikMod_Init)(CHAR*);
slouken@419
    35
	void (*MikMod_RegisterAllLoaders)(void);
slouken@419
    36
	void (*MikMod_RegisterDriver)(struct MDRIVER*);
slouken@419
    37
	int* MikMod_errno;
slouken@419
    38
	char* (*MikMod_strerror)(int);
slouken@419
    39
	BOOL (*Player_Active)(void);
slouken@419
    40
	void (*Player_Free)(MODULE*);
slouken@419
    41
	MODULE* (*Player_LoadGeneric)(MREADER*,int,BOOL);
slouken@419
    42
	void (*Player_SetPosition)(UWORD);
slouken@419
    43
	void (*Player_SetVolume)(SWORD);
slouken@419
    44
	void (*Player_Start)(MODULE*);
slouken@419
    45
	void (*Player_Stop)(void);
slouken@419
    46
	ULONG (*VC_WriteBytes)(SBYTE*,ULONG);
slouken@419
    47
	struct MDRIVER* drv_nos;
slouken@419
    48
	UWORD* md_device;
slouken@419
    49
	UWORD* md_mixfreq;
slouken@419
    50
	UWORD* md_mode;
slouken@419
    51
	UBYTE* md_musicvolume;
slouken@419
    52
	UBYTE* md_pansep;
slouken@419
    53
	UBYTE* md_reverb;
slouken@419
    54
	UBYTE* md_sndfxvolume;
slouken@419
    55
	UBYTE* md_volume;
slouken@419
    56
} mikmod_loader;
slouken@419
    57
slouken@419
    58
extern mikmod_loader mikmod;
slouken@419
    59
slouken@419
    60
extern int Mix_InitMOD();
slouken@419
    61
extern void Mix_QuitMOD();
slouken@419
    62
slouken@419
    63
#endif