Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by mandarin

Hi!

Lost Decade Games created Audia for easier handling of audio. It uses WebAudio when available, and falls back to Audio if necessary. I recently used it in a client project to be able to play sound on mobile devices, and had to make it into an ImpactJS module in order for it to be included in the baking.

I was running short on time and didn't have the time to test every feature, but it does play sound. You might run into a bug or two if you choose to use this module. If you do find bugs, I'd be happy if you committed a fix to my fork.

You can find the fork at https://github.com/mandarinx/audia. Read about Audia here: http://www.lostdecadegames.com/audia-is-a-library-for-simplifying-the-web-audio-api/


Thomas

1 decade ago by mimik

This seams great
But how do you use it?

Should i load it into my main game right?
Or should i load it inside where?


ig.module( 
	'game.main' 
)
.requires(
	'impact.game',
	'impact.font',
	'plugins.audia'
)
.defines(function(){

mygame= ig.Game.extend({
	init: function() {
		 this.audia = new ig.Audia();

	},


This works fine now i have a audia object at this.audia

But soundmanager in impact.js sound
Never detects it even with the changes you posted.

ig.audia.use

this is always false.

1 decade ago by mandarin

Hi.

Seems like audia.js:init() thinks you cannot use Audia. It defaults to true but if any of the test cases fail, it will set it to false. I'd start looking there.

It's an embarassingly messy setup. Sorry.


Thomas

1 decade ago by mimik

so its broken or?
do i need to load the regular audia as well?
i would like to use this :-D

because i have 2 different sound contex i need to push sound to :-)
Page 1 of 1
« first « previous next › last »