Triode,

"process.out_frames = odone" in decode._drain() before calling
_write_samples();


Code:
--------------------
    
  --- /home/clivem/development/git/squeezelite/process.c        2013-06-06 
19:12:54.896223918 +0100
  +++ process.c 2013-06-07 13:24:07.508988610 +0100
  @@ -106,10 +111,21 @@
                soxr_error_t error = r->soxr_process(r->resampler, NULL, 0, 
NULL, process.outbuf, process.max_out_frames, &odone);
                if (error) {
                        LOG_INFO("soxr_process error: %s", 
soxr_strerror(error));
                }
                
  -             _write_samples();
  +             if (odone) {
  +                     process.out_frames = odone;
  
  +                     size_t clip_cnt = *(r->soxr_num_clips(r->resampler));
  +                     if (clip_cnt - r->old_clips) {
  +                             LOG_INFO("resampling clips: %u", 
(unsigned)(clip_cnt - r->old_clips));
  +                             r->old_clips = clip_cnt;
  +                     }
  +
  +                     _write_samples();
  +             }
        } while (odone);
  }
  
  
--------------------


------------------------------------------------------------------------
JackOfAll's Profile: http://forums.slimdevices.com/member.php?userid=3069
View this thread: http://forums.slimdevices.com/showthread.php?t=98544

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to