From 53af3f19d8b11ac58c0c7688345a2c5e11164f9d Mon Sep 17 00:00:00 2001 From: Moritz Heppner Date: Wed, 8 May 2024 12:01:59 +0200 Subject: [PATCH 1/2] fix issues in ni package cmake helper - link codec libraries to AudioToolbox framework - fix platform-specific compile definitions --- NI.package.cmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/NI.package.cmake b/NI.package.cmake index e228d19c..03a1f3f8 100644 --- a/NI.package.cmake +++ b/NI.package.cmake @@ -16,6 +16,10 @@ function( pr_init_ni_nimedia_package_path ) endfunction() pr_init_ni_nimedia_package_path() +if( APPLE OR WIN32 ) + set( APPLE_OR_WINDOWS TRUE ) +endif() + set( NIMEDIA_PCM_INCLUDE_DIRS "${NI_NIMEDIA_PACKAGE_PATH}/pcm/inc" ) if ( NOT (EXISTS ${NIMEDIA_PCM_INCLUDE_DIRS}) ) @@ -120,7 +124,7 @@ set( audiostream_sources "${NI_NIMEDIA_PACKAGE_PATH}/audiostream/src/ni/media/iostreams/stream_buffer.h" "${NI_NIMEDIA_PACKAGE_PATH}/audiostream/src/ni/media/iostreams/write_obj.h" ) -if ( APPLE OR WIN32 ) +if ( APPLE_OR_WINDOWS ) list( APPEND audiostream_sources "${NI_NIMEDIA_PACKAGE_PATH}/audiostream/src/ni/media/audio/mp3/mp3_file_source.h" "${NI_NIMEDIA_PACKAGE_PATH}/audiostream/src/ni/media/audio/mp3/mp3_vector_source.h" @@ -162,6 +166,8 @@ list( APPEND codec_libraries flacpp ) find_package( NILibVorbis REQUIRED ) list( APPEND codec_libraries libvorbis ) if ( APPLE ) + find_library( COREAUDIOTOOLBOX_FRAMEWORK AudioToolbox ) + list( APPEND codec_libraries ${COREAUDIOTOOLBOX_FRAMEWORK}) if ( NOT IOS ) find_library( CORESERVICES_FRAMEWORK CoreServices ) list( APPEND codec_libraries ${CORESERVICES_FRAMEWORK} ) @@ -186,13 +192,13 @@ target_link_libraries( audiostream PUBLIC pcm target_compile_definitions( audiostream PRIVATE NIMEDIA_ENABLE_AIFF_DECODING=1 NIMEDIA_ENABLE_FLAC_DECODING=1 - NIMEDIA_ENABLE_MP3_DECODING=1 - NIMEDIA_ENABLE_MP4_DECODING=1 + NIMEDIA_ENABLE_MP3_DECODING=$ + NIMEDIA_ENABLE_MP4_DECODING=$ NIMEDIA_ENABLE_OGG_DECODING=1 NIMEDIA_ENABLE_WAV_DECODING=1 NIMEDIA_ENABLE_WMA_DECODING=$ #wma support is off by default, clients need to turn it on NIMEDIA_ENABLE_WAV_ENCODING=1 - NIMEDIA_ENABLE_ITUNES_DECODING=1 + NIMEDIA_ENABLE_ITUNES_DECODING=$ ) add_library( ni-media INTERFACE ) From aff504c2421e32c04143c3bd3d397a6de3df6502 Mon Sep 17 00:00:00 2001 From: Moritz Heppner Date: Wed, 8 May 2024 12:02:18 +0200 Subject: [PATCH 2/2] update changelog for v1.1.1 and v1.1.2 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7231719b..3839901d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# 2024-05-08 version v1.1.2: + + * FIXED: Issues in cmake integration for NI's internal build system + +# 2024-04-30 version v1.1.1: + + * ADDED: Cmake integration for NI's internal build system + * FIXED: An issue where `media_foundation_helper` could produce an integer overflow resulting in a freeze while reading a file + # 2023-12-20 version v1.1.0: * ADDED: Possibility of creating a custom decoder via `istream_source`