diff options
author | Henri Herscher <henri@oreka.org> | 2006-04-08 23:42:13 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2006-04-08 23:42:13 +0000 |
commit | 100bc1845f00147f4cbb7b88574f190a316636b5 (patch) | |
tree | 29aa33c2fe7df1ec57eed01d2bd1557588ad3479 /orkaudio/BatchProcessing.cpp | |
parent | abdf9da6f72462aff76e87f38a1ab9cb31f3e396 (diff) |
Replaced sleep by nanosleep
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@211 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/BatchProcessing.cpp')
-rw-r--r-- | orkaudio/BatchProcessing.cpp | 12 |
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); } } |