- Timestamp:
- Oct 1, 2006, 5:13:00 PM (18 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 8131a5c
- Parents:
- 32c0133
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ext/midi/timer.c
r32c0133 r1899f0d 41 41 #if 0 42 42 #include <winbase.h> 43 #endif 43 44 44 45 struct _aubio_timer_t … … 74 75 75 76 if (new_thread) { 77 #if 0 76 78 timer->thread = CreateThread(NULL, 0, aubio_timer_run, (LPVOID) timer, 0, &timer->thread_id); 79 #endif 77 80 if (timer->thread == NULL) { 78 81 AUBIO_ERR( "Couldn't create timer thread"); … … 80 83 return NULL; 81 84 } 85 #if 0 82 86 SetThreadPriority(timer->thread, THREAD_PRIORITY_TIME_CRITICAL); 87 #endif 83 88 } else { 84 89 aubio_timer_run((LPVOID) timer); … … 90 95 aubio_timer_run(LPVOID data) 91 96 { 97 #if 0 92 98 int count = 0; 93 99 int cont = 1; … … 131 137 132 138 ExitThread(0); 139 #endif 133 140 return 0; 134 141 } … … 146 153 aubio_timer_join(aubio_timer_t* timer) 147 154 { 155 #if 0 148 156 DWORD wait_result; 149 157 if (timer->thread == 0) { … … 152 160 wait_result = WaitForSingleObject(timer->thread, INFINITE); 153 161 return (wait_result == WAIT_OBJECT_0)? AUBIO_OK : AUBIO_FAIL; 162 #else 163 return 0; 164 #endif 154 165 } 155 166 /*************************************************************** … … 177 188 double rdtsc(void) 178 189 { 190 #if 0 179 191 LARGE_INTEGER t; 180 192 QueryPerformanceCounter(&t); 181 193 return (double) t.QuadPart; 194 #else 195 return 0.; 196 #endif 182 197 } 183 198 … … 210 225 211 226 #else 227 #if 0 212 228 unsigned int before, after; 213 229 LARGE_INTEGER start, stop; … … 223 239 return (double) 1000 * (stop.QuadPart - start.QuadPart) / (after - before); 224 240 #endif 225 } 226 227 #endif 241 return 0; 242 #endif 243 } 244 228 245 229 246
Note: See TracChangeset
for help on using the changeset viewer.