changeset 1020:355ef428b5f4

merge
author sam <sam@basx.dev>
date Wed, 08 May 2024 15:46:47 +0700
parents 87da8f6fe70f (diff) c066b9a63368 (current diff)
children 73b572f82a1f
files
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/semicongine/audio.nim	Mon Apr 29 02:37:42 2024 -0700
+++ b/semicongine/audio.nim	Wed May 08 15:46:47 2024 +0700
@@ -1,4 +1,5 @@
 import std/monotimes
+import std/strformat
 import std/times
 import std/tables
 import std/locks
@@ -77,7 +78,7 @@
     mixer.tracks[name] = Track(level: level)
 
 proc play*(mixer: var Mixer, soundName: string, track = "", stopOtherSounds = false, loop = false, levelLeft, levelRight: Level): uint64 =
-  assert track in mixer.tracks
+  assert track in mixer.tracks, &"Track '{track}' does not exists"
   assert soundName in mixer.sounds, soundName & " not loaded"
   mixer.lock.withLock():
     if stopOtherSounds: