diff examples/example-audio/example-audio.c @ 547:c7664b679a95

misc: remove error codes for now
author David Demelier <markand@malikania.fr>
date Mon, 06 Mar 2023 20:03:00 +0100
parents 95792046d3d2
children
line wrap: on
line diff
--- a/examples/example-audio/example-audio.c	Mon Mar 06 20:01:00 2023 +0100
+++ b/examples/example-audio/example-audio.c	Mon Mar 06 20:03:00 2023 +0100
@@ -52,10 +52,8 @@
 static void
 init(void)
 {
-	int err;
-
-	if ((err = mlk_example_init("example-audio")) < 0)
-		mlk_panicf("mlk_example_init: %s", mlk_err_string(err));
+	if (mlk_example_init("example-audio") < 0)
+		mlk_panic();
 
 	sound = &mlk_registry_sounds[MLK_REGISTRY_SOUND_FIRE];
 	music = &mlk_registry_music[MLK_REGISTRY_MUSIC_ROMANCE];
@@ -72,12 +70,10 @@
 {
 	(void)st;
 
-	int err;
-
 	switch (ev->type) {
 	case MLK_EVENT_CLICKDOWN:
-		if ((err = mlk_sound_play(sound)) < 0)
-			mlk_panic(err);
+		if (mlk_sound_play(sound) < 0)
+			mlk_panic();
 		break;
 	case MLK_EVENT_KEYDOWN:
 		switch (ev->key.key) {