shithub: riscv

Download patch

ref: a7a56b9a480c9985587574c5fb06b156a051ae73
parent: 7b6c150f5dbccb3074d93d07e84c3d286d17fd8d
author: cinap_lenrek <cinap_lenrek@localhost>
date: Wed Jul 20 21:24:18 EDT 2011

devaudio: ignore non absolute volume items with range 0

--- a/sys/src/9/port/devaudio.c
+++ b/sys/src/9/port/devaudio.c
@@ -363,6 +363,8 @@
 		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;