Android audio services, wraps a part of android audio API
This module modifies the default behaviour of the audio loading:
It is first loaded from the
The file extension is not needed for the
res/raw loading part.
If it didn't work, it is loaded from the
The file extension is needed for the
assets loading part.
assets contains the portable version of sounds, since the
res folder exsists only in android projects.
For this example, the sounds "test_sound" and "test_music" are located in the "assets/sounds" folder, they both have ".ogg" extension. "test_sound" is a short sound and "test_music" a music track
var s = app.load_sound("sounds/test_sound.ogg") var m = app.load_music("sounds/test_music.ogg") s.play m.play
Now, the sounds are in "res/raw"
s = app.load_sound_from_res("test_sound") m = app.load_music_from_res("test_sound") s.play m.play
See http://developer.android.com/reference/android/media/package-summary.html for more infos