TGB - Dynamically setting music volume
by Krylar · in Technical Issues · 01/17/2007 (10:51 am) · 0 replies
Howdy...
I would like to appologize in advance, just in case this question seems too basic for you guys. I've searched the forums and actually found some good information on how to work with songs using VMPlayer and also how to add some neat sound stuff to TGB from Robert Geiman's article. Anyway, both solutions demand recompiling the engine and I'm wondering if there is any way to accomplish dynamic volume control without doing that.
I see functions like alxSetChannelVolume at the reference docs, but they take a "channel" as parameter and I don't know how to obtain the channel from a playing tune. Am I missing something? I know how to work with audio profiles and audio descriptors. I can play sound fx and soundtracks fine, but I have no clue on how to control the volume of an already playing tune at runtime.
Could anyone here post a simple script example showing how to dynamically set the music volume (or how to get the channel a music is being played at)?
thanks in advance...
-Krylar
I would like to appologize in advance, just in case this question seems too basic for you guys. I've searched the forums and actually found some good information on how to work with songs using VMPlayer and also how to add some neat sound stuff to TGB from Robert Geiman's article. Anyway, both solutions demand recompiling the engine and I'm wondering if there is any way to accomplish dynamic volume control without doing that.
I see functions like alxSetChannelVolume at the reference docs, but they take a "channel" as parameter and I don't know how to obtain the channel from a playing tune. Am I missing something? I know how to work with audio profiles and audio descriptors. I can play sound fx and soundtracks fine, but I have no clue on how to control the volume of an already playing tune at runtime.
Could anyone here post a simple script example showing how to dynamically set the music volume (or how to get the channel a music is being played at)?
thanks in advance...
-Krylar