1
Fork 0
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:
kleines Filmröllchen 2021-08-17 00:52:45 +02:00 committed by Andreas Kling
parent 195d6d006f
commit a9cbdcbcd0

View file

@ -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()) {