-
Notifications
You must be signed in to change notification settings - Fork 255
Fixed ALSA capture device monitoring. #328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the new macros can be moved in print_volume.c
since they are only used there
include/i3status.h
Outdated
|
||
#define ALSA_MUTE_SWITCH(channel) \ | ||
if ((err = snd_mixer_selem_get_##channel##_switch(elem, 0, &pbval)) < 0) \ | ||
fprintf(stderr, "i3status: ALSA: ##channel##_switch: %s\n", snd_strerror(err)); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fprintf(stderr, "i3status: ALSA: ##channel##_switch: %s\n", snd_strerror(err)); \ | |
fprintf(stderr, "i3status: ALSA: " #channel "_switch: %s\n", snd_strerror(err)); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, pls have a look.
When using ALSA, the "Capture" mixer doesn't have the playback channel, instead "capture"-related methods should be used to get information about the current volume / state of the mixer.
Any chance to get it merged into upstream, @Airblader ? |
I wasn't aware you had made the changes since there's no notifications for pushes. Please always make sure to drop a comment so we get notified. :-) Thanks for your contribution! |
@jdevelop: Could you give an example of a working i3status configuration that can make use of this? I'm running Pulse and would like to show whether my microphone is muted—is that possible using this change? Or is additional pulse support necessary? |
|
When using ALSA, the "Capture" mixer doesn't have the playback channel,
instead "capture"-related methods should be used to get information
about the current volume / state of the mixer.
Fixes #241