chiark / gitweb /
disobedience, playrtp: Have `playrtp' handle volume control.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 20 Jul 2018 02:06:56 +0000 (03:06 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 20 Jul 2018 11:30:27 +0000 (12:30 +0100)
commitaf21fb6be8e226ce86b47ed923ee124e739ca48c
tree0c284a1cf86856456c9f5e4e9ea6fe931dceca9d
parented8e4373ca22966011827552d0cb7dff531539cd
disobedience, playrtp: Have `playrtp' handle volume control.

If the server is playing the audio directly, then it handles the volume
control too, as before.

If the server's transmitting using RTP, DisObedience /used/ to try to
twiddle the volume itself.  Instead, arrange for it to request volume
adjustment of the running `disorder-playrtp' instance via its socket
interface.

This has two advantages.

  * Firstly, `disorder-playrtp' actually knows which audio API it's
    using and therefore which method for fiddling with the volume will
    work best.  Indeed, DisObedience doesn't even have any configuration
    for selecting audio APIs, so it's only ever right by coincidence.
    On the other hand, `disorder-playrtp' has all of the necessary
    machinery.

  * Secondly, PulseAudio in particular has independent volume controls
    per input.  DisObedience has no hope of guessing which of these is
    the right one for `disorder-playrtp' without help, and it's cleaner
    just to give the whole job to `disorder-playrtp'.
clients/playrtp.c
disobedience/control.c
disobedience/disobedience.c
disobedience/disobedience.h
disobedience/rtp.c
doc/disorder-playrtp.1.in