dynamic_modplug.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. SDL_mixer: An audio mixer library based on the SDL library
  3. Copyright (C) 1997-2013 Sam Lantinga <[email protected]>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. #ifdef MODPLUG_MUSIC
  19. #ifdef MODPLUG_HEADER
  20. #include MODPLUG_HEADER
  21. #else
  22. #include <libmodplug/modplug.h>
  23. #endif
  24. typedef struct {
  25. int loaded;
  26. void *handle;
  27. ModPlugFile* (*ModPlug_Load)(const void* data, int size);
  28. void (*ModPlug_Unload)(ModPlugFile* file);
  29. int (*ModPlug_Read)(ModPlugFile* file, void* buffer, int size);
  30. void (*ModPlug_Seek)(ModPlugFile* file, int millisecond);
  31. void (*ModPlug_GetSettings)(ModPlug_Settings* settings);
  32. void (*ModPlug_SetSettings)(const ModPlug_Settings* settings);
  33. void (*ModPlug_SetMasterVolume)(ModPlugFile* file,unsigned int cvol) ;
  34. } modplug_loader;
  35. extern modplug_loader modplug;
  36. #endif /* MODPLUG_MUSIC */
  37. extern int Mix_InitModPlug();
  38. extern void Mix_QuitModPlug();