# HG changeset patch # User sam # Date 1715158007 -25200 # Node ID 355ef428b5f4ecc000c8398f2b60bae65badf760 # Parent 87da8f6fe70f10745bc2130858c84e830fefd2d5# Parent c066b9a633683a17cc9c9a8dbed8fc878b8ef431 merge diff -r c066b9a63368 -r 355ef428b5f4 semicongine/audio.nim --- 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: