FreeBSD Bugzilla – Attachment 212878 Details for
Bug 245156
audio/pulseaudio: parse /dev/sndstat correctly to get device name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch (since 516738 revision, v2)
pulseaudio_v2.diff (text/plain), 2.27 KB, created by
lightside
on 2020-03-31 00:41:26 UTC
(
hide
)
Description:
Proposed patch (since 516738 revision, v2)
Filename:
MIME Type:
Creator:
lightside
Created:
2020-03-31 00:41:26 UTC
Size:
2.27 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- 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/ > >Index: files/patch-src_modules_oss_oss-util.c >=================================================================== >--- 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,50 @@ > [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,26 +373,28 @@ int pa_oss_get_hw_description(const char >+ line[strcspn(line, "\r\n")] = 0; >+ >+ if (!b) { >+- b = pa_streq(line, "Audio devices:"); >++ b = pa_streq(line, "Installed devices:"); >+ continue; >+ } >+ >+ if (line[0] == 0) >+ break; >+ >+- if (sscanf(line, "%i: ", &device) != 1) >++ if (sscanf(line, "%*[a-z]%i: ", &device) != 1) >+ continue; >+ >+ if (device == n) { >+- char *k = strchr(line, ':'); >+- pa_assert(k); >+- k++; >+- k += strspn(k, " "); >++ const char *k = strrchr(line, '>'); >+ >+- if (pa_endswith(k, " (DUPLEX)")) >+- k[strlen(k)-9] = 0; >++ if (!k) >++ break; >+ >+- pa_strlcpy(name, k, l); >++ const size_t len = strlen(line) - strlen(k) + 1; >++ char desc[len + 1]; >++ desc[len] = '\0'; >++ strncpy(desc, line, len); >++ >++ pa_snprintf(name, l, "%s", desc); >+ r = 0; >+ break; >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 245156
:
212817
|
212838
|
212854
|
212855
|
212875
|
212876
|
212877
|
212878
|
213004
|
213005
|
213006
|
213025
|
213026
|
213050
|
213051
|
213052
|
228663
|
228708