On Thu, Sep 01, 2011 at 09:02:06PM +0200, Donovan Watteau wrote: > On Wed, 31 Aug 2011, Alexandre Ratchov wrote: > > Thanks. It works for me except with small block sizes on my setup, > > example, if I start: > > > > aucat -r 48000 -b 960 -z 480 > > > > and then try to play a .mp3 there's no sound. The diff below seems to > > fix it. Besides that, few remarks inlined below: > > ... > Thank you very much for these fixes and explanations. > > However, it seems that the changes related to the buffer make cmus a bit > slower to pause, for example: the buffer continues playing for about > 1 sec, which, IMO, is not very diserable.
Indeed 1 second is not desirable, but it shouldn't be 1 second. It's supposed to be slightly more than 300ms, which is usable. > Should par.appbufsz be lowered a bit? Not really. On one hand, data that already went to the audio server can't be undone so the full buffer will be played before cmus pauses. On the other hand cmus relies on the audio subsystem for buffering while it's sleeping in file reads, so the buffer size should correspond to the maximum time read(2) could last; 300ms is a pessimistic estimation ensuring cmus works not too bad on slow/busy machines. -- Alexandre
