Skip to content
Browse files

[osx/ios] changed libwavpack from static link to xbmc binary to dyloa…

…ded/unloaded on demand.
  • Loading branch information...
1 parent 8cc8176 commit 53a87a84e53aa27188f064b800fcb69a9bba3e69 @davilla davilla committed
View
4 XBMC-ATV2.xcodeproj/project.pbxproj
@@ -900,7 +900,6 @@
F589AE1B1288DE0800D8079E /* libsamplerate.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F589AE1A1288DE0800D8079E /* libsamplerate.dylib */; settings = {ATTRIBUTES = (Required, ); }; };
F589AE1D1288DE1B00D8079E /* libcdio.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F589AE1C1288DE1B00D8079E /* libcdio.dylib */; settings = {ATTRIBUTES = (Required, ); }; };
F589AE211288DE6400D8079E /* libfribidi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F589AE201288DE6400D8079E /* libfribidi.dylib */; settings = {ATTRIBUTES = (Required, ); }; };
- F589AE271288DE8A00D8079E /* libwavpack.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F589AE261288DE8A00D8079E /* libwavpack.dylib */; settings = {ATTRIBUTES = (Required, ); }; };
F589AE291288DE9600D8079E /* libmpeg2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F589AE281288DE9600D8079E /* libmpeg2.dylib */; settings = {ATTRIBUTES = (Required, ); }; };
F589AE2F1288DEC900D8079E /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F589AE2E1288DEC900D8079E /* libcrypto.dylib */; };
F589AE311288DEE000D8079E /* libpcre.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F589AE301288DEE000D8079E /* libpcre.dylib */; };
@@ -2839,7 +2838,6 @@
F589AE1C1288DE1B00D8079E /* libcdio.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcdio.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libcdio.dylib"; sourceTree = "<absolute>"; };
F589AE1E1288DE2700D8079E /* libfreetype.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfreetype.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libfreetype.dylib"; sourceTree = "<absolute>"; };
F589AE201288DE6400D8079E /* libfribidi.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfribidi.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libfribidi.dylib"; sourceTree = "<absolute>"; };
- F589AE261288DE8A00D8079E /* libwavpack.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libwavpack.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libwavpack.dylib"; sourceTree = "<absolute>"; };
F589AE281288DE9600D8079E /* libmpeg2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmpeg2.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libmpeg2.dylib"; sourceTree = "<absolute>"; };
F589AE2E1288DEC900D8079E /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libcrypto.dylib"; sourceTree = "<absolute>"; };
F589AE301288DEE000D8079E /* libpcre.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpcre.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libpcre.dylib"; sourceTree = "<absolute>"; };
@@ -2884,7 +2882,6 @@
F589AE1B1288DE0800D8079E /* libsamplerate.dylib in Frameworks */,
F589AE1D1288DE1B00D8079E /* libcdio.dylib in Frameworks */,
F589AE211288DE6400D8079E /* libfribidi.dylib in Frameworks */,
- F589AE271288DE8A00D8079E /* libwavpack.dylib in Frameworks */,
F589AE291288DE9600D8079E /* libmpeg2.dylib in Frameworks */,
F589AE2F1288DEC900D8079E /* libcrypto.dylib in Frameworks */,
F589AE311288DEE000D8079E /* libpcre.dylib in Frameworks */,
@@ -5713,7 +5710,6 @@
F5B13B011333248E0045076D /* libass.dylib */,
F54D9DD712B56A7D006870F9 /* libfaad.dylib */,
F589AE281288DE9600D8079E /* libmpeg2.dylib */,
- F589AE261288DE8A00D8079E /* libwavpack.dylib */,
F589AE201288DE6400D8079E /* libfribidi.dylib */,
F589AE1C1288DE1B00D8079E /* libcdio.dylib */,
F589AE1A1288DE0800D8079E /* libsamplerate.dylib */,
View
4 XBMC-IOS.xcodeproj/project.pbxproj
@@ -889,7 +889,6 @@
F56C8BEC131F4796000AD0F6 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8BD3131F4795000AD0F6 /* libcrypto.dylib */; };
F56C8BEE131F4796000AD0F6 /* libfaad.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8BD5131F4796000AD0F6 /* libfaad.dylib */; };
F56C8BEF131F4796000AD0F6 /* libmpeg2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8BD6131F4796000AD0F6 /* libmpeg2.dylib */; };
- F56C8BF0131F4796000AD0F6 /* libwavpack.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8BD7131F4796000AD0F6 /* libwavpack.dylib */; };
F56C8BF5131F4796000AD0F6 /* libfribidi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8BDC131F4796000AD0F6 /* libfribidi.dylib */; };
F56C8BF6131F4796000AD0F6 /* libcdio.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8BDD131F4796000AD0F6 /* libcdio.dylib */; };
F56C8BF7131F4796000AD0F6 /* libsamplerate.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8BDE131F4796000AD0F6 /* libsamplerate.dylib */; };
@@ -2825,7 +2824,6 @@
F56C8BD3131F4795000AD0F6 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libcrypto.dylib"; sourceTree = "<absolute>"; };
F56C8BD5131F4796000AD0F6 /* libfaad.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfaad.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libfaad.dylib"; sourceTree = "<absolute>"; };
F56C8BD6131F4796000AD0F6 /* libmpeg2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmpeg2.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libmpeg2.dylib"; sourceTree = "<absolute>"; };
- F56C8BD7131F4796000AD0F6 /* libwavpack.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libwavpack.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libwavpack.dylib"; sourceTree = "<absolute>"; };
F56C8BDC131F4796000AD0F6 /* libfribidi.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfribidi.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libfribidi.dylib"; sourceTree = "<absolute>"; };
F56C8BDD131F4796000AD0F6 /* libcdio.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcdio.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libcdio.dylib"; sourceTree = "<absolute>"; };
F56C8BDE131F4796000AD0F6 /* libsamplerate.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsamplerate.dylib; path = "/Users/Shared/xbmc-depends/ios-4.2_arm7/lib/libsamplerate.dylib"; sourceTree = "<absolute>"; };
@@ -2901,7 +2899,6 @@
F56C8BEC131F4796000AD0F6 /* libcrypto.dylib in Frameworks */,
F56C8BEE131F4796000AD0F6 /* libfaad.dylib in Frameworks */,
F56C8BEF131F4796000AD0F6 /* libmpeg2.dylib in Frameworks */,
- F56C8BF0131F4796000AD0F6 /* libwavpack.dylib in Frameworks */,
F56C8BF5131F4796000AD0F6 /* libfribidi.dylib in Frameworks */,
F56C8BF6131F4796000AD0F6 /* libcdio.dylib in Frameworks */,
F56C8BF7131F4796000AD0F6 /* libsamplerate.dylib in Frameworks */,
@@ -5711,7 +5708,6 @@
F5B13AFD1333247D0045076D /* libass.dylib */,
F56C8BD5131F4796000AD0F6 /* libfaad.dylib */,
F56C8BD6131F4796000AD0F6 /* libmpeg2.dylib */,
- F56C8BD7131F4796000AD0F6 /* libwavpack.dylib */,
F56C8BDC131F4796000AD0F6 /* libfribidi.dylib */,
F56C8BDD131F4796000AD0F6 /* libcdio.dylib */,
F56C8BDE131F4796000AD0F6 /* libsamplerate.dylib */,
View
6 XBMC.xcodeproj/project.pbxproj
@@ -1156,7 +1156,6 @@
F56C8D45131F5E85000AD0F6 /* libpcrecpp.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D2C131F5E84000AD0F6 /* libpcrecpp.dylib */; };
F56C8D46131F5E85000AD0F6 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D2D131F5E84000AD0F6 /* libcrypto.dylib */; };
F56C8D49131F5E85000AD0F6 /* libmpeg2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D30131F5E84000AD0F6 /* libmpeg2.dylib */; };
- F56C8D4A131F5E85000AD0F6 /* libwavpack.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D31131F5E84000AD0F6 /* libwavpack.dylib */; };
F56C8D4F131F5E85000AD0F6 /* libfribidi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D36131F5E85000AD0F6 /* libfribidi.dylib */; };
F56C8D50131F5E85000AD0F6 /* libcdio.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D37131F5E85000AD0F6 /* libcdio.dylib */; };
F56C8D51131F5E85000AD0F6 /* libsamplerate.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D38131F5E85000AD0F6 /* libsamplerate.dylib */; };
@@ -1172,7 +1171,6 @@
F56C8D5D131F5E85000AD0F6 /* libpcrecpp.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D2C131F5E84000AD0F6 /* libpcrecpp.dylib */; };
F56C8D5E131F5E85000AD0F6 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D2D131F5E84000AD0F6 /* libcrypto.dylib */; };
F56C8D61131F5E85000AD0F6 /* libmpeg2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D30131F5E84000AD0F6 /* libmpeg2.dylib */; };
- F56C8D62131F5E85000AD0F6 /* libwavpack.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D31131F5E84000AD0F6 /* libwavpack.dylib */; };
F56C8D67131F5E85000AD0F6 /* libfribidi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D36131F5E85000AD0F6 /* libfribidi.dylib */; };
F56C8D68131F5E85000AD0F6 /* libcdio.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D37131F5E85000AD0F6 /* libcdio.dylib */; };
F56C8D69131F5E85000AD0F6 /* libsamplerate.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F56C8D38131F5E85000AD0F6 /* libsamplerate.dylib */; };
@@ -3677,7 +3675,6 @@
F56C8D2C131F5E84000AD0F6 /* libpcrecpp.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpcrecpp.dylib; path = "/Users/Shared/xbmc-depends/osx-10.4_i386/lib/libpcrecpp.dylib"; sourceTree = "<absolute>"; };
F56C8D2D131F5E84000AD0F6 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = "/Users/Shared/xbmc-depends/osx-10.4_i386/lib/libcrypto.dylib"; sourceTree = "<absolute>"; };
F56C8D30131F5E84000AD0F6 /* libmpeg2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmpeg2.dylib; path = "/Users/Shared/xbmc-depends/osx-10.4_i386/lib/libmpeg2.dylib"; sourceTree = "<absolute>"; };
- F56C8D31131F5E84000AD0F6 /* libwavpack.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libwavpack.dylib; path = "/Users/Shared/xbmc-depends/osx-10.4_i386/lib/libwavpack.dylib"; sourceTree = "<absolute>"; };
F56C8D36131F5E85000AD0F6 /* libfribidi.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfribidi.dylib; path = "/Users/Shared/xbmc-depends/osx-10.4_i386/lib/libfribidi.dylib"; sourceTree = "<absolute>"; };
F56C8D37131F5E85000AD0F6 /* libcdio.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcdio.dylib; path = "/Users/Shared/xbmc-depends/osx-10.4_i386/lib/libcdio.dylib"; sourceTree = "<absolute>"; };
F56C8D38131F5E85000AD0F6 /* libsamplerate.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsamplerate.dylib; path = "/Users/Shared/xbmc-depends/osx-10.4_i386/lib/libsamplerate.dylib"; sourceTree = "<absolute>"; };
@@ -3876,7 +3873,6 @@
F56C8D45131F5E85000AD0F6 /* libpcrecpp.dylib in Frameworks */,
F56C8D46131F5E85000AD0F6 /* libcrypto.dylib in Frameworks */,
F56C8D49131F5E85000AD0F6 /* libmpeg2.dylib in Frameworks */,
- F56C8D4A131F5E85000AD0F6 /* libwavpack.dylib in Frameworks */,
F56C8D4F131F5E85000AD0F6 /* libfribidi.dylib in Frameworks */,
F56C8D50131F5E85000AD0F6 /* libcdio.dylib in Frameworks */,
F56C8D51131F5E85000AD0F6 /* libsamplerate.dylib in Frameworks */,
@@ -3936,7 +3932,6 @@
F56C8D5D131F5E85000AD0F6 /* libpcrecpp.dylib in Frameworks */,
F56C8D5E131F5E85000AD0F6 /* libcrypto.dylib in Frameworks */,
F56C8D61131F5E85000AD0F6 /* libmpeg2.dylib in Frameworks */,
- F56C8D62131F5E85000AD0F6 /* libwavpack.dylib in Frameworks */,
F56C8D67131F5E85000AD0F6 /* libfribidi.dylib in Frameworks */,
F56C8D68131F5E85000AD0F6 /* libcdio.dylib in Frameworks */,
F56C8D69131F5E85000AD0F6 /* libsamplerate.dylib in Frameworks */,
@@ -6866,7 +6861,6 @@
F56C8D2D131F5E84000AD0F6 /* libcrypto.dylib */,
F5B13AD0133319310045076D /* libass.dylib */,
F56C8D30131F5E84000AD0F6 /* libmpeg2.dylib */,
- F56C8D31131F5E84000AD0F6 /* libwavpack.dylib */,
F56C8D36131F5E85000AD0F6 /* libfribidi.dylib */,
F56C8D37131F5E85000AD0F6 /* libcdio.dylib */,
F56C8D38131F5E85000AD0F6 /* libsamplerate.dylib */,
View
8 configure.in
@@ -550,6 +550,7 @@ AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([vorbis/vorbisenc.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([libmodplug/modplug.h],, AC_MSG_ERROR($missing_library))
+AC_CHECK_HEADER([wavpack/wavpack.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ass], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
@@ -559,7 +560,6 @@ AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
-AC_CHECK_LIB([wavpack], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([mpeg2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([mpeg2convert],[main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
@@ -635,6 +635,7 @@ else
AC_CHECK_LIB([rt], [clock_gettime],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([SDL_image], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([modplug], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([wavpack], [main],, AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([ALSA], [alsa],
[INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"],
@@ -687,6 +688,9 @@ XB_FIND_SONAME([VORBIS], [vorbis])
XB_FIND_SONAME([VORBISENC], [vorbisenc])
XB_FIND_SONAME([VORBISFILE], [vorbisfile])
XB_FIND_SONAME([MODPLUG], [modplug])
+if test "$host_vendor" = "apple"; then
+ XB_FIND_SONAME([WAVPACK], [wavpack])
+fi
# WebServer
if test "$use_webserver" = "yes"; then
@@ -1426,7 +1430,6 @@ AC_SUBST(BUILD_DVDCSS)
AC_SUBST(BUILD_GOOM)
AC_SUBST(USE_EXTERNAL_FFMPEG)
AC_SUBST(USE_EXTERNAL_LIBMPEG2)
-AC_SUBST(USE_EXTERNAL_LIBWAVPACK)
AC_SUBST(USE_EXTERNAL_PYTHON)
AC_SUBST(USE_PYTHON2_6)
AC_SUBST(USE_PYTHON2_5)
@@ -1442,6 +1445,7 @@ AC_SUBST(LIBMAD_BASENAME)
AC_SUBST(LIBOGG_BASENAME)
AC_SUBST(LIBVORBISENC_BASENAME)
AC_SUBST(LIBVORBIS_BASENAME)
+AC_SUBST(LIBWAVPACK_BASENAME)
AC_SUBST_FILE(XBMC_STANDALONE_SH_PULSE)
AC_SUBST(USE_OPENGL)
AC_SUBST(USE_OPENGLES)
View
262 lib/DllWAVPack.h
@@ -24,15 +24,146 @@
#if (defined HAVE_CONFIG_H) && (!defined WIN32)
#include "config.h"
#endif
-#if (!defined WIN32)
- #include <wavpack/wavpack.h>
-#else
+#if defined(WIN32)
#include "wavpack.h"
+#else
+ #include <wavpack/wavpack.h>
#endif
#include "DynamicDll.h"
#include "utils/log.h"
-#if (!defined WIN32)
+#if defined(WIN32) || defined(__APPLE__)
+
+// API changes from 4.2 to 4.60.1.
+#ifndef WavpackStreamReader
+typedef WavpackStreamReader stream_reader;
+#endif
+#ifndef WavpackBlockOutput
+typedef WavpackBlockOutput blockout_f;
+#endif
+
+class DllWavPackInterface
+{
+public:
+ virtual ~DllWavPackInterface() {}
+ virtual WavpackContext *WavpackOpenFileInputEx (stream_reader *reader, void *wv_id, void *wvc_id, char *error, int flags, int norm_offset)=0;
+ virtual WavpackContext *WavpackOpenFileInput (const char *infilename, char *error, int flags, int norm_offset)=0;
+ virtual int WavpackGetVersion (WavpackContext *wpc)=0;
+ virtual unsigned int WavpackUnpackSamples (WavpackContext *wpc, int *buffer, unsigned int samples)=0;
+ virtual unsigned int WavpackGetNumSamples (WavpackContext *wpc)=0;
+ virtual unsigned int WavpackGetSampleIndex (WavpackContext *wpc)=0;
+ virtual int WavpackGetNumErrors (WavpackContext *wpc)=0;
+ virtual int WavpackLossyBlocks (WavpackContext *wpc)=0;
+ virtual int WavpackSeekSample (WavpackContext *wpc, unsigned int sample)=0;
+ virtual WavpackContext *WavpackCloseFile (WavpackContext *wpc)=0;
+ virtual unsigned int WavpackGetSampleRate (WavpackContext *wpc)=0;
+ virtual int WavpackGetBitsPerSample (WavpackContext *wpc)=0;
+ virtual int WavpackGetBytesPerSample (WavpackContext *wpc)=0;
+ virtual int WavpackGetNumChannels (WavpackContext *wpc)=0;
+ virtual int WavpackGetReducedChannels (WavpackContext *wpc)=0;
+ virtual int WavpackGetMD5Sum (WavpackContext *wpc, unsigned char data[16])=0;
+ virtual unsigned int WavpackGetWrapperBytes (WavpackContext *wpc)=0;
+ virtual unsigned char *WavpackGetWrapperData (WavpackContext *wpc)=0;
+ virtual void WavpackFreeWrapper (WavpackContext *wpc)=0;
+ virtual double WavpackGetProgress (WavpackContext *wpc)=0;
+ virtual unsigned int WavpackGetFileSize (WavpackContext *wpc)=0;
+ virtual double WavpackGetRatio (WavpackContext *wpc)=0;
+ virtual double WavpackGetAverageBitrate (WavpackContext *wpc, int count_wvc)=0;
+ virtual double WavpackGetInstantBitrate (WavpackContext *wpc)=0;
+ virtual int WavpackGetTagItem (WavpackContext *wpc, const char *item, char *value, int size)=0;
+ virtual int WavpackAppendTagItem (WavpackContext *wpc, const char *item, const char *value)=0;
+ virtual int WavpackWriteTag (WavpackContext *wpc)=0;
+ virtual WavpackContext *WavpackOpenFileOutput (blockout_f blockout, void *wv_id, void *wvc_id)=0;
+ virtual int WavpackSetConfiguration (WavpackContext *wpc, WavpackConfig *config, unsigned int total_samples)=0;
+ virtual int WavpackAddWrapper (WavpackContext *wpc, void *data, unsigned int bcount)=0;
+ virtual int WavpackStoreMD5Sum (WavpackContext *wpc, unsigned char data[16])=0;
+ virtual int WavpackPackInit (WavpackContext *wpc)=0;
+ virtual int WavpackPackSamples (WavpackContext *wpc, int *sample_buffer, unsigned int sample_count)=0;
+ virtual int WavpackFlushSamples (WavpackContext *wpc)=0;
+ virtual void WavpackUpdateNumSamples (WavpackContext *wpc, void *first_block)=0;
+ virtual void *WavpackGetWrapperLocation (void *first_block)=0;
+};
+
+class DllWavPack : public DllDynamic, DllWavPackInterface
+{
+ DECLARE_DLL_WRAPPER(DllWavPack, DLL_PATH_WAVPACK_CODEC)
+ DEFINE_METHOD6(WavpackContext*, WavpackOpenFileInputEx, (stream_reader* p1, void* p2, void* p3, char* p4, int p5, int p6))
+ DEFINE_METHOD4(WavpackContext*, WavpackOpenFileInput, (const char* p1, char* p2, int p3, int p4))
+ DEFINE_METHOD1(int, WavpackGetVersion, (WavpackContext* p1))
+ DEFINE_METHOD3(unsigned int, WavpackUnpackSamples, (WavpackContext * p1, int * p2, unsigned int p3))
+ DEFINE_METHOD1(unsigned int, WavpackGetNumSamples, (WavpackContext* p1))
+ DEFINE_METHOD1(unsigned int, WavpackGetSampleIndex, (WavpackContext * p1))
+ DEFINE_METHOD1(int, WavpackGetNumErrors, (WavpackContext * p1))
+ DEFINE_METHOD1(int, WavpackLossyBlocks, (WavpackContext *p1))
+ DEFINE_METHOD2(int, WavpackSeekSample, (WavpackContext *p1, unsigned int p2))
+ DEFINE_METHOD1(WavpackContext*, WavpackCloseFile, (WavpackContext *p1))
+ DEFINE_METHOD1(unsigned int, WavpackGetSampleRate, (WavpackContext *p1))
+ DEFINE_METHOD1(int, WavpackGetBitsPerSample, (WavpackContext *p1))
+ DEFINE_METHOD1(int, WavpackGetBytesPerSample, (WavpackContext *p1))
+ DEFINE_METHOD1(int, WavpackGetNumChannels, (WavpackContext *p1))
+ DEFINE_METHOD1(int, WavpackGetReducedChannels, (WavpackContext *p1))
+ DEFINE_METHOD2(int, WavpackGetMD5Sum, (WavpackContext *p1, unsigned char p2[16]))
+ DEFINE_METHOD1(unsigned int, WavpackGetWrapperBytes, (WavpackContext *p1))
+ DEFINE_METHOD1(unsigned char*, WavpackGetWrapperData, (WavpackContext *p1))
+ DEFINE_METHOD1(void, WavpackFreeWrapper, (WavpackContext *p1))
+ DEFINE_METHOD1(double, WavpackGetProgress, (WavpackContext *p1))
+ DEFINE_METHOD1(unsigned int, WavpackGetFileSize, (WavpackContext *p1))
+ DEFINE_METHOD1(double, WavpackGetRatio, (WavpackContext *p1))
+ DEFINE_METHOD2(double, WavpackGetAverageBitrate, (WavpackContext *p1, int p2))
+ DEFINE_METHOD1(double, WavpackGetInstantBitrate, (WavpackContext *p1))
+ DEFINE_METHOD4(int, WavpackGetTagItem, (WavpackContext *p1, const char *p2, char *p3, int p4))
+ DEFINE_METHOD3(int, WavpackAppendTagItem, (WavpackContext *p1, const char *p2, const char *p3))
+ DEFINE_METHOD1(int, WavpackWriteTag, (WavpackContext *p1))
+ DEFINE_METHOD3(WavpackContext*, WavpackOpenFileOutput, (blockout_f p1, void *p2, void *p3))
+ DEFINE_METHOD3(int, WavpackSetConfiguration, (WavpackContext *p1, WavpackConfig *p2, unsigned int p3))
+ DEFINE_METHOD3(int, WavpackAddWrapper, (WavpackContext *p1, void *p2, unsigned int p3))
+ DEFINE_METHOD2(int, WavpackStoreMD5Sum, (WavpackContext *p1, unsigned char p2[16]))
+ DEFINE_METHOD1(int, WavpackPackInit, (WavpackContext *p1))
+ DEFINE_METHOD3(int, WavpackPackSamples, (WavpackContext *p1, int *p2, unsigned int p3))
+ DEFINE_METHOD1(int, WavpackFlushSamples, (WavpackContext *p1))
+ DEFINE_METHOD2(void, WavpackUpdateNumSamples, (WavpackContext *p1, void *p2))
+ DEFINE_METHOD1(void*, WavpackGetWrapperLocation, (void *p1))
+ BEGIN_METHOD_RESOLVE()
+ RESOLVE_METHOD(WavpackOpenFileInputEx)
+ RESOLVE_METHOD(WavpackOpenFileInput)
+ RESOLVE_METHOD(WavpackGetVersion)
+ RESOLVE_METHOD(WavpackUnpackSamples)
+ RESOLVE_METHOD(WavpackGetNumSamples)
+ RESOLVE_METHOD(WavpackGetSampleIndex)
+ RESOLVE_METHOD(WavpackGetNumErrors)
+ RESOLVE_METHOD(WavpackLossyBlocks)
+ RESOLVE_METHOD(WavpackSeekSample)
+ RESOLVE_METHOD(WavpackCloseFile)
+ RESOLVE_METHOD(WavpackGetSampleRate)
+ RESOLVE_METHOD(WavpackGetBitsPerSample)
+ RESOLVE_METHOD(WavpackGetBytesPerSample)
+ RESOLVE_METHOD(WavpackGetNumChannels)
+ RESOLVE_METHOD(WavpackGetReducedChannels)
+ RESOLVE_METHOD(WavpackGetMD5Sum)
+ RESOLVE_METHOD(WavpackGetWrapperBytes)
+ RESOLVE_METHOD(WavpackGetWrapperData)
+ RESOLVE_METHOD(WavpackFreeWrapper)
+ RESOLVE_METHOD(WavpackGetProgress)
+ RESOLVE_METHOD(WavpackGetFileSize)
+ RESOLVE_METHOD(WavpackGetRatio)
+ RESOLVE_METHOD(WavpackGetAverageBitrate)
+ RESOLVE_METHOD(WavpackGetInstantBitrate)
+ RESOLVE_METHOD(WavpackGetTagItem)
+ RESOLVE_METHOD(WavpackAppendTagItem)
+ RESOLVE_METHOD(WavpackWriteTag)
+ RESOLVE_METHOD(WavpackOpenFileOutput)
+ RESOLVE_METHOD(WavpackSetConfiguration)
+ RESOLVE_METHOD(WavpackAddWrapper)
+ RESOLVE_METHOD(WavpackStoreMD5Sum)
+ RESOLVE_METHOD(WavpackPackInit)
+ RESOLVE_METHOD(WavpackPackSamples)
+ RESOLVE_METHOD(WavpackFlushSamples)
+ RESOLVE_METHOD(WavpackUpdateNumSamples)
+ RESOLVE_METHOD(WavpackGetWrapperLocation)
+ END_METHOD_RESOLVE()
+};
+
+#else
class DllWavPackInterface
{
@@ -204,127 +335,4 @@ class DllWavPack : public DllDynamic, DllWavPackInterface
virtual void Unload() {}
};
-#else
-
-class DllWavPackInterface
-{
-public:
- virtual ~DllWavPackInterface() {}
- virtual WavpackContext *WavpackOpenFileInputEx (stream_reader *reader, void *wv_id, void *wvc_id, char *error, int flags, int norm_offset)=0;
- virtual WavpackContext *WavpackOpenFileInput (const char *infilename, char *error, int flags, int norm_offset)=0;
- virtual int WavpackGetVersion (WavpackContext *wpc)=0;
- virtual unsigned int WavpackUnpackSamples (WavpackContext *wpc, int *buffer, unsigned int samples)=0;
- virtual unsigned int WavpackGetNumSamples (WavpackContext *wpc)=0;
- virtual unsigned int WavpackGetSampleIndex (WavpackContext *wpc)=0;
- virtual int WavpackGetNumErrors (WavpackContext *wpc)=0;
- virtual int WavpackLossyBlocks (WavpackContext *wpc)=0;
- virtual int WavpackSeekSample (WavpackContext *wpc, unsigned int sample)=0;
- virtual WavpackContext *WavpackCloseFile (WavpackContext *wpc)=0;
- virtual unsigned int WavpackGetSampleRate (WavpackContext *wpc)=0;
- virtual int WavpackGetBitsPerSample (WavpackContext *wpc)=0;
- virtual int WavpackGetBytesPerSample (WavpackContext *wpc)=0;
- virtual int WavpackGetNumChannels (WavpackContext *wpc)=0;
- virtual int WavpackGetReducedChannels (WavpackContext *wpc)=0;
- virtual int WavpackGetMD5Sum (WavpackContext *wpc, unsigned char data[16])=0;
- virtual unsigned int WavpackGetWrapperBytes (WavpackContext *wpc)=0;
- virtual unsigned char *WavpackGetWrapperData (WavpackContext *wpc)=0;
- virtual void WavpackFreeWrapper (WavpackContext *wpc)=0;
- virtual double WavpackGetProgress (WavpackContext *wpc)=0;
- virtual unsigned int WavpackGetFileSize (WavpackContext *wpc)=0;
- virtual double WavpackGetRatio (WavpackContext *wpc)=0;
- virtual double WavpackGetAverageBitrate (WavpackContext *wpc, int count_wvc)=0;
- virtual double WavpackGetInstantBitrate (WavpackContext *wpc)=0;
- virtual int WavpackGetTagItem (WavpackContext *wpc, const char *item, char *value, int size)=0;
- virtual int WavpackAppendTagItem (WavpackContext *wpc, const char *item, const char *value)=0;
- virtual int WavpackWriteTag (WavpackContext *wpc)=0;
- virtual WavpackContext *WavpackOpenFileOutput (blockout_f blockout, void *wv_id, void *wvc_id)=0;
- virtual int WavpackSetConfiguration (WavpackContext *wpc, WavpackConfig *config, unsigned int total_samples)=0;
- virtual int WavpackAddWrapper (WavpackContext *wpc, void *data, unsigned int bcount)=0;
- virtual int WavpackStoreMD5Sum (WavpackContext *wpc, unsigned char data[16])=0;
- virtual int WavpackPackInit (WavpackContext *wpc)=0;
- virtual int WavpackPackSamples (WavpackContext *wpc, int *sample_buffer, unsigned int sample_count)=0;
- virtual int WavpackFlushSamples (WavpackContext *wpc)=0;
- virtual void WavpackUpdateNumSamples (WavpackContext *wpc, void *first_block)=0;
- virtual void *WavpackGetWrapperLocation (void *first_block)=0;
-};
-
-class DllWavPack : public DllDynamic, DllWavPackInterface
-{
- DECLARE_DLL_WRAPPER(DllWavPack, DLL_PATH_WAVPACK_CODEC)
- DEFINE_METHOD6(WavpackContext*, WavpackOpenFileInputEx, (stream_reader* p1, void* p2, void* p3, char* p4, int p5, int p6))
- DEFINE_METHOD4(WavpackContext*, WavpackOpenFileInput, (const char* p1, char* p2, int p3, int p4))
- DEFINE_METHOD1(int, WavpackGetVersion, (WavpackContext* p1))
- DEFINE_METHOD3(unsigned int, WavpackUnpackSamples, (WavpackContext * p1, int * p2, unsigned int p3))
- DEFINE_METHOD1(unsigned int, WavpackGetNumSamples, (WavpackContext* p1))
- DEFINE_METHOD1(unsigned int, WavpackGetSampleIndex, (WavpackContext * p1))
- DEFINE_METHOD1(int, WavpackGetNumErrors, (WavpackContext * p1))
- DEFINE_METHOD1(int, WavpackLossyBlocks, (WavpackContext *p1))
- DEFINE_METHOD2(int, WavpackSeekSample, (WavpackContext *p1, unsigned int p2))
- DEFINE_METHOD1(WavpackContext*, WavpackCloseFile, (WavpackContext *p1))
- DEFINE_METHOD1(unsigned int, WavpackGetSampleRate, (WavpackContext *p1))
- DEFINE_METHOD1(int, WavpackGetBitsPerSample, (WavpackContext *p1))
- DEFINE_METHOD1(int, WavpackGetBytesPerSample, (WavpackContext *p1))
- DEFINE_METHOD1(int, WavpackGetNumChannels, (WavpackContext *p1))
- DEFINE_METHOD1(int, WavpackGetReducedChannels, (WavpackContext *p1))
- DEFINE_METHOD2(int, WavpackGetMD5Sum, (WavpackContext *p1, unsigned char p2[16]))
- DEFINE_METHOD1(unsigned int, WavpackGetWrapperBytes, (WavpackContext *p1))
- DEFINE_METHOD1(unsigned char*, WavpackGetWrapperData, (WavpackContext *p1))
- DEFINE_METHOD1(void, WavpackFreeWrapper, (WavpackContext *p1))
- DEFINE_METHOD1(double, WavpackGetProgress, (WavpackContext *p1))
- DEFINE_METHOD1(unsigned int, WavpackGetFileSize, (WavpackContext *p1))
- DEFINE_METHOD1(double, WavpackGetRatio, (WavpackContext *p1))
- DEFINE_METHOD2(double, WavpackGetAverageBitrate, (WavpackContext *p1, int p2))
- DEFINE_METHOD1(double, WavpackGetInstantBitrate, (WavpackContext *p1))
- DEFINE_METHOD4(int, WavpackGetTagItem, (WavpackContext *p1, const char *p2, char *p3, int p4))
- DEFINE_METHOD3(int, WavpackAppendTagItem, (WavpackContext *p1, const char *p2, const char *p3))
- DEFINE_METHOD1(int, WavpackWriteTag, (WavpackContext *p1))
- DEFINE_METHOD3(WavpackContext*, WavpackOpenFileOutput, (blockout_f p1, void *p2, void *p3))
- DEFINE_METHOD3(int, WavpackSetConfiguration, (WavpackContext *p1, WavpackConfig *p2, unsigned int p3))
- DEFINE_METHOD3(int, WavpackAddWrapper, (WavpackContext *p1, void *p2, unsigned int p3))
- DEFINE_METHOD2(int, WavpackStoreMD5Sum, (WavpackContext *p1, unsigned char p2[16]))
- DEFINE_METHOD1(int, WavpackPackInit, (WavpackContext *p1))
- DEFINE_METHOD3(int, WavpackPackSamples, (WavpackContext *p1, int *p2, unsigned int p3))
- DEFINE_METHOD1(int, WavpackFlushSamples, (WavpackContext *p1))
- DEFINE_METHOD2(void, WavpackUpdateNumSamples, (WavpackContext *p1, void *p2))
- DEFINE_METHOD1(void*, WavpackGetWrapperLocation, (void *p1))
- BEGIN_METHOD_RESOLVE()
- RESOLVE_METHOD(WavpackOpenFileInputEx)
- RESOLVE_METHOD(WavpackOpenFileInput)
- RESOLVE_METHOD(WavpackGetVersion)
- RESOLVE_METHOD(WavpackUnpackSamples)
- RESOLVE_METHOD(WavpackGetNumSamples)
- RESOLVE_METHOD(WavpackGetSampleIndex)
- RESOLVE_METHOD(WavpackGetNumErrors)
- RESOLVE_METHOD(WavpackLossyBlocks)
- RESOLVE_METHOD(WavpackSeekSample)
- RESOLVE_METHOD(WavpackCloseFile)
- RESOLVE_METHOD(WavpackGetSampleRate)
- RESOLVE_METHOD(WavpackGetBitsPerSample)
- RESOLVE_METHOD(WavpackGetBytesPerSample)
- RESOLVE_METHOD(WavpackGetNumChannels)
- RESOLVE_METHOD(WavpackGetReducedChannels)
- RESOLVE_METHOD(WavpackGetMD5Sum)
- RESOLVE_METHOD(WavpackGetWrapperBytes)
- RESOLVE_METHOD(WavpackGetWrapperData)
- RESOLVE_METHOD(WavpackFreeWrapper)
- RESOLVE_METHOD(WavpackGetProgress)
- RESOLVE_METHOD(WavpackGetFileSize)
- RESOLVE_METHOD(WavpackGetRatio)
- RESOLVE_METHOD(WavpackGetAverageBitrate)
- RESOLVE_METHOD(WavpackGetInstantBitrate)
- RESOLVE_METHOD(WavpackGetTagItem)
- RESOLVE_METHOD(WavpackAppendTagItem)
- RESOLVE_METHOD(WavpackWriteTag)
- RESOLVE_METHOD(WavpackOpenFileOutput)
- RESOLVE_METHOD(WavpackSetConfiguration)
- RESOLVE_METHOD(WavpackAddWrapper)
- RESOLVE_METHOD(WavpackStoreMD5Sum)
- RESOLVE_METHOD(WavpackPackInit)
- RESOLVE_METHOD(WavpackPackSamples)
- RESOLVE_METHOD(WavpackFlushSamples)
- RESOLVE_METHOD(WavpackUpdateNumSamples)
- RESOLVE_METHOD(WavpackGetWrapperLocation)
- END_METHOD_RESOLVE()
-};
-
#endif
View
8 lib/win32/libwavpack/Makefile.in
@@ -2,20 +2,12 @@ ARCH=@ARCH@
CFLAGS +=-D_LINUX -fPIC -DPACK -DUNPACK -DSEEKING -DTAGS -DVER3 -DUSE_FSTREAMS
OBJS=bits.o extra1.o extra2.o float.o md5.o metadata.o pack.o unpack.o unpack3.o utils.o words.o wputils.o
-ifeq ($(ARCH), powerpc-osx)
- BUNDLE1_O=-lbundle1.o -L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/ -lgcc
-endif
SLIB=../../../../system/players/paplayer/wavpack-@ARCH@.so
$(SLIB): $(OBJS)
-ifeq ($(findstring osx,$(ARCH)), osx)
- $(CC) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
- -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@
- @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O)
else
$(CC) $(CFLAGS) -shared -o $@ $(OBJS) `cat ../../DllLoader/exports/wrapper.def` ../../DllLoader/exports/wrapper.o
-endif
include ../../../../Makefile.include
View
4 xbmc/DllPaths_generated.h.in
@@ -55,7 +55,11 @@
#define DLL_PATH_SID_CODEC "special://xbmcbin/system/players/paplayer/libsidplay2-@ARCH@.so"
#define DLL_PATH_SPC_CODEC "special://xbmcbin/system/players/paplayer/SNESAPU-@ARCH@.so"
#define DLL_PATH_VGM_CODEC "special://xbmcbin/system/players/paplayer/vgmstream-@ARCH@.so"
+#if defined(_LINUX) && !defined(__APPLE__)
#define DLL_PATH_WAVPACK_CODEC "special://xbmcbin/system/players/paplayer/wavpack-@ARCH@.so"
+#else
+#define DLL_PATH_WAVPACK_CODEC "@WAVPACK_SONAME@"
+#endif
#define DLL_PATH_YM_CODEC "special://xbmcbin/system/players/paplayer/stsoundlibrary-@ARCH@.so"
#define DLL_PATH_SHN_CODEC "special://xbmcbin/system/players/paplayer/libshnplay-@ARCH@.so"
#if defined(_LINUX) && !defined(__APPLE__)

0 comments on commit 53a87a8

Please sign in to comment.
Something went wrong with that request. Please try again.