diff --git a/src/kits/media/MediaEventLooper.cpp b/src/kits/media/MediaEventLooper.cpp index 0af1a72b63..dd6e43044b 100644 --- a/src/kits/media/MediaEventLooper.cpp +++ b/src/kits/media/MediaEventLooper.cpp @@ -217,7 +217,6 @@ BMediaEventLooper::ControlLoop() bigtime_t waitUntil = B_INFINITE_TIMEOUT; bool hasRealtime = false; bool hasEvent = false; - bool hasBooted = false; // While there are no events or it is not time for the earliest event, // process messages using WaitForMessages. Whenever this funtion times out, @@ -274,14 +273,12 @@ BMediaEventLooper::ControlLoop() fEventQueue.FirstEventTime(), fEventLatency + fSchedulingLatency); - // The first event we handle will have - // a negative startup wait. In this case - // we just check the port and let the - // first event to be executed just now. - if (!hasBooted && waitUntil < 0) { + // TODO: At boot the wait time go + // to negative depending on the system + // speed, this should be fixed. + if (waitUntil < 0) waitUntil = 0; - hasBooted = true; - } + } else if (!hasRealtime) waitUntil = B_INFINITE_TIMEOUT;