LibMedia: Remove LibMedia::Audio::LoaderError

This class was used as little more than a wrapper around `Error`,
so we might as well use `Error` in the first place.
This commit is contained in:
Jonne Ransijn 2024-11-21 20:06:00 +01:00 committed by Jelle Raaijmakers
commit 4d38e04e48
Notes: github-actions[bot] 2024-11-22 11:44:49 +00:00
7 changed files with 52 additions and 149 deletions

View file

@ -29,7 +29,7 @@ ErrorOr<int> serenity_main(Main::Arguments args)
auto maybe_loader = Audio::Loader::create(path);
if (maybe_loader.is_error()) {
warnln("Failed to load audio file: {}", maybe_loader.error().description);
warnln("Failed to load audio file: {}", maybe_loader.error());
return 1;
}
auto loader = maybe_loader.release_value();
@ -50,7 +50,7 @@ ErrorOr<int> serenity_main(Main::Arguments args)
if (samples.value().size() == 0)
break;
} else {
warnln("Error while loading audio: {}", samples.error().description);
warnln("Error while loading audio: {}", samples.error());
return 1;
}
} else