History

devaudio volume: expose pcm, skip unavailable handles

Sigrid Solveig Haflínudóttir committed 5 years ago

Commit 67284dd1 parent 2d158571 file · +6 −0Browse files

Unified · Split

kern/devaudio.c+6−0
@@ -56,6 +56,8 @@ static struct · 55 unmodified lines
5656 "bass", Fout, 50, 50,
5757
5858 "speed", Fin|Fout|Fmono, Speed, Speed,
59+
60+ "pcm", Fout, 50, 50,
5961 0
6062 };
6163
@@ -192,7 +194,11 @@ audioread(Chan *c, void *v, long n, vlong off) · 130 unmodified lines
192194 j = 0;
193195 buf[0] = 0;
194196 for(m=0; volumes[m].name; m++){
197+ lov = -1;
198+ rov = -1;
195199 audiodevgetvol(m, &lov, &rov);
200+ if(lov < 0 && rov < 0)
201+ continue;
196202 liv = lov;
197203 riv = rov;
198204 j += snprint(buf+j, sizeof(buf)-j, "%s", volumes[m].name);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t