summaryrefslogtreecommitdiff
path: root/orkaudio/BatchProcessing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'orkaudio/BatchProcessing.cpp')
-rw-r--r--orkaudio/BatchProcessing.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/orkaudio/BatchProcessing.cpp b/orkaudio/BatchProcessing.cpp
index 42816c3..a381958 100644
--- a/orkaudio/BatchProcessing.cpp
+++ b/orkaudio/BatchProcessing.cpp
@@ -236,9 +236,15 @@ void BatchProcessing::ThreadHandler(void *args)
if(CONFIG.m_batchProcessingEnhancePriority == false)
{
// Give up CPU between every audio buffer to make sure the actual recording always has priority
- ACE_Time_Value yield;
- yield.set(0,1); // 1 us
- ACE_OS::sleep(yield);
+ //ACE_Time_Value yield;
+ //yield.set(0,1); // 1 us
+ //ACE_OS::sleep(yield);
+
+ // Use this instead, even if it still seems this holds the whole process under Linux instead of this thread only.
+ struct timespec ts;
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1;
+ ACE_OS::nanosleep (&ts, NULL);
}
}