dynamic_modplug.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 09 Jun 2013 16:22:42 -0700
changeset 639 f8901a7ff3f1
child 695 6a5e6d8d6a35
permissions -rw-r--r--
Switched from mikmod to libmodplug, which is now in the public domain.
This allows us to add MOD support for iOS and Android, yay!
     1 /*
     2   SDL_mixer:  An audio mixer library based on the SDL library
     3   Copyright (C) 1997-2013 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 MODPLUG_MUSIC
    23 
    24 #include "modplug.h"
    25 
    26 typedef struct {
    27     int loaded;
    28     void *handle;
    29 
    30     ModPlugFile* (*ModPlug_Load)(const void* data, int size);
    31     void (*ModPlug_Unload)(ModPlugFile* file);
    32     int  (*ModPlug_Read)(ModPlugFile* file, void* buffer, int size);
    33     void (*ModPlug_Seek)(ModPlugFile* file, int millisecond);
    34     void (*ModPlug_GetSettings)(ModPlug_Settings* settings);
    35     void (*ModPlug_SetSettings)(const ModPlug_Settings* settings);
    36     void (*ModPlug_SetMasterVolume)(ModPlugFile* file,unsigned int cvol) ;
    37 } modplug_loader;
    38 
    39 extern modplug_loader modplug;
    40 
    41 #endif /* MODPLUG_MUSIC */
    42 
    43 extern int Mix_InitModPlug();
    44 extern void Mix_QuitModPlug();