mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 02:54:04 +09:00
Former-commit-id: f91181caee4dabf4cb2e51d8077441c6b0f83757 Former-commit-id: 8b450303698c5c85dea9145a056b290b95a6a7b0
35 lines
1.3 KiB
Kotlin
35 lines
1.3 KiB
Kotlin
package net.torvald.terrarum.audio
|
|
|
|
import org.newdawn.slick.openal.Audio
|
|
import org.newdawn.slick.openal.AudioLoader
|
|
import java.io.File
|
|
import java.io.FileInputStream
|
|
import java.util.*
|
|
|
|
/**
|
|
* Created by minjaesong on 16-07-08.
|
|
*/
|
|
object AudioResourceLibrary {
|
|
|
|
// will play as music
|
|
val ambientsForest = ArrayList<Audio>()
|
|
val ambientsMeadow = ArrayList<Audio>()
|
|
val ambientsWindy = ArrayList<Audio>()
|
|
val ambientsWoods = ArrayList<Audio>()
|
|
|
|
// will play as sound effect
|
|
val crickets = ArrayList<Audio>()
|
|
|
|
init {
|
|
ambientsForest.add(AudioLoader.getStreamingAudio("OGG", File("./assets/sounds/ambient/ambient_forest_01.ogg").toURI().toURL()))
|
|
|
|
ambientsMeadow.add(AudioLoader.getStreamingAudio("OGG", File("./assets/sounds/ambient/ambient_meadow_01.ogg").toURI().toURL()))
|
|
|
|
ambientsWindy.add(AudioLoader.getStreamingAudio("OGG", File("./assets/sounds/ambient/ambient_windy_01.ogg").toURI().toURL()))
|
|
|
|
ambientsWoods.add(AudioLoader.getStreamingAudio("OGG", File("./assets/sounds/ambient/ambient_woods_01.ogg").toURI().toURL()))
|
|
|
|
crickets.add(AudioLoader.getAudio("OGG", FileInputStream("./assets/sounds/ambient/crickets_01.ogg")))
|
|
crickets.add(AudioLoader.getAudio("OGG", FileInputStream("./assets/sounds/ambient/crickets_02.ogg")))
|
|
}
|
|
} |