--- Makefile (revision 516738) +++ Makefile (working copy) @@ -6,6 +6,7 @@ PORTNAME= pulseaudio PORTVERSION= 13.0 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/ --- files/patch-src_modules_oss_oss-util.c (revision 516738) +++ files/patch-src_modules_oss_oss-util.c (working copy) @@ -1,7 +1,7 @@ Support 24bit audio see Comment 6 of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198567 ---- src/modules/oss/oss-util.c.orig 2015-09-10 04:51:41 UTC +--- src/modules/oss/oss-util.c.orig 2018-07-13 19:06:14 UTC +++ src/modules/oss/oss-util.c @@ -39,6 +39,22 @@ @@ -37,3 +37,54 @@ [PA_SAMPLE_S24_32LE] = AFMT_QUERY, /* not supported */ [PA_SAMPLE_S24_32BE] = AFMT_QUERY, /* not supported */ }; +@@ -348,7 +364,7 @@ int pa_oss_get_hw_description(const char + } + + while (!feof(f)) { +- char line[64]; ++ char line[1024]; + int device; + + if (!fgets(line, sizeof(line), f)) +@@ -357,14 +373,22 @@ int pa_oss_get_hw_description(const char + line[strcspn(line, "\r\n")] = 0; + + if (!b) { ++#ifdef __FreeBSD__ ++ b = pa_streq(line, "Installed devices:"); ++#else + b = pa_streq(line, "Audio devices:"); ++#endif + continue; + } + + if (line[0] == 0) + break; + ++#ifdef __FreeBSD__ ++ if (sscanf(line, "pcm%i: ", &device) != 1) ++#else + if (sscanf(line, "%i: ", &device) != 1) ++#endif + continue; + + if (device == n) { +@@ -376,7 +400,17 @@ int pa_oss_get_hw_description(const char + if (pa_endswith(k, " (DUPLEX)")) + k[strlen(k)-9] = 0; + +- pa_strlcpy(name, k, l); ++ if (k[0] == '<') { ++ const char *e = strrchr(k, '>'); ++ ++ if (e) { ++ const size_t q = strlen(k) - strlen(e); ++ k[q] = 0; ++ ++k; ++ } ++ } ++ // Include the number to disambiguate devices with the same name ++ pa_snprintf(name, l, "%d: %s", device, k); + r = 0; + break; + }