dynamic_mod.h
author Ozkan Sezer <sezeroz@gmail.com>
Sun, 07 Oct 2018 03:07:33 +0300
branchSDL-1.2
changeset 885 dd251a0ec666
parent 865 3ffb22a2755b
permissions -rw-r--r--
backport fix for bug #2795. (from 2.0 branch commit b28b41b93ba7).
     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 /* libmikmod >= 3.3.2 constified several funcs */
    27 #if (LIBMIKMOD_VERSION < 0x030302)
    28 #define MIKMOD3_CONST
    29 #else
    30 #define MIKMOD3_CONST const
    31 #endif
    32 
    33 typedef struct {
    34 	int loaded;
    35 	void *handle;
    36 
    37 	void (*MikMod_Exit)(void);
    38 	CHAR* (*MikMod_InfoDriver)(void);
    39 	CHAR* (*MikMod_InfoLoader)(void);
    40 	int (*MikMod_Init)(MIKMOD3_CONST CHAR*);
    41 	void (*MikMod_RegisterAllLoaders)(void);
    42 	void (*MikMod_RegisterDriver)(struct MDRIVER*);
    43 	int* MikMod_errno;
    44 	MIKMOD3_CONST char* (*MikMod_strerror)(int);
    45 	void (*MikMod_free)(void*);
    46 	BOOL (*Player_Active)(void);
    47 	void (*Player_Free)(MODULE*);
    48 	MODULE* (*Player_LoadGeneric)(MREADER*,int,BOOL);
    49 	void (*Player_SetPosition)(UWORD);
    50 	void (*Player_SetVolume)(SWORD);
    51 	void (*Player_Start)(MODULE*);
    52 	void (*Player_Stop)(void);
    53 	ULONG (*VC_WriteBytes)(SBYTE*,ULONG);
    54 	struct MDRIVER* drv_nos;
    55 	UWORD* md_device;
    56 	UWORD* md_mixfreq;
    57 	UWORD* md_mode;
    58 	UBYTE* md_musicvolume;
    59 	UBYTE* md_pansep;
    60 	UBYTE* md_reverb;
    61 	UBYTE* md_sndfxvolume;
    62 	UBYTE* md_volume;
    63 } mikmod_loader;
    64 
    65 extern mikmod_loader mikmod;
    66 
    67 #endif /* MOD_MUSIC */
    68 
    69 extern int Mix_InitMOD();
    70 extern void Mix_QuitMOD();