devaudio: ignore non absolute volume items with range 0

This commit is contained in:
cinap_lenrek 2011-07-21 01:24:18 +02:00
parent 7b6c150f5d
commit a7a56b9a48

View file

@ -363,6 +363,8 @@ genaudiovolread(Audio *adev, void *a, long n, vlong,
if(vol[i].type == Absolute)
p += snprint(p, e - p, "%s %d\n", vol[i].name, v[0]);
else {
if(vol[i].range == 0)
continue;
for(j=0; j<2; j++){
if(v[j] < 0)
v[j] = 0;