mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
Utilities: Make aplay respect loader errors
aplay would previously just retry a couple of times when the loader encountered an error, even though there is a standard mechanism for loaders to report errors. Now, aplay outputs these errors to the user and exits.
This commit is contained in:
parent
195d6d006f
commit
a9cbdcbcd0
Notes:
sideshowbarker
2024-07-18 05:31:27 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: a9cbdcbcd0
Pull-request: https://github.com/SerenityOS/serenity/pull/9464
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/awesomekling
1 changed files with 4 additions and 0 deletions
|
@ -42,6 +42,10 @@ int main(int argc, char** argv)
|
|||
out("{}/{}", loader->loaded_samples(), loader->total_samples());
|
||||
fflush(stdout);
|
||||
audio_client->enqueue(*samples);
|
||||
} else if (loader->has_error()) {
|
||||
outln();
|
||||
outln("Error: {}", loader->error_string());
|
||||
break;
|
||||
} else if (should_loop) {
|
||||
loader->reset();
|
||||
} else if (audio_client->get_remaining_samples()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue