# HG changeset patch # User sam # Date 1715157796 -25200 # Node ID 87da8f6fe70f10745bc2130858c84e830fefd2d5 # Parent 967b8fa81b6b8d74af6ed2f3f2e3f48308791052 add: better assert message diff -r 967b8fa81b6b -r 87da8f6fe70f semicongine/audio.nim --- a/semicongine/audio.nim Sat Apr 27 22:04:30 2024 +0700 +++ b/semicongine/audio.nim Wed May 08 15:43:16 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: