I`m making a game (top view, walking with heroe and doing some actions). Using HTML5 canvas for graphics and SoundManager 2 for the game audio.
In game world is many objects, that making sound, and sound volume is dependent of heroe distance (if object, which making sound, is near to heroe, then it sound will be louder). I doing like this:
soundManager.play(soundId,{volume:vol});
So, I understand, that volume parameter is for sound with specified soundId (if I play this sound more times at the same time, then it all will be played with equal volume).
Can i do something, to get, that more objects uses one sound at the same time, but with different volume?
Didn't get any answer, so I fix it self and it`s work for me (maybe not the right way).
Before adding audio samples to SoundManager, I collect information from game map, to get all objects, who uses sound samples, then simple added samples for each object - equal sound files with different ID`s.
I add this answer, because maybe someone find it helpful.