mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
WebContent: Don't check for specific audio backends
Rather than conditionalizing creating an audio plugin, just let the audio backend factory return an error on its own. If an audio plugin is not found, we will get a similar error to what is removed here.
This commit is contained in:
committed by
Andreas Kling
parent
c51cd34bfb
commit
33a1e38646
@@ -83,11 +83,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
Web::Platform::AudioCodecPlugin::install_creation_hook([](auto loader) {
|
||||
#if defined(HAVE_QT_MULTIMEDIA)
|
||||
return Ladybird::AudioCodecPluginQt::create(move(loader));
|
||||
#elif defined(AK_OS_MACOS) || defined(HAVE_PULSEAUDIO)
|
||||
return Web::Platform::AudioCodecPluginAgnostic::create(move(loader));
|
||||
#else
|
||||
(void)loader;
|
||||
return Error::from_string_literal("Don't know how to initialize audio in this configuration!");
|
||||
return Web::Platform::AudioCodecPluginAgnostic::create(move(loader));
|
||||
#endif
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user