diff options
author | wm4 <wm4@nowhere> | 2020-08-29 16:27:56 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-08-29 16:27:56 +0200 |
commit | 478d39c57492107ce8d5a33e80d5624db330ceab (patch) | |
tree | 71c4cd38145f5256fdbfd06403fbd8da7a988c14 /common/version.c | |
parent | 3427aa4776b73ce0b9c8996bc4ef38da87fe1557 (diff) | |
download | mpv-478d39c57492107ce8d5a33e80d5624db330ceab.tar.bz2 mpv-478d39c57492107ce8d5a33e80d5624db330ceab.tar.xz |
audio: fix inefficient behavior with ao_alsa, remove period_size field
It is now the AO's responsibility to handle period size alignment. The
ao->period_size alignment field is unused as of the recent audio
refactor commit. Remove it.
It turns out that ao_alsa shows extremely inefficient behavior as a
consequence of the removal of period size aligned writes in the
mentioned refactor commit. This is because it could get into a state
where it repeatedly wrote single samples (as small as 1 sample), and
starved the rest of the player as a consequence. Too bad. Explicitly
align the size in ao_alsa. Other AOs, which need this, should do the
same.
One reason why it broke so badly with ao_alsa was that it retried the
write() even if all reported space could be written. So stop doing that
too. Retry the write only if we somehow wrote less.
I'm not sure about ao_pulse.
Diffstat (limited to 'common/version.c')
0 files changed, 0 insertions, 0 deletions