hyperandroid / CAAT

Canvas Advanced Animation Toolkit
hyperandroid.github.com/CAAT
MIT License
727 stars 117 forks source link

Volume on AudioChannel not set #34

Closed MHOOO closed 12 years ago

MHOOO commented 12 years ago

I'm using the audioPlay method on the director to play sounds, however they all are played at the same volume. Changing the volume through director.getAudioManager().getAudio("myAudioId").volume = 0.1 does not work, because the AudioManager::play function does not copy the volume from the audio source into the channel. One can easily fix that however by adding after the channel.load() line: channel.volume=audio.volume;

Kind regards, Thomas

hyperandroid commented 12 years ago

Many thanks for the suggestion Thomas. Will add that in the next v0.2 release (probably today). Regards,

-ibon

2012/1/26 Thomas Karolski < reply@reply.github.com

I'm using the audioPlay method on the director to play sounds, however they all are played at the same volume. Changing the volume through director.getAudioManager().getAudio("myAudioId").volume = 0.1 does not work, because the AudioManager::play function does not copy the volume from the audio source into the channel. One can easily fix that however by adding after the channel.load() line: channel.volume=audio.volume;

Kind regards, Thomas


Reply to this email directly or view it on GitHub: https://github.com/hyperandroid/CAAT/issues/34

hyperandroid commented 12 years ago

Added director.setVolume and audioManager.setVolume methods. The volume value is set as you suggested.

Regards, -ibon

MHOOO commented 12 years ago

Great, thanks!