sndioctl output.mute: no such control

So I have a script that I used on OpenBSD with dwmblocks in order to display the volume in the DWM bar. It used sndioctl to check for mute and change an icon based on this.
Bash:
#!/bin/sh

set -A _vol "?" "?" "?"

_v=$(sndioctl -n output.level | awk '{ print int($0*100) '})
  [[ $(sndioctl -n output.mute) -eq 1 ]] \
    && echo -n "? " \
    || echo -n "${_vol[$(($_v*3/101))]} "
  echo -n "$_v%"
But for some reason despite showing that it should be there in the man page it is not there. So just want to know why output.mute doesn't work when output.level does.

As a side note the mute button on the keyboard works as it should. However, volume up and down did not. I added a command for those keys in DWM with mixer. Unfortunately when the mixer volume level gets down to around 50% it is basically no sound. Just wondering if there is a better way to use the built in media keys. Thanks!
 
I have rewritten the script using mixer(). It works good. However, mixer doesn't seem to work great. Once it gets down to around 40% you really have to hold it up to your ear in order to hear anything. So strange.
 
Back
Top