• Max Kellermann's avatar
    alsa: better period_time default value for high sample rates · 554a34fb
    Max Kellermann authored
    The default values for buffer_time and period_time were both capped by
    the hardware limits on practically all chips.  The result was a
    period_time which was half as big as the buffer_time.  On some chips,
    this led to lots of underruns when using a high sample rate (192 kHz),
    because MPD had very little time to send new samples to ALSA.
    
    A period time which is one fourth of the buffer time turned out to be
    much better.  If no period_time is configured, see how much
    buffer_time the hardware accepts, and try to configure one fourth of
    it as period_time, instead of hard-coding the default period_time
    value.
    
    This is yet another attempt to provide a solution which is valid for
    all sound chips.  Using the SND_PCM_NONBLOCK flag also seemed to solve
    the underruns, but put a lot more CPU load to MPD.
    554a34fb
Name
Last commit
Last update
doc Loading commit data...
m4 Loading commit data...
scripts Loading commit data...
src Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
TODO Loading commit data...
UPGRADING Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
valgrind.suppressions Loading commit data...