Only allow string paths when loading assets

This commit is contained in:
oakes
2014-09-26 23:26:38 -04:00
parent 647fa9f7a2
commit f10639ed99
4 changed files with 12 additions and 25 deletions

View File

@@ -148,11 +148,9 @@
(.removeProcessor multi p)))
(defn sound*
[path]
[^String path]
(or (u/load-asset path Sound)
(audio! :new-sound (if (string? path)
(files! :internal path)
path))))
(audio! :new-sound (files! :internal path))))
(defmacro sound
"Returns a [Sound](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/audio/Sound.html).