app::audio: drop the old load_sound and load_music
[nit.git] / contrib / mnit_test / src / test_audio.nit
index 2a3a77b..ae94e70 100644 (file)
@@ -22,18 +22,24 @@ import android::audio
 
 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
@@ -41,8 +47,8 @@ redef class App
                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