Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167672223
D13992.id38228.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D13992.id38228.diff
View Options
Index: multimedia/qt5-multimedia/Makefile
===================================================================
--- multimedia/qt5-multimedia/Makefile
+++ multimedia/qt5-multimedia/Makefile
@@ -2,7 +2,7 @@
PORTNAME= multimedia
DISTVERSION= ${QT5_VERSION}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= multimedia
PKGNAMEPREFIX= qt5-
Index: multimedia/qt5-multimedia/files/patch-src_plugins_alsa_qalsaaudiodeviceinfo.cpp
===================================================================
--- /dev/null
+++ multimedia/qt5-multimedia/files/patch-src_plugins_alsa_qalsaaudiodeviceinfo.cpp
@@ -0,0 +1,70 @@
+Patch from Stephen Hurd. PR208570. Allow ALSA aliases.
+
+- Use more verbose variable names
+- Remove unneeded variables
+- constify deviceName
+- Add #ifdef Q_OS_FREEBSD
+
+ src/plugins/alsa/qalsaaudiodeviceinfo.cpp | 54 ++++++++++++++++++++++++++++++-
+ 1 file changed, 53 insertions(+), 1 deletion(-)
+--- b/src/plugins/alsa/qalsaaudiodeviceinfo.cpp
++++ b/src/plugins/alsa/qalsaaudiodeviceinfo.cpp
+@@ -374,6 +374,58 @@ QList<QByteArray> QAlsaAudioDeviceInfo::availableDevices(QAudio::Mode mode)
+ ++n;
+ }
+ snd_device_name_free_hint(hints);
++
++#ifdef Q_OS_FREEBSD
++ // Now find aliases...
++ snd_config_iterator_t pos, next;
++ snd_config_t *top, *node, *type;
++ snd_pcm_t *pcm;
++ snd_pcm_stream_t streamType;
++ const char *idString;
++ const char **ignoreId;
++ 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:
++ streamType = SND_PCM_STREAM_CAPTURE;
++ break;
++ case QAudio::AudioOutput:
++ streamType = SND_PCM_STREAM_PLAYBACK;
++ break;
++ default:
++ goto bad_mode;
++ }
++ // Find "pcm" nodes...
++ if (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", &type) < 0)
++ continue;
++ snd_config_get_id(node, &idString);
++ for (ignoreId = ignore; *ignoreId; ignoreId++) {
++ if (strcmp(*ignoreId, idString) == 0)
++ break;
++ }
++ if (*ignoreId)
++ continue;
++ // Ensure it's available...
++ if (snd_pcm_open(&pcm, idString, streamType, 0))
++ continue;
++ snd_pcm_close(pcm);
++ const QString deviceName = QLatin1String(idString);
++ devices.append(deviceName.toLocal8Bit().constData());
++ }
++ }
++ }
++bad_mode:
++#endif
+ #else
+ int idx = 0;
+ char* name;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 24, 4:52 PM (38 m, 41 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37192482
Default Alt Text
D13992.id38228.diff (3 KB)
Attached To
Mode
D13992: Allow ALSA aliases in the Qt5 sound devices list. Patch by Stephen Hurd.
Attached
Detach File
Event Timeline
Log In to Comment