diff --git a/ao-play-async/CMakeLists.txt b/ao-play-async/CMakeLists.txt index 4d75868..0b36660 100644 --- a/ao-play-async/CMakeLists.txt +++ b/ao-play-async/CMakeLists.txt @@ -5,6 +5,8 @@ project(ao-play-async LANGUAGES C) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) + add_library(ao-play-async SHARED ao_playasync.c ao_playasync.h diff --git a/ao-play-async/ao_playasync.c b/ao-play-async/ao_playasync.c index f751f4a..3b53612 100644 --- a/ao-play-async/ao_playasync.c +++ b/ao-play-async/ao_playasync.c @@ -1,4 +1,5 @@ #include "ao_playasync.h" +#include "../ffi_version.h" #ifdef WIN32 #include @@ -326,7 +327,7 @@ static DWORD run(LPVOID arg) int ao_async_version() { - return VERSION; + return ffi_version(); } #ifdef _WIN32 @@ -702,9 +703,6 @@ void ao_pause_async(void *ao_handle, int paused) MUTEX_UNLOCK(h->mutex); } - - - int ao_real_output_bits_async(void *handle) { AO_Handle *h = (AO_Handle *) handle; diff --git a/ao-play-async/ao_playasync.h b/ao-play-async/ao_playasync.h index c2aaf59..539c43f 100644 --- a/ao-play-async/ao_playasync.h +++ b/ao-play-async/ao_playasync.h @@ -11,7 +11,9 @@ #define AOPLAYASYNC_EXPORT extern #endif -#define VERSION 3 +#define VERSION_MAJOR 1 +#define VERSION_MINOR 0 +#define VERSION_PATCH 0 typedef enum { ao = 1, diff --git a/ffi_version.h b/ffi_version.h new file mode 100644 index 0000000..2513022 --- /dev/null +++ b/ffi_version.h @@ -0,0 +1,10 @@ +#ifndef __FFI_VERSION__ +#define __FFI_VERSION__ + +#define VERSION_MAJOR 1 +#define VERSION_MINOR 0 +#define VERSION_PATCH 0 + +#define ffi_version() ((VERSION_MAJOR << 16) + (VERSION_MINOR << 8) + VERSION_PATCH) + +#endif diff --git a/ffmpeg-audio/CMakeLists.txt b/ffmpeg-audio/CMakeLists.txt index 229f987..db2c3dd 100644 --- a/ffmpeg-audio/CMakeLists.txt +++ b/ffmpeg-audio/CMakeLists.txt @@ -8,6 +8,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) add_library(ffmpeg_audio SHARED ffmpeg_audio.cpp ffmpeg_audio.h + ../ffi_version.h ) add_executable(demo_ffmpeg_audio diff --git a/ffmpeg-audio/ffmpeg_audio.cpp b/ffmpeg-audio/ffmpeg_audio.cpp index 589f9ab..b948be7 100644 --- a/ffmpeg-audio/ffmpeg_audio.cpp +++ b/ffmpeg-audio/ffmpeg_audio.cpp @@ -13,6 +13,7 @@ */ #include "ffmpeg_audio.h" +#include "../ffi_version.h" #include #include @@ -1021,3 +1022,8 @@ const char *fmpg_int_version2string(int ver) return version; } + +int fmpg_version() +{ + return ffi_version(); +} diff --git a/ffmpeg-audio/ffmpeg_audio.h b/ffmpeg-audio/ffmpeg_audio.h index 7dbd4aa..0cdda6e 100644 --- a/ffmpeg-audio/ffmpeg_audio.h +++ b/ffmpeg-audio/ffmpeg_audio.h @@ -150,6 +150,7 @@ FFMPEG_EXTERN int64_t fmpg_sample_position(fmpg_instance *instance); /* Approximate start time of the current decoded block in seconds. */ FFMPEG_EXTERN double fmpg_timecode(fmpg_instance *instance); +FFMPEG_EXTERN int fmpg_version(); FFMPEG_EXTERN const char *fmpg_ffmpeg_version(); FFMPEG_EXTERN const char *fmpg_int_version2string(int ver); FFMPEG_EXTERN int fmpg_compatible_ffmpeg(); diff --git a/lib/linux-x86_64.zip b/lib/linux-x86_64.zip index 4662daf..e9a1064 100644 Binary files a/lib/linux-x86_64.zip and b/lib/linux-x86_64.zip differ