audio/pulseaudio: simplify hw.snd.default_unit search

PR:		211684
Submitted by:	lightside <lightside@gmx.com>
MFH:		2016Q4 (r425809 bandwagon)
This commit is contained in:
Jan Beich 2016-11-09 22:06:42 +00:00
parent 8cf2ecce41
commit 4365088e18
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=425812
2 changed files with 3 additions and 6 deletions

View file

@ -6,7 +6,7 @@
PORTNAME= pulseaudio
PORTVERSION= 9.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/

View file

@ -1,6 +1,6 @@
--- src/modules/module-detect.c.orig 2016-05-10 12:28:04 UTC
+++ src/modules/module-detect.c
@@ -160,11 +160,48 @@ static int detect_oss(pa_core *c, int ju
@@ -160,11 +160,45 @@ static int detect_oss(pa_core *c, int ju
continue;
} else if (sscanf(line, "pcm%u: ", &device) == 1) {
@ -16,10 +16,7 @@
+ if (!pa_endswith(line, "default"))
+ continue;
+
+ char *p = strrchr(line, '>');
+
+ if (p)
+ p = strchr(p, '(');
+ const char *p = strrchr(line, '(');
+
+ if (!p)
continue;