FreeBSD Bugzilla – Attachment 169043 Details for
Bug 208570
multimedia/qt5-multimedia: ALSA aliases not supported
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch adding ALSA alises to the available devices.
qt5-multimedia-aliases.patch (text/plain), 1.97 KB, created by
Stephen Hurd
on 2016-04-06 18:06:12 UTC
(
hide
)
Description:
Patch adding ALSA alises to the available devices.
Filename:
MIME Type:
Creator:
Stephen Hurd
Created:
2016-04-06 18:06:12 UTC
Size:
1.97 KB
patch
obsolete
>--- /home/admin/fbsd/ports/head/multimedia/qt5-multimedia/work/qtmultimedia-opensource-src-5.5.1/src/plugins/alsa/qalsaaudiodeviceinfo.cpp 2016-04-06 02:08:11.501410971 -0700 >+++ src/plugins/alsa/qalsaaudiodeviceinfo.cpp 2016-04-06 11:03:05.580199996 -0700 >@@ -374,6 +374,57 @@ > ++n; > } > snd_device_name_free_hint(hints); >+ >+ // Now find aliases... >+ int res; >+ snd_config_iterator_t pos, next; >+ snd_config_t *top, *node, *tp; >+ snd_pcm_t *pcm; >+ snd_pcm_stream_t st; >+ const char *tps, *ids, **ig; >+ static const char *ignore[] = {"hw", "plughw", "plug", "dsnoop", "tee", >+ "file", "null", "shm", "cards", "rate_convert", NULL}; >+ >+ // Populate snd_config... >+ if (snd_config == NULL) >+ snd_config_update(); >+ if (snd_config != NULL) { >+ switch (mode) { >+ case QAudio::AudioInput: >+ st = SND_PCM_STREAM_CAPTURE; >+ break; >+ case QAudio::AudioOutput: >+ st = SND_PCM_STREAM_PLAYBACK; >+ break; >+ default: >+ goto bad_mode; >+ } >+ // Find "pcm" nodes... >+ if ((res = snd_config_search(snd_config, "pcm", &top)) >= 0) { >+ for (pos = snd_config_iterator_first(top), next = snd_config_iterator_next(pos); >+ pos != snd_config_iterator_end(top); >+ pos = next, next = snd_config_iterator_next(pos)) { >+ node = snd_config_iterator_entry(pos); >+ if (snd_config_search(node, "type", &tp) < 0) >+ continue; >+ snd_config_get_string(tp, &tps); >+ snd_config_get_id(node, &ids); >+ for (ig = ignore; *ig; ig++) { >+ if (strcmp(*ig, ids) == 0) >+ break; >+ } >+ if (*ig) >+ continue; >+ // Ensure it's available... >+ if (snd_pcm_open(&pcm, ids, st, 0)) >+ continue; >+ snd_pcm_close(pcm); >+ QString deviceName = QLatin1String(ids); >+ devices.append(deviceName.toLocal8Bit().constData()); >+ } >+ } >+ } >+bad_mode: > #else > int idx = 0; > char* name; >@@ -384,7 +435,7 @@ > } > #endif > >- if (devices.size() > 0) >+ if (devices.size() > 0 && !devices.contains("default")) > devices.append("default"); > > return devices;
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 208570
:
169029
|
169043
|
171369
|
171561