diff --git a/korge/src/korlibs/korge/resources/ResourcesExt.kt b/korge/src/korlibs/korge/resources/ResourcesExt.kt index 104dcbcd48..e90f7ddfe6 100644 --- a/korge/src/korlibs/korge/resources/ResourcesExt.kt +++ b/korge/src/korlibs/korge/resources/ResourcesExt.kt @@ -1,5 +1,7 @@ package korlibs.korge.resources +import korlibs.audio.format.* +import korlibs.audio.sound.* import korlibs.image.bitmap.* import korlibs.image.font.readBitmapFont import korlibs.image.font.readFont @@ -17,3 +19,5 @@ fun resourceBitmap(@ResourcePath path: String, mipmaps: Boolean = true, cache: R fun resourceFont(@ResourcePath path: String, mipmaps: Boolean = true, cache: ResourceCache = ResourceCache.LOCAL) = resource(cache) { root[path].readFont(mipmaps = mipmaps) } fun resourceBitmapFont(@ResourcePath path: String, mipmaps: Boolean = true, cache: ResourceCache = ResourceCache.LOCAL) = resource(cache) { root[path].readBitmapFont(mipmaps = mipmaps) } fun resourceTtfFont(@ResourcePath path: String, preload: Boolean = false, cache: ResourceCache = ResourceCache.LOCAL) = resource(cache) { root[path].readTtfFont() } +fun resourceSound(@ResourcePath path: String, props: AudioDecodingProps = AudioDecodingProps.DEFAULT, cache: ResourceCache = ResourceCache.LOCAL) = resource(cache) { root[path].readSound(props) } +fun resourceMusic(@ResourcePath path: String, props: AudioDecodingProps = AudioDecodingProps.DEFAULT, cache: ResourceCache = ResourceCache.LOCAL) = resource(cache) { root[path].readMusic(props) }