A
A
Alexey Tamarov2019-04-30 17:30:19
linux
Alexey Tamarov, 2019-04-30 17:30:19

How to get the actual volume level?

Good afternoon, how can I get the actual volume level in debian via bash?
For windows, this is a green slider f95a784c.png(which has a value of 0-100, depending on whether audio is playing on the system or not).
Is there something similar for debian?
Current sound software amixer

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2019-04-30
@sim3x

amixer -c 1 -M -D pulse get Master | grep -m 1 -o -E '+%'

https://www.google.com.ua/search?q=amixer+show+in+...

A
Alexey Kharchenko, 2019-11-04
@AVX

From the same amixer and get:

[[email protected] ~]$ amixer controls
numid=4,iface=MIXER,name='Master Playback Switch'
numid=3,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'
[[email protected] ~]$ amixer cget numid=3,iface=MIXER,name='Master Playback Volume'
numid=3,iface=MIXER,name='Master Playback Volume'
  ; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1
  : values=39320,39320
[[email protected] ~]$

values=39320 in the second line is what we are looking for. I checked it myself - it shows what is really there. Although pulseaudio, kde and the "Volume" widget are used in the system. I haven't thought about amixer for many years.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question