mixer/pulse: rename `scale` to `scale_volume`
Make it less generic, to avoid clashes.
This commit is contained in:
parent
110e6d026b
commit
d9c3215584
2
NEWS
2
NEWS
|
@ -8,6 +8,8 @@ ver 0.21.5 (not yet released)
|
||||||
- ape: map "Album Artist"
|
- ape: map "Album Artist"
|
||||||
* output
|
* output
|
||||||
- shout: add support for TLS
|
- shout: add support for TLS
|
||||||
|
* mixer
|
||||||
|
- pulse: add "scale_volume" setting
|
||||||
|
|
||||||
ver 0.21.4 (2019/01/04)
|
ver 0.21.4 (2019/01/04)
|
||||||
* database
|
* database
|
||||||
|
|
|
@ -935,7 +935,7 @@ The pulse plugin connects to a `PulseAudio <http://www.freedesktop.org/wiki/Soft
|
||||||
- Sets the host name of the PulseAudio server. By default, :program:`MPD` connects to the local PulseAudio server.
|
- Sets the host name of the PulseAudio server. By default, :program:`MPD` connects to the local PulseAudio server.
|
||||||
* - **sink NAME**
|
* - **sink NAME**
|
||||||
- Specifies the name of the PulseAudio sink :program:`MPD` should play on.
|
- Specifies the name of the PulseAudio sink :program:`MPD` should play on.
|
||||||
* - **scale FACTOR**
|
* - **scale_volume FACTOR**
|
||||||
- Specifies a linear scaling coefficient (ranging from 0.5 to 5.0) to apply when adjusting volume through :program:`MPD`. For example, chosing a factor equal to ``"0.7"`` means that setting the volume to 100 in :program:`MPD` will set the PulseAudio volume to 70%, and a factor equal to ``"3.5"`` means that volume 100 in :program:`MPD` corresponds to a 350% PulseAudio volume.
|
- Specifies a linear scaling coefficient (ranging from 0.5 to 5.0) to apply when adjusting volume through :program:`MPD`. For example, chosing a factor equal to ``"0.7"`` means that setting the volume to 100 in :program:`MPD` will set the PulseAudio volume to 70%, and a factor equal to ``"3.5"`` means that volume 100 in :program:`MPD` corresponds to a 350% PulseAudio volume.
|
||||||
|
|
||||||
recorder
|
recorder
|
||||||
|
|
|
@ -174,7 +174,7 @@ parse_volume_scale_factor(const char *value) {
|
||||||
float factor = ParseFloat(value, &endptr);
|
float factor = ParseFloat(value, &endptr);
|
||||||
|
|
||||||
if (*endptr != '\0' || factor < 0.5 || factor > 5.0)
|
if (*endptr != '\0' || factor < 0.5 || factor > 5.0)
|
||||||
throw FormatRuntimeError("scale \"%s\" is not a number in the "
|
throw FormatRuntimeError("\"%s\" is not a number in the "
|
||||||
"range 0.5 to 5.0",
|
"range 0.5 to 5.0",
|
||||||
value);
|
value);
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ pulse_mixer_init(gcc_unused EventLoop &event_loop, AudioOutput &ao,
|
||||||
const ConfigBlock &block)
|
const ConfigBlock &block)
|
||||||
{
|
{
|
||||||
PulseOutput &po = (PulseOutput &)ao;
|
PulseOutput &po = (PulseOutput &)ao;
|
||||||
float scale = parse_volume_scale_factor(block.GetBlockValue("scale"));
|
float scale = parse_volume_scale_factor(block.GetBlockValue("scale_volume"));
|
||||||
PulseMixer *pm = new PulseMixer(po, listener, scale);
|
PulseMixer *pm = new PulseMixer(po, listener, scale);
|
||||||
|
|
||||||
pulse_output_set_mixer(po, *pm);
|
pulse_output_set_mixer(po, *pm);
|
||||||
|
|
Loading…
Reference in New Issue