Adding some audio tests for new OpenALcode

This commit is contained in:
underscorediscovery
2013-07-18 02:02:08 -02:30
parent 46a9fac71c
commit ff2ab5609c
6 changed files with 20 additions and 5 deletions

View File

@@ -27,6 +27,7 @@
<source path="src" />
<haxelib name="lime" />
<haxelib name="lime" />
<haxelib name="actuate" />
</project>

View File

@@ -11,6 +11,8 @@ import lime.gl.GLProgram;
import lime.utils.Float32Array;
import lime.geometry.Matrix3D;
import motion.Actuate;
class Main {
public var lib : LiME;
@@ -34,7 +36,18 @@ class Main {
lib = _lime;
// Init the shaders and view
init();
init();
lib.audio.create_sound('sound1', 'assets/music_credit.ogg');
lib.audio.create_sound('sound2', 'assets/shoot.wav');
lib.audio.sounds.get('sound1').volume = 1;
lib.audio.sounds.get('sound1').play();
lib.audio.sounds.get('sound2').play();
// Actuate.timer (0.5).repeat ().onRepeat(function(){
// lib.audio.sounds.get('sound2').play();
// });
}