diff options
author | wm4 <wm4@nowhere> | 2016-08-09 16:35:33 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-08-09 17:09:29 +0200 |
commit | 2ded41d2beff54de26ab1c4d16ab4d0bd14eeba0 (patch) | |
tree | 71a651db16e0cde39096b4cd09c5cab70d48e787 /player | |
parent | 062349ff5b9b062aff581e96f3770e6cbd419491 (diff) | |
download | mpv-2ded41d2beff54de26ab1c4d16ab4d0bd14eeba0.tar.bz2 mpv-2ded41d2beff54de26ab1c4d16ab4d0bd14eeba0.tar.xz |
ao_alsa: handle --audio-stream-silence
push.c does not handle this automatically, and AOs using push.c have to
handle it themselves. Also, ALSA is low-level enough that it needs
explicit support in user code. At least I haven't found any option that
does this.
We still can get away relatively cheaply by abusing underflow-handling
for this. ao_alsa.c already configures ALSA to handle underflows by
playing silence. So we purposely induce an underflow when opening the
device, as well as when pausing or resetting the device.
This introduces minor misbehavior: it doesn't account for the additional
delay the initial silence adds, unless the device has fully played the
fragment of silence when the player starts sending data to it. But
nobody cares.
Diffstat (limited to 'player')
0 files changed, 0 insertions, 0 deletions