Skip to content

Commit

Permalink
Finished clocked sync device technology. There are two different appr…
Browse files Browse the repository at this point in the history
…oaches of which one only works in Windows. This Windows approach (preprocessor JVX_SYNCED_CLOCK_WINDOWS=ON), however, is the better choice for Windows since the timeout in the other timer functions may take up to 15.6 msecs longer than expected
  • Loading branch information
hkhauke committed Mar 4, 2024
1 parent 3fc29ec commit 4b5efa2
Show file tree
Hide file tree
Showing 4 changed files with 358 additions and 184 deletions.
3 changes: 3 additions & 0 deletions cmake/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ set(JVX_CMAKE_LINKER_FLAGS_EXEC "${JVX_LINKER_DISABLE_WARNING}")
set(JVX_SYSTEM_LIBRARIES "")
set(JVX_SOCKET_LIBRARIES "ws2_32;wsock32")

# Add OS specific category libraries
set(JVX_SYSTEM_LIBRARIES_WIN_MM "Winmm")

if(NOT JVX_USE_CONSOLE_APPS)
set(JVX_APP_TYPE_TOKEN "WIN32")
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,20 @@ set(LOCAL_LIBS
jvx-helpers-product_static

jvx-audiocodec-helpers_static

)

# Special rule for Windows here - the thread timer accuracy is a problem.
# However, we have an alternative approach to define timers with timerSetEvent
# For more info, comments are provided at the beginng of <CjvxAudiSyncClockDevice.cpp
if(${JVX_OS} MATCHES "windows")
set(LOCAL_LIBS ${LOCAL_LIBS}
${JVX_SYSTEM_LIBRARIES_WIN_MM} # only for Windows, shpuld be empty otherwise
)
set(LOCAL_COMPILE_DEFINITIONS "${LOCAL_COMPILE_DEFINITIONS};JVX_SYNCED_CLOCK_WINDOWS")
endif()


# set(LOCAL_PCG_FILE_OPTIONS
# -I ${JVX_SUBPRODUCT_ROOT}/sources/jvxLibraries/jvx-audiocodec-helpers/pcg)

Expand Down
Loading

0 comments on commit 4b5efa2

Please sign in to comment.