dynamic_mod.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 12 Feb 2012 17:58:22 -0500
branchSDL-1.2
changeset 584 ea53a85853dd
parent 518 8bc9b5fd2aae
child 587 56cad6484b04
child 865 3ffb22a2755b
permissions -rw-r--r--
Fixed 1418 - crash on double free if loading WAV file failed
     1 /*
     2   SDL_mixer:  An audio mixer library based on the SDL library
     3   Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
     4 
     5   This software is provided 'as-is', without any express or implied
     6   warranty.  In no event will the authors be held liable for any damages
     7   arising from the use of this software.
     8 
     9   Permission is granted to anyone to use this software for any purpose,
    10   including commercial applications, and to alter it and redistribute it
    11   freely, subject to the following restrictions:
    12 
    13   1. The origin of this software must not be misrepresented; you must not
    14      claim that you wrote the original software. If you use this software
    15      in a product, an acknowledgment in the product documentation would be
    16      appreciated but is not required.
    17   2. Altered source versions must be plainly marked as such, and must not be
    18      misrepresented as being the original software.
    19   3. This notice may not be removed or altered from any source distribution.
    20 */
    21 
    22 #ifdef MOD_MUSIC
    23 
    24 #include "mikmod.h"
    25 
    26 typedef struct {
    27 	int loaded;
    28 	void *handle;
    29 
    30 	void (*MikMod_Exit)(void);
    31 	CHAR* (*MikMod_InfoDriver)(void);
    32 	CHAR* (*MikMod_InfoLoader)(void);
    33 	BOOL (*MikMod_Init)(CHAR*);
    34 	void (*MikMod_RegisterAllLoaders)(void);
    35 	void (*MikMod_RegisterDriver)(struct MDRIVER*);
    36 	int* MikMod_errno;
    37 	char* (*MikMod_strerror)(int);
    38 	BOOL (*Player_Active)(void);
    39 	void (*Player_Free)(MODULE*);
    40 	MODULE* (*Player_LoadGeneric)(MREADER*,int,BOOL);
    41 	void (*Player_SetPosition)(UWORD);
    42 	void (*Player_SetVolume)(SWORD);
    43 	void (*Player_Start)(MODULE*);
    44 	void (*Player_Stop)(void);
    45 	ULONG (*VC_WriteBytes)(SBYTE*,ULONG);
    46 	struct MDRIVER* drv_nos;
    47 	UWORD* md_device;
    48 	UWORD* md_mixfreq;
    49 	UWORD* md_mode;
    50 	UBYTE* md_musicvolume;
    51 	UBYTE* md_pansep;
    52 	UBYTE* md_reverb;
    53 	UBYTE* md_sndfxvolume;
    54 	UBYTE* md_volume;
    55 } mikmod_loader;
    56 
    57 extern mikmod_loader mikmod;
    58 
    59 #endif /* MOD_MUSIC */
    60 
    61 extern int Mix_InitMOD();
    62 extern void Mix_QuitMOD();