Skip to content

Commit

Permalink
WebContent: Don't check for specific audio backends
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
trflynn89 authored and awesomekling committed Dec 25, 2024
1 parent c51cd34 commit 33a1e38
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Services/WebContent/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

Expand Down

0 comments on commit 33a1e38

Please sign in to comment.