summaryrefslogtreecommitdiff
path: root/src/print_volume.c
AgeCommit message (Collapse)Author
2020-03-11print_volume: Native NetBSD audio supportnia
Avoid using the OSS emulation layer to fetch the master volume, and instead share the audioio code with OpenBSD. Avoid a failed read on the master control's mute enum if it can't be found, because sometimes there isn't one.
2019-07-29Improve NetBSD port. (#361)Thomas Klausner
Detect and link against ossaudio. Comment out unused code and functions.
2019-07-29make pulseaudio an optional dependency, follow best practicesMichael Stapelberg
For my thoughts about optional dependencies, see https://michael.stapelberg.ch/posts/2019-05-23-optional-dependencies/ This commit follows the best practices outlined in that article: 1. The travis config was modified to verify both code paths build and link/don’t link against pulseaudio. 2. If pulseaudio is missing, the build fails until packagers explicitly pass a --disable flag. In practice, I think the only situation when this flag should be set is in source-based linux distributions where users can express package-level compilation preferences (e.g. Gentoo USE flags). 3. The --version output now reflects the status of the optional dependency. fixes #359
2019-01-23Switch to autotools (#316)Michael Stapelberg
2019-01-23Implement %devicename specifier for volume module (#325)Denton Liu
This commit implements the %devicename specifier for the volume module for both PulseAudio and ALSA. This way, i3status will be able to display the specific device that corresponds to the volume indicator. Note that this is not implemented for the OSS API but is left in a state where someone can pick it up for the future.
2019-01-03Fixed ALSA capture device monitoring.Eugene Dzhurinsky
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.
2018-10-11Provide a more natural volume percentage with ALSA.arcnmx
The rationale of the code is explained in the header: http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=alsamixer/volume_mapping.c;h=1c0d7c45e6686239464e1b0bbc8983ea57f3914f;hb=HEAD > The mapping is designed so that the position in the interval is > proportional to the volume as a human ear would perceive it (i.e., the > position is the cubic root of the linear sample multiplication > factor). and the commit message: http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=34bb514b5fd1d6f91ba9a7b3a70b0ea0c6014250 > use a mapping where the bar height is proportional to the audible > volume, i.e., where the amplitude is the cube of the bar height. and further explanation can be found in the pull request: https://github.com/i3/i3status/pull/268#pullrequestreview-147429763
2018-07-14Do not use pulseaudio for DragonFly BSDAntonio Huete Jimenez
2018-07-13able to print percentageFelix Buehler
its now possible to have percentage before and after a variable. except for the date. But percentage with dates does not make much sense to me, so i skipped it.
2018-06-20Make sure the arguments passed to printf/die(...) match the formatOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2018-02-13OpenBSD: fix volume display on some hardwareCarlin Bingham
On some hardware the AUDIO_MIXER_READ ioctl requires the current number of channels to be set, and the mute device found needs to be checked if it belongs to the master output device.
2016-09-14pulse device may be specified by name (#126) (#162)Watcom
2015-10-04Added support for lemonbarBrendan Van Hook
2015-08-01Use SndIO for volume module on OpenBSDDmitrij D. Czarkoff
* add audio(4) code by Robert Nagy * disable PulseAudio While at OpenBSD support, add "-pthread" to LIBS.
2015-04-19PulseAudio muted volume support (fixes #27)Watcom Hecht
2015-04-03PulseAudio support for volume inputWatcom Hecht
2015-03-29refactoring to avoid code duplicationWatcom Hecht
2015-03-25print_volume: don’t return, complete the buffer firstBaptiste Daroussin
Follow the changed done for Linux on f0cd726b
2015-03-16clang-format-3.5 -i **/*.[ch], update modelineMichael Stapelberg
From here on, we’ll use clang-format to automatically format the source. This has worked well in i3, so we are introducing it for i3status.
2014-08-26Bugfix: fix wrong color tags with xmobarMichael Stapelberg
fixes #1353
2013-11-18Added different format string for volume in case it is muted.Gereon Kremer
If the volume is muted, the volume level would simply be displayed as zero and the color changed to color_degraded. This patch lets the user define a custom format string for when the volume is muted. The default value is "♪: 0%" ("♪: %volume" being the usual format).
2013-05-19print_volume(linux): Open a new mixer every time.oblique
This fix the following bug: If you switch your sound card on-the-fly, print_volume continued to use the old sound card.
2013-03-19print_volume: don’t return, complete the buffer firstMichael Stapelberg
Otherwise, i3bar will display “SPEC VIOLATION” because full_text is missing in the block.
2013-03-19Support mixer_idx with OSSBaptiste Daroussin
make mixer_idx load the default mixer
2013-03-19Show degraded colors in case volume is muted with OSSBaptiste Daroussin
2013-01-05changing volume color from bad to degraded if mutedGereon Kremer
2012-11-15DragonFlyBSD support addedScott Tincman
2012-10-03Bugfix: Move the pbval definition outside the ifdef (Thanks XTaran)Michael Stapelberg
This fixes compilation on !linux
2012-09-05turn volume into red if mutedSimon Elsbrock
fixes #743
2012-05-09Error handling: Never output null as full_text (JSON), prefix messages with ↵Michael Stapelberg
i3status (Thanks Artemis) The former made i3bar crash, the latter is helpful for debugging.
2012-04-29Print the volume on OpenBSD too. Add missing library to Makefile accordingly.Jasper Lievisse Adriaanse
2012-04-08add yajl compat codeMichael Stapelberg
2012-03-25Properly output JSON with libyajlMichael Stapelberg
2012-02-16Implement the i3bar JSON protocolMichael Stapelberg
This hardcodes all the JSON parts. Strings are not properly escaped currently. The best/easiest way to fix this is by actually using libyajl.
2011-07-24Add simple volume support on FreeBSDBaptiste Daroussin
2011-07-21Fix FTBFS on kFreeBSDAxel Beckert
2010-07-20Implement ALSA volume supportMichael Stapelberg