Switch to unified view

a/sc2src/alsadirect.cpp b/sc2src/alsadirect.cpp
...
...
158
        char *buf = tsk->m_buf;
158
        char *buf = tsk->m_buf;
159
        // This loop is copied from the alsa sample, but it should not
159
        // This loop is copied from the alsa sample, but it should not
160
        // be necessary, in synchronous mode, alsa is supposed to
160
        // be necessary, in synchronous mode, alsa is supposed to
161
        // perform complete writes except for errors or interrupts
161
        // perform complete writes except for errors or interrupts
162
        while (frames > 0) {
162
        while (frames > 0) {
163
            if (g_quitrequest) {
164
                break;
165
            }
163
            if (snd_pcm_delay(pcm, &alsa_delay) < 0) {
166
            if (snd_pcm_delay(pcm, &alsa_delay) < 0) {
164
                alsa_delay = 0;
167
                alsa_delay = 0;
165
            }
168
            }
166
//            LOGDEB("alsawriter: avail frames " << snd_pcm_avail(pcm) <<
169
//            LOGDEB("alsawriter: avail frames " << snd_pcm_avail(pcm) <<
167
//                   " writing " << frames << endl);
170
//                   " writing " << frames << endl);
...
...
714
    size_t src_input_bytes = 0;
717
    size_t src_input_bytes = 0;
715
    
718
    
716
    alsaqueue.start(1, alsawriter, 0);
719
    alsaqueue.start(1, alsawriter, 0);
717
720
718
    while (true) {
721
    while (true) {
722
        if (g_quitrequest) {
723
            goto done;
724
        }
719
        AudioMessage *tsk = 0;
725
        AudioMessage *tsk = 0;
720
        // Get new data
726
        // Get new data
721
        if (!queue->take(&tsk)) {
727
        if (!queue->take(&tsk)) {
722
            LOGDEB("audioEater: alsadirect: queue take failed\n");
728
            LOGDEB("audioEater: alsadirect: queue take failed\n");
723
            goto done;
729
            goto done;