diff options
author | Rene Ladan <rene@FreeBSD.org> | 2022-02-20 11:35:15 +0000 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2022-02-20 11:54:22 +0000 |
commit | 38a7a67b581c720d02ecf1f235f6ed51434e937e (patch) | |
tree | 686f2a16d7c997dd0937049cc89b15448f4b2117 /www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc | |
parent | 39da6a867124a65a9b365a2de9363cdd2978bc70 (diff) | |
download | ports-38a7a67b581c720d02ecf1f235f6ed51434e937e.tar.gz ports-38a7a67b581c720d02ecf1f235f6ed51434e937e.zip |
Diffstat (limited to 'www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc')
-rw-r--r-- | www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc b/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc deleted file mode 100644 index 54c380e5f318..000000000000 --- a/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc +++ /dev/null @@ -1,54 +0,0 @@ ---- media/audio/alsa/audio_manager_alsa.cc.orig 2021-04-14 18:41:05 UTC -+++ media/audio/alsa/audio_manager_alsa.cc -@@ -89,7 +89,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType - int card = -1; - - // Loop through the sound cards to get ALSA device hints. -+#if defined(OS_LINUX) - while (!wrapper_->CardNext(&card) && card >= 0) { -+#endif - void** hints = NULL; - int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); - if (!error) { -@@ -101,7 +103,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType - DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: " - << wrapper_->StrError(error); - } -+#if defined(OS_LINUX) - } -+#endif - } - - void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type, -@@ -184,7 +188,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( - // goes through software conversion if needed (e.g. incompatible - // sample rate). - // TODO(joi): Should we prefer "hw" instead? -+#ifdef OS_LINUX - static const char kDeviceTypeDesired[] = "plughw"; -+#else -+ static const char kDeviceTypeDesired[] = "plug"; -+#endif - return strncmp(kDeviceTypeDesired, device_name, - base::size(kDeviceTypeDesired) - 1) == 0; - } -@@ -206,7 +214,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( - // Loop through the sound cards. - // Don't use snd_device_name_hint(-1,..) since there is a access violation - // inside this ALSA API with libasound.so.2.0.0. -+#if defined(OS_LINUX) - while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) { -+#endif - int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); - if (!error) { - for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) { -@@ -230,7 +240,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( - DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: " - << wrapper_->StrError(error); - } -+#if defined(OS_LINUX) - } -+#endif - - return has_device; - } |