| 484 | static double streamStartTime = 0; // bias system time to small number |
| 485 | |
| 486 | static double SystemTime(bool usingAlsa) |
| 487 | { |
| 488 | #ifdef __WXGTK__ |
| 489 | if (usingAlsa) { |
| 490 | struct timespec now; |
| 491 | // CLOCK_MONOTONIC_RAW is unaffected by NTP or adj-time |
| 492 | #if defined(CLOCK_MONOTONIC_RAW) |
| 493 | clock_gettime(CLOCK_MONOTONIC_RAW, &now); |
| 494 | #else |
| 495 | clock_gettime(CLOCK_REALTIME, &now); |
| 496 | #endif |
| 497 | //return now.tv_sec + now.tv_nsec * 0.000000001; |
| 498 | return (now.tv_sec + now.tv_nsec * 0.000000001) - streamStartTime; |
| 499 | } |
| 500 | #else |
| 501 | static_cast<void>(usingAlsa);//compiler food. |
| 502 | #endif |
| 503 | |
| 504 | return util_GetTime() - streamStartTime; |
| 505 | } |
| 506 | |
| 507 | bool MIDIPlay::mMidiStreamActive = false; |
| 508 | bool MIDIPlay::mMidiOutputComplete = true; |
no test coverage detected