dynamic_ogg.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 OGG_MUSIC
  19. #if defined(OGG_HEADER)
  20. #include OGG_HEADER
  21. #elif defined(OGG_USE_TREMOR)
  22. #include <tremor/ivorbisfile.h>
  23. #else
  24. #include <vorbis/vorbisfile.h>
  25. #endif
  26. typedef struct {
  27. int loaded;
  28. void *handle;
  29. int (*ov_clear)(OggVorbis_File *vf);
  30. vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
  31. int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, const char *initial, long ibytes, ov_callbacks callbacks);
  32. ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i);
  33. #ifdef OGG_USE_TREMOR
  34. long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int *bitstream);
  35. #else
  36. long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
  37. #endif
  38. #ifdef OGG_USE_TREMOR
  39. int (*ov_time_seek)(OggVorbis_File *vf,ogg_int64_t pos);
  40. #else
  41. int (*ov_time_seek)(OggVorbis_File *vf,double pos);
  42. #endif
  43. } vorbis_loader;
  44. extern vorbis_loader vorbis;
  45. #endif /* OGG_MUSIC */
  46. extern int Mix_InitOgg();
  47. extern void Mix_QuitOgg();