forked from external/yambar
module/alsa: add support for capture devices
This mostly comes down to tracking whether each channel is a playback, or capture channel, and using the appropriate APIs when dealing with it. Some cleanup related to this: * Add a channel struct, for per-channel data. Previously, our channel list was just a list of ALSA channel IDs. * We now store current volume per-channel (but volume min/max is per-device) * Muted state is stored per-channel * Track both the device’s playback and capture volume ranges, as well as whether the device *has* playback or capture volume. * Get the playback/capture volume ranges once, during init, instead of at each update. * Use struct pointers for the volume/muted channels. This way we don’t have to iterate all channels and to string comparisons on the name each time we update our state.
This commit is contained in:
parent
7c7c4e7ce9
commit
d1c7647b03
2 changed files with 195 additions and 90 deletions
|
@ -29,6 +29,7 @@
|
|||
channels to use as source for the volume level and muted state.
|
||||
* foreign-toplevel: Wayland module that provides information about
|
||||
currently opened windows.
|
||||
* alsa: support for capture devices.
|
||||
|
||||
|
||||
### Changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue