Switch to unified view

a/mpd2src/mpd2sc.cpp b/mpd2src/mpd2sc.cpp
...
...
236
            return;
236
            return;
237
        }
237
        }
238
        if (g_quitrequest) {
238
        if (g_quitrequest) {
239
            return;
239
            return;
240
        }
240
        }
241
        iDriver->SendAudio(cp, iPacketBytes);
241
        iDriver->SendAudio(cp, iPacketBytes, iPaused);
242
    }
242
    }
243
}
243
}
244
244
245
void PcmSender::TimerExpired()
245
void PcmSender::TimerExpired()
246
{
246
{
247
    iMutex.Wait();
247
    iMutex.Wait();
248
249
    const unsigned char *cp = m_audio->data((size_t)iPacketBytes);
250
    if (cp == 0) {
251
        static bool sigsent = false;
252
        if (!sigsent) {
253
            LOGDEB("PcmSender::TimerExpired: killing myself\n");
254
            kill(getpid(), SIGUSR1);
255
            sigsent = true;
248
        
256
        }
257
    } else {
258
        iDriver->SendAudio(cp, iPacketBytes, iPaused);
259
    }
260
249
    if (!iPaused) {
261
    if (!iPaused) {
250
        TUint64 now = OsTimeInUs(iEnv.OsCtx());
262
        TUint64 now = OsTimeInUs(iEnv.OsCtx());
251
252
        const unsigned char *cp = m_audio->data((size_t)iPacketBytes);
253
        if (cp == 0) {
254
            static bool sigsent = false;
255
            if (!sigsent) {
256
                LOGDEB("PcmSender::TimerExpired: killing myself\n");
257
                kill(getpid(), SIGUSR1);
258
                sigsent = true;
259
            }
260
        } else {
261
            iDriver->SendAudio(cp, iPacketBytes);
262
        }
263
263
264
        if (!iPaced) {
264
        if (!iPaced) {
265
            // Means we're doing blocking reads on the source, and
265
            // Means we're doing blocking reads on the source, and
266
            // it's setting the pace.  I'd like to actually use 0 here
266
            // it's setting the pace.  I'd like to actually use 0 here
267
            // (ala qt processEvents()), but this appears to busyloop
267
            // (ala qt processEvents()), but this appears to busyloop