File tree Expand file tree Collapse file tree 6 files changed +36
-42
lines changed
atkaudio/AudioProcessorGraphMT Expand file tree Collapse file tree 6 files changed +36
-42
lines changed Original file line number Diff line number Diff line change @@ -184,33 +184,6 @@ include(./lib/atkaudio/cmake/cpack.cmake)
184184include (CTest )
185185add_subdirectory (tests )
186186
187- # macOS: Copy scanner into bundle and re-sign after build
188- if (APPLE )
189- # Use proper identity for CI, ad-hoc for local development
190- if (CODESIGN_IDENTITY)
191- set (_sign_identity "${CODESIGN_IDENTITY} " )
192- else ()
193- set (_sign_identity "-" )
194- endif ()
195-
196- add_custom_command (
197- TARGET ${CMAKE_PROJECT_NAME}
198- POST_BUILD
199- COMMAND
200- ${CMAKE_COMMAND} -E copy_if_different
201- $<TARGET_FILE :${CMAKE_PROJECT_NAME} _scanner >
202- "$<TARGET_BUNDLE_DIR :${CMAKE_PROJECT_NAME} >/Contents/MacOS/"
203- COMMAND
204- codesign --force --sign "${_sign_identity} " --deep
205- $<$<NOT :$<CONFIG :Debug >>:--timestamp >
206- $<$<NOT :$<CONFIG :Debug >>:-o >
207- $<$<NOT :$<CONFIG :Debug >>:runtime >
208- "$<TARGET_BUNDLE_DIR :${CMAKE_PROJECT_NAME} >"
209- VERBATIM
210- COMMENT "Adding scanner to bundle and re-signing"
211- )
212- endif ()
213-
214187# Automatically run install after build (skip in CI or when installing to system directories without permissions)
215188if (NOT DEFINED ENV{CI} AND NOT DEFINED ENV{GITHUB_ACTIONS} AND NOT CMAKE_INSTALL_PREFIX MATCHES "^/usr" )
216189 add_custom_command (
Original file line number Diff line number Diff line change 4747 "uuids" : {
4848 "windowsApp" : " ad885c58-5ca9-44de-8f4f-1c12676626a9"
4949 },
50- "version" : " 0.31.13 " ,
50+ "version" : " 0.31.14 " ,
5151 "website" : " https://www.atkaudio.com"
5252}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ FetchContent_Declare(
2222 juce
2323 EXCLUDE_FROM_ALL
2424 GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
25- GIT_TAG 8.0.11
25+ GIT_TAG 8.0.12
2626 PATCH_COMMAND
2727 ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_SOURCE_DIR} /cmake/patches/apply-juce-patches.cmake"
2828)
Original file line number Diff line number Diff line change @@ -641,3 +641,27 @@ set(CMAKE_MESSAGE_LOG_LEVEL_BACKUP ${CMAKE_MESSAGE_LOG_LEVEL})
641641set (CMAKE_MESSAGE_LOG_LEVEL ERROR)
642642include (CPack )
643643set (CMAKE_MESSAGE_LOG_LEVEL ${CMAKE_MESSAGE_LOG_LEVEL_BACKUP} )
644+
645+ # macOS: Copy scanner into bundle and re-sign after build
646+ if (APPLE AND TARGET ${TARGET_NAME} _scanner)
647+ # Use proper identity for CI, ad-hoc for local development
648+ if (CODESIGN_IDENTITY)
649+ set (_sign_identity "${CODESIGN_IDENTITY} " )
650+ else ()
651+ set (_sign_identity "-" )
652+ endif ()
653+
654+ add_custom_command (
655+ TARGET ${TARGET_NAME}
656+ POST_BUILD
657+ COMMAND
658+ ${CMAKE_COMMAND} -E copy_if_different
659+ $<TARGET_FILE :${TARGET_NAME} _scanner >
660+ "$<TARGET_BUNDLE_DIR :${TARGET_NAME} >/Contents/MacOS/"
661+ COMMAND
662+ codesign --force --sign "${_sign_identity} " --deep --timestamp -o runtime
663+ "$<TARGET_BUNDLE_DIR :${TARGET_NAME} >"
664+ VERBATIM
665+ COMMENT "Adding scanner to bundle and re-signing"
666+ )
667+ endif ()
Original file line number Diff line number Diff line change @@ -94,14 +94,17 @@ class DagPartitioner
9494 {
9595 task = std::move (tasks.front ());
9696 tasks.pop_front ();
97+ ++activeTasks;
9798 }
9899 }
99100
100101 if (task)
101102 {
102- ++activeTasks;
103103 task ();
104+ std::unique_lock<std::mutex> lock (queueMutex);
104105 --activeTasks;
106+ if (tasks.empty () && activeTasks == 0 )
107+ completion.notify_all ();
105108 }
106109 }
107110 }
@@ -133,15 +136,9 @@ class DagPartitioner
133136
134137 void wait ()
135138 {
136- // Wait for all tasks to be consumed and completed
137- while (true )
138- {
139- std::unique_lock<std::mutex> lock (queueMutex);
140- if (tasks.empty () && activeTasks == 0 )
141- return ;
142- lock.unlock ();
143- std::this_thread::yield ();
144- }
139+ // Wait until no queued tasks remain and no worker is executing a task.
140+ std::unique_lock<std::mutex> lock (queueMutex);
141+ completion.wait (lock, [this ] { return tasks.empty () && activeTasks == 0 ; });
145142 }
146143
147144 size_t numThreads () const
@@ -154,8 +151,9 @@ class DagPartitioner
154151 std::deque<std::function<void ()>> tasks;
155152 std::mutex queueMutex;
156153 std::condition_variable condition;
154+ std::condition_variable completion;
157155 std::atomic<bool > stop{false };
158- std::atomic< int > activeTasks{0 };
156+ size_t activeTasks{0 };
159157 };
160158
161159 DagPartitioner ()
Original file line number Diff line number Diff line change @@ -64,8 +64,7 @@ if(APPLE)
6464 # Ensure scanner builds before main plugin
6565 add_dependencies (${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_NAME} _scanner )
6666
67- # Note: Scanner copy and bundle re-signing is handled in root CMakeLists.txt
68- # because add_custom_command(TARGET) requires the target be in the same directory.
67+ # Note: Scanner copy and bundle re-signing is handled in lib/atkaudio/cmake/cpack.cmake
6968else ()
7069 # Copy scanner next to plugin after build (for development/local testing)
7170 # Installation is handled by cpack.cmake for all platforms
You can’t perform that action at this time.
0 commit comments