pulseaudio: add target option to control source (microphone) volume
The pulseaudio/slider module had partial support for a "target" config
option but changeVolume() in the audio backend was hardcoded to only
modify sink volume. This adds full source volume control:
- Add AudioTarget enum (Sink/Source) to audio_backend
- Extend changeVolume() overloads with AudioTarget parameter
- Store and use pa_cvolume for source (with mono channel default)
- Add sourceVolumeModifyCb for source volume change confirmation
- Add "target" config option to the pulseaudio module for scroll control
- Document "target" in both pulseaudio and pulseaudio-slider man pages
Usage:
"pulseaudio/slider#in": { "target": "source" }
"pulseaudio#in": { "target": "source" }
This commit is contained in:
@@ -32,16 +32,28 @@ The volume can be controlled by dragging the slider across the bar or clicking o
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
*target*: ++
|
||||
typeof: string ++
|
||||
default: sink ++
|
||||
The audio target to control. Can be either `sink` (output/speakers) or `source` (input/microphone).
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
```
|
||||
"modules-right": [
|
||||
"pulseaudio/slider",
|
||||
"pulseaudio/slider#out",
|
||||
"pulseaudio/slider#in",
|
||||
],
|
||||
"pulseaudio/slider": {
|
||||
"pulseaudio/slider#out": {
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"orientation": "horizontal"
|
||||
},
|
||||
"pulseaudio/slider#in": {
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"orientation": "horizontal",
|
||||
"target": "source"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user