aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc
diff options
context:
space:
mode:
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.cc20
1 files changed, 10 insertions, 10 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
index dda7610a87cf..f0e387dd9df2 100644
--- a/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc
+++ b/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc
@@ -1,6 +1,6 @@
---- media/audio/alsa/audio_manager_alsa.cc.orig 2025-05-28 14:55:43 UTC
+--- media/audio/alsa/audio_manager_alsa.cc.orig 2025-09-06 10:01:20 UTC
+++ media/audio/alsa/audio_manager_alsa.cc
-@@ -106,7 +106,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType
+@@ -103,7 +103,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType
int card = -1;
// Loop through the physical sound cards to get ALSA device hints.
@@ -10,7 +10,7 @@
void** hints = nullptr;
int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
if (!error) {
-@@ -118,7 +120,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType
+@@ -115,7 +117,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType
DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: "
<< wrapper_->StrError(error);
}
@@ -20,19 +20,19 @@
}
void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type,
-@@ -202,7 +206,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable(
+@@ -199,7 +203,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable(AudioMana
// goes through software conversion if needed (e.g. incompatible
// sample rate).
// TODO(joi): Should we prefer "hw" instead?
+#if BUILDFLAG(IS_BSD)
-+ static const char kDeviceTypeDesired[] = "plug";
++ static constexpr std::string_view kDeviceTypeDesired = "plug";
+#else
- static const char kDeviceTypeDesired[] = "plughw";
+ static constexpr std::string_view kDeviceTypeDesired = "plughw";
+#endif
- return strncmp(kDeviceTypeDesired, device_name,
- std::size(kDeviceTypeDesired) - 1) == 0;
+ return device_name.starts_with(kDeviceTypeDesired);
}
-@@ -254,7 +262,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice(
+
+@@ -250,7 +258,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice(
// Loop through the sound cards.
// Don't use snd_device_name_hint(-1,..) since there is an access violation
// inside this ALSA API with libasound.so.2.0.0.
@@ -41,7 +41,7 @@
+#endif
int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
if (!error) {
- for (void** hint_iter = hints; *hint_iter != nullptr; hint_iter++) {
+ const std::string_view unwanted_type =
@@ -279,7 +289,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice(
DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: "
<< wrapper_->StrError(error);