Skip to content

Commit

Permalink
MSVC + Win32/x86 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcliffe committed Feb 20, 2015
1 parent 14881ac commit 8a859c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
SET( EX_PLATFORM_NAME "x86" )
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )

if ( WIN32 AND EX_PLATFORM EQUAL 64)
set(BUILD_X86 OFF CACHE BOOL "Copy & Build 32-bit files even if 64-bit compiler is detected.")
if (BUILD_X86)
SET( EX_PLATFORM 32 )
SET( EX_PLATFORM_NAME "x86" )
endif (BUILD_X86)
endif ( WIN32 AND EX_PLATFORM EQUAL 64)

SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${EX_PLATFORM_NAME})
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/${EX_PLATFORM_NAME})
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/${EX_PLATFORM_NAME})
Expand Down
3 changes: 2 additions & 1 deletion src/audio/AudioThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,9 @@ void AudioThread::setupDevice(int deviceId) {
if (deviceController.find(outputDevice.load()) != deviceController.end()) {
deviceController[outputDevice.load()]->removeThread(this);
}

#ifndef _MSC_VER
opts.priority = sched_get_priority_max(SCHED_FIFO);
#endif
// opts.flags = RTAUDIO_MINIMIZE_LATENCY;
opts.flags = RTAUDIO_SCHEDULE_REALTIME;

Expand Down

0 comments on commit 8a859c6

Please sign in to comment.