mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +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
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