1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-13 10:26:00 +00:00
mpv/audio/out
wm4 478d39c574 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.
2020-08-29 16:27:56 +02:00
..
ao_alsa.c audio: fix inefficient behavior with ao_alsa, remove period_size field 2020-08-29 16:27:56 +02:00
ao_audiotrack.c audio: redo internal AO API 2020-06-01 01:08:16 +02:00
ao_audiounit.m audio: remove unused ring.h includes 2020-08-27 11:55:20 +02:00
ao_coreaudio_chmap.c
ao_coreaudio_chmap.h
ao_coreaudio_exclusive.c audio: redo internal AO API 2020-06-01 01:08:16 +02:00
ao_coreaudio_properties.c
ao_coreaudio_properties.h
ao_coreaudio_utils.c
ao_coreaudio_utils.h
ao_coreaudio.c audio: remove unused ring.h includes 2020-08-27 11:55:20 +02:00
ao_jack.c audio: redo internal AO API 2020-06-01 01:08:16 +02:00
ao_lavc.c audio: fix inefficient behavior with ao_alsa, remove period_size field 2020-08-29 16:27:56 +02:00
ao_null.c audio: fix inefficient behavior with ao_alsa, remove period_size field 2020-08-29 16:27:56 +02:00
ao_openal.c audio: fix inefficient behavior with ao_alsa, remove period_size field 2020-08-29 16:27:56 +02:00
ao_opensles.c audio: redo internal AO API 2020-06-01 01:08:16 +02:00
ao_pcm.c audio: redo internal AO API 2020-06-01 01:08:16 +02:00
ao_pulse.c ao/pulse: create the stream corked 2020-08-26 16:14:29 +02:00
ao_sdl.c audio: redo internal AO API 2020-06-01 01:08:16 +02:00
ao_wasapi_changenotify.c
ao_wasapi_utils.c ao_wasapi: try mix format except for chmap 2020-03-19 20:39:44 +02:00
ao_wasapi.c audio: redo internal AO API 2020-06-01 01:08:16 +02:00
ao_wasapi.h
ao.c audio: fix inefficient behavior with ao_alsa, remove period_size field 2020-08-29 16:27:56 +02:00
ao.h audio: refactor how data is passed to AO 2020-08-29 13:12:32 +02:00
buffer.c audio: fix inefficient behavior with ao_alsa, remove period_size field 2020-08-29 16:27:56 +02:00
internal.h audio: fix inefficient behavior with ao_alsa, remove period_size field 2020-08-29 16:27:56 +02:00