dynamic_ogg.c
changeset 629 87c536d57d92
parent 621 944412baab72
child 711 f40c5ac95b12
     1.1 --- a/dynamic_ogg.c	Sat Jun 01 23:42:48 2013 -0700
     1.2 +++ b/dynamic_ogg.c	Sun Jun 02 00:35:46 2013 -0700
     1.3 @@ -22,7 +22,7 @@
     1.4  #ifdef OGG_MUSIC
     1.5  
     1.6  #include "SDL_loadso.h"
     1.7 -
     1.8 +#include "SDL_mixer.h"
     1.9  #include "dynamic_ogg.h"
    1.10  
    1.11  vorbis_loader vorbis = {
    1.12 @@ -106,6 +106,16 @@
    1.13  int Mix_InitOgg()
    1.14  {
    1.15      if ( vorbis.loaded == 0 ) {
    1.16 +#ifdef __MACOSX__
    1.17 +        extern int ov_open_callbacks(void*, OggVorbis_File*, const char*, long, ov_callbacks) __attribute__((weak_import));
    1.18 +        if ( ov_open_callbacks == NULL )
    1.19 +        {
    1.20 +            /* Missing weakly linked framework */
    1.21 +            Mix_SetError("Missing Vorbis.framework");
    1.22 +            return -1;
    1.23 +        }
    1.24 +#endif // __MACOSX__
    1.25 +
    1.26          vorbis.ov_clear = ov_clear;
    1.27          vorbis.ov_info = ov_info;
    1.28          vorbis.ov_open_callbacks = ov_open_callbacks;