Skip to content

Commit b6f3839

Browse files
committed
0.31.1
1 parent 115c875 commit b6f3839

25 files changed

+1120
-677
lines changed

buildspec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
"uuids": {
4848
"windowsApp": "ad885c58-5ca9-44de-8f4f-1c12676626a9"
4949
},
50-
"version": "0.31.0",
50+
"version": "0.31.1",
5151
"website": "https://www.atkaudio.com"
5252
}

cmake/windows/compilerconfig.cmake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ add_compile_options(
3939
"$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:${_obs_msvc_cpp_options}>"
4040
"$<$<COMPILE_LANG_AND_ID:C,Clang>:${_obs_clang_c_options}>"
4141
"$<$<COMPILE_LANG_AND_ID:CXX,Clang>:${_obs_clang_cxx_options}>"
42-
$<$<CONFIG:Release>:/Gy>
43-
$<$<CONFIG:Release>:/GL>
44-
$<$<CONFIG:Release>:/Oi>
45-
$<$<CONFIG:RelWithDebInfo>:/Od> # Disable optimizations for RelWithDebInfo
4642
)
4743

4844
add_compile_definitions(
@@ -56,11 +52,6 @@ add_compile_definitions(
5652
)
5753

5854
add_link_options(
59-
$<$<CONFIG:Release>:/OPT:REF>
60-
$<$<CONFIG:Release>:/OPT:ICF>
61-
$<$<CONFIG:Release>:/LTCG>
62-
$<$<CONFIG:Release>:/INCREMENTAL:NO>
63-
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL> # Enable incremental linking for RelWithDebInfo
6455
/DEBUG
6556
/Brepro
6657
)

lib/atkaudio/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ target_compile_definitions(
5050
JUCE_USE_CURL=1
5151
JUCE_WEB_BROWSER=0
5252
JUCE_MODAL_LOOPS_PERMITTED=1 # we use QT event loop, so this is needed
53+
JUCE_DIRECT2D=0 # Disable Direct2D to avoid crash in applySingleChannelBoxBlurEffectInArea
5354
# Disable DBG() output in CI/GitHub Actions RelWithDebInfo builds (keeps debug symbols but no console spam in CI)
5455
$<$<AND:$<CONFIG:RelWithDebInfo>,$<OR:$<BOOL:$ENV{CI}>,$<BOOL:$ENV{GITHUB_ACTIONS}>>>:JUCE_DISABLE_ASSERTIONS>
5556
)

lib/atkaudio/cmake/cpack.cmake

Lines changed: 89 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,73 @@ string(JSON WEBSITE GET "${_buildspec_json}" website)
66
string(JSON DISPLAYNAME GET "${_buildspec_json}" displayName)
77
string(JSON PATHNAME GET "${_buildspec_json}" name)
88

9+
# Define ATK_CI_BUILD for CI builds
10+
if(DEFINED ENV{CI} OR DEFINED ENV{GITHUB_ACTIONS})
11+
add_compile_definitions(ATK_CI_BUILD)
12+
endif()
13+
14+
# Define ATK_DEBUG for Debug/RelWithDebInfo builds when not in CI
15+
if((CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") AND NOT DEFINED ENV{CI} AND NOT DEFINED ENV{GITHUB_ACTIONS})
16+
add_compile_definitions(ATK_DEBUG)
17+
endif()
18+
19+
# Match JUCE's recommended config flags for Release and RelWithDebInfo
20+
if(UNIX)
21+
# Fast math for all builds
22+
string(APPEND CMAKE_C_FLAGS " -ffast-math")
23+
string(APPEND CMAKE_CXX_FLAGS " -ffast-math")
24+
25+
string(APPEND CMAKE_C_FLAGS_RELEASE " -g -O3")
26+
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -g -O3")
27+
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -g -O3")
28+
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -g -O3")
29+
30+
if(APPLE)
31+
string(APPEND CMAKE_OBJC_FLAGS " -ffast-math")
32+
string(APPEND CMAKE_OBJCXX_FLAGS " -ffast-math")
33+
string(APPEND CMAKE_OBJC_FLAGS_RELEASE " -g -O3")
34+
string(APPEND CMAKE_OBJCXX_FLAGS_RELEASE " -g -O3")
35+
string(APPEND CMAKE_OBJC_FLAGS_RELWITHDEBINFO " -g -O3")
36+
string(APPEND CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO " -g -O3")
37+
endif()
38+
39+
# LTO flags (match juce_recommended_lto_flags) - only on CI for faster local builds
40+
if(DEFINED ENV{CI} OR DEFINED ENV{GITHUB_ACTIONS})
41+
add_compile_options($<$<CONFIG:Release>:-flto>)
42+
add_link_options($<$<CONFIG:Release>:-flto>)
43+
add_compile_options($<$<CONFIG:RelWithDebInfo>:-flto>)
44+
add_link_options($<$<CONFIG:RelWithDebInfo>:-flto>)
45+
endif()
46+
47+
elseif(WIN32)
48+
# Fast math for all builds
49+
add_compile_options(/fp:fast)
50+
51+
# Match JUCE: /Ox for Release, /Zi for debug symbols
52+
add_compile_options(
53+
$<$<CONFIG:Release>:/Zi>
54+
$<$<CONFIG:Release>:/Ox>
55+
$<$<CONFIG:Release>:/MP>
56+
$<$<CONFIG:RelWithDebInfo>:/Zi>
57+
$<$<CONFIG:RelWithDebInfo>:/Ox>
58+
$<$<CONFIG:RelWithDebInfo>:/MP>
59+
)
60+
61+
# LTO flags (match juce_recommended_lto_flags) - only on CI for faster local builds
62+
if(DEFINED ENV{CI} OR DEFINED ENV{GITHUB_ACTIONS})
63+
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
64+
add_compile_options($<$<CONFIG:Release>:/GL>)
65+
add_link_options($<$<CONFIG:Release>:/LTCG>)
66+
add_compile_options($<$<CONFIG:RelWithDebInfo>:/GL>)
67+
add_link_options($<$<CONFIG:RelWithDebInfo>:/LTCG>)
68+
else()
69+
# Clang-cl
70+
add_compile_options($<$<CONFIG:Release>:-flto>)
71+
add_compile_options($<$<CONFIG:RelWithDebInfo>:-flto>)
72+
endif()
73+
endif()
74+
endif()
75+
976
file(CREATE_LINK "${CMAKE_CURRENT_SOURCE_DIR}/README.md" "${CMAKE_BINARY_DIR}/README.txt" SYMBOLIC)
1077
set(CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt")
1178

@@ -21,10 +88,21 @@ else()
2188
set(CPACK_PACKAGE_NAME "${DISPLAYNAME}")
2289
endif()
2390

91+
# Detect Windows target architecture once for all subsequent checks
92+
if(WIN32)
93+
if(CMAKE_GENERATOR_PLATFORM)
94+
set(_win_target_arch "${CMAKE_GENERATOR_PLATFORM}")
95+
elseif(CMAKE_VS_PLATFORM_NAME)
96+
set(_win_target_arch "${CMAKE_VS_PLATFORM_NAME}")
97+
else()
98+
set(_win_target_arch "${CMAKE_SYSTEM_PROCESSOR}")
99+
endif()
100+
endif()
101+
24102
# Include architecture in package name only for Windows ARM64
25103
# Include build type in filename for local builds (non-CI)
26104
if(WIN32)
27-
if(CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
105+
if(_win_target_arch STREQUAL "ARM64")
28106
set(CPACK_PACKAGE_FILE_NAME ${PATHNAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-arm64)
29107
else()
30108
# Windows x64 - no architecture suffix
@@ -73,7 +151,13 @@ if(WIN32)
73151
LIBRARY DESTINATION "${TARGET_NAME}/bin/64bit"
74152
COMPONENT plugin)
75153

76-
# Note: PDB files are packaged separately in GitHub Actions workflow
154+
# Include PDB files for debugging (x64 only, not ARM64)
155+
if(NOT _win_target_arch STREQUAL "ARM64")
156+
install(FILES $<TARGET_PDB_FILE:${TARGET_NAME}>
157+
DESTINATION "${TARGET_NAME}/bin/64bit"
158+
COMPONENT plugin
159+
OPTIONAL)
160+
endif()
77161

78162
# Windows data install pattern
79163
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/data")
@@ -229,7 +313,7 @@ if(WIN32)
229313
set(CPACK_PACKAGE_EXTENSION "exe")
230314

231315
# Configure NSIS for specific architectures
232-
if(CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
316+
if(_win_target_arch STREQUAL "ARM64")
233317
# Simple architecture check for ARM64 installer
234318
set(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS "
235319
; Simple architecture check for ARM64
@@ -314,7 +398,7 @@ include(CPack)
314398

315399
# Determine debug symbols package name based on platform
316400
if(WIN32)
317-
if(CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
401+
if(_win_target_arch STREQUAL "ARM64")
318402
set(DEBUG_ARCH "arm64")
319403
else()
320404
set(DEBUG_ARCH "x64")
@@ -428,7 +512,7 @@ if(APPLE)
428512
set(PORTABLE_OS_NAME "macos")
429513
endif()
430514
set(CPACK_PACKAGE_FILE_NAME "portable-${PATHNAME}-${PROJECT_VERSION}-${PORTABLE_OS_NAME}")
431-
if(WIN32 AND CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
515+
if(WIN32 AND _win_target_arch STREQUAL "ARM64")
432516
set(CPACK_PACKAGE_FILE_NAME "portable-${PATHNAME}-${PROJECT_VERSION}-${PORTABLE_OS_NAME}-arm64")
433517
endif()
434518
if(UNIX AND NOT APPLE)

lib/atkaudio/src/atkaudio/AudioProcessorGraphMT/AudioProcessorGraphMT.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ class RenderSequenceBuilder
12971297
const auto nodeID = node->nodeID;
12981298

12991299
// Skip I/O nodes - we handle input/output externally in perform()
1300-
if (auto* ioNode = dynamic_cast<AudioProcessorGraphMT::AudioGraphIOProcessor*>(node->getProcessor()))
1300+
if (dynamic_cast<AudioProcessorGraphMT::AudioGraphIOProcessor*>(node->getProcessor()))
13011301
continue;
13021302

13031303
// Skip nodes not in filter (if filter is provided)
@@ -1765,14 +1765,19 @@ class RenderSequenceBuilder
17651765
DBG("[LATENCY] Building filtered sequence for " << orderedNodes.size() << " nodes");
17661766
for (auto* node : orderedNodes)
17671767
{
1768+
(void)node; // Used in DBG macros only
17681769
DBG("[LATENCY] Node in subgraph: "
17691770
<< node->getProcessor()->getName()
17701771
<< " (nodeID="
17711772
<< (int)node->nodeID.uid
17721773
<< ")");
17731774
}
17741775
for (const auto& [nodeId, delay] : globalDelays)
1776+
{
1777+
(void)nodeId;
1778+
(void)delay; // Used in DBG macros only
17751779
DBG("[LATENCY] GlobalDelay: nodeID=" << (int)nodeId << " delay=" << delay);
1780+
}
17761781

17771782
int maxChannelsNeeded = 0;
17781783
int maxMidiBuffersNeeded = 1; // At least one MIDI buffer
@@ -2216,7 +2221,7 @@ class ParallelRenderSequence
22162221
for (int i = 0; i < numSamples; ++i)
22172222
{
22182223
delayLine.pushSample(channel, src[i]);
2219-
float delayedSample = delayLine.popSample(channel, delay);
2224+
float delayedSample = delayLine.popSample(channel, static_cast<float>(delay));
22202225
dst[i] += delayedSample;
22212226
}
22222227
}
@@ -2859,6 +2864,7 @@ class ParallelRenderSequence
28592864
const std::shared_ptr<ChainBufferPool::PooledBuffer>& savedInputBuffer
28602865
)
28612866
{
2867+
(void)audio; // Unused in current implementation
28622868
for (auto& obsNode : obsOutputNodes)
28632869
{
28642870
auto& nodeBuffer = obsNode.buffer->audioBuffer;
@@ -3290,12 +3296,14 @@ class ParallelRenderSequence
32903296

32913297
if (currentLatencySum != chain->latencySum)
32923298
{
3299+
#ifdef ATK_DEBUG
32933300
DBG("[PARALLEL] Latency changed in subgraph "
32943301
<< i
32953302
<< ": expected "
32963303
<< chain->latencySum
32973304
<< ", current "
32983305
<< currentLatencySum);
3306+
#endif
32993307
return true;
33003308
}
33013309
}
@@ -3873,8 +3881,10 @@ void AudioProcessorGraphMT::setStateInformation(const void*, int)
38733881

38743882
void AudioProcessorGraphMT::processBlock(AudioBuffer<float>& audio, MidiBuffer& midi)
38753883
{
3884+
#ifdef ATK_DEBUG
38763885
if (!midi.isEmpty())
38773886
DBG("[AudioProcessorGraphMT::processBlock] Received MIDI: " << midi.getNumEvents() << " events");
3887+
#endif
38783888

38793889
return pimpl->processBlock(audio, midi, getPlayHead());
38803890
}

lib/atkaudio/src/atkaudio/AudioProcessorGraphMT/AudioThreadPool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ class AudioThreadPool
270270

271271
void initialize(int numWorkers = 0, int priority = 8)
272272
{
273+
(void)priority; // Unused - reserved for future use
273274
std::lock_guard<std::mutex> lock(poolMutex);
274275

275276
if (isInitialized)

lib/atkaudio/src/atkaudio/DeviceIo/DeviceIo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct atk::DeviceIo::Impl : public juce::Timer
8888
// No hardware input: send OBS input to hardware output
8989
hardwareOutputBuffer.setSize(numChannels, numSamples, false, false, true);
9090
for (int ch = 0; ch < numChannels; ++ch)
91-
std::memcpy(hardwareOutputBuffer.getWritePointer(ch), buffer[ch], numSamples * sizeof(float));
91+
std::copy(buffer[ch], buffer[ch] + numSamples, hardwareOutputBuffer.getWritePointer(ch));
9292
// Apply output delay before sending to hardware
9393
applyOutputDelay(hardwareOutputBuffer, numChannels, numSamples, sampleRate);
9494
fromObsBuffer.write(hardwareOutputBuffer.getArrayOfWritePointers(), numChannels, numSamples, sampleRate);
@@ -113,7 +113,7 @@ struct atk::DeviceIo::Impl : public juce::Timer
113113
{
114114
// Replace: HW input -> OBS output
115115
for (int ch = 0; ch < numChannels; ++ch)
116-
std::memcpy(buffer[ch], tempBuffer.getReadPointer(ch), numSamples * sizeof(float));
116+
std::copy(tempBuffer.getReadPointer(ch), tempBuffer.getReadPointer(ch) + numSamples, buffer[ch]);
117117
}
118118
}
119119
// else: No hardware input - pass through OBS audio unchanged

0 commit comments

Comments
 (0)