redef class App
# Sound
- var soundsp: Sound
+ var soundsp: Sound is noinit
+
# Music
- var soundmp: Music
+ var soundmp: Music is noinit
+
# Sound
var easy_soundsp = new Sound("testsound")
+
# Music
var easy_soundmp = new Music("xylofon")
- # testing from assets ?
+
+ # Read sounds from the assets folder?
var test_assets = false
- # testinf from resources ?
+
+ # Read sounds from the resources folder?
var test_ressources = true
- # testing the automatic way ?
+
+ # Test the automatic way with `PlayableAudio::load`?
var test_easy_sounds = false
redef fun on_create
super
default_mediaplayer.looping = true
if test_assets then
- soundsp = load_sound("testsound.og")
- soundmp = load_music("xylofon.og")
+ soundsp = new Sound("testsound.og")
+ soundmp = new Music("xylofon.og")
soundmp.play
end
if test_ressources then