Game Development Community

getting Audio channel IDs

by Andrew Son · in Technical Issues · 03/04/2011 (8:36 pm) · 4 replies

Hey guys! Trying to make a function that will fade my background music in/out when I exit/enter different areas. Code seems easy enough to implement scheduling a function that increments/decrements the volume over time but my problem is the only way I've found to adjust the volume is by getting the channel ID of the music playing. I can't find anything that will help me get the ID from my music. Setting up a global music variable when I play the music doesn't help since the data members aren't on the variable. What's the best way to go about doing this? Is there a way?

#1
03/05/2011 (3:47 pm)
I think some fading is yet possible but can't remember exactly the details and cannot check at the moment... Try looking into T3D scripts reference and investigating on AudioMood or AudioAmbiance .... Rene Damm it's the guy who can help you the most with that... in the meantime look also at:

THIS

and then THIS
#2
03/07/2011 (4:45 am)
@Andrew
Simply store the handle that alxCreateSource or alxPlay gives you and then use alSourcef to set AL_GAIN on the handle.

@Giorgio
It seems that Andrew is working with TGB so my SFX stuff probably won't be of use to him :)
#3
03/07/2011 (6:37 am)
Oh, I was under the assumption we were talking about T3D ... My fault, sorry guys :-P
#4
03/07/2011 (6:39 am)
Quote:Oh, I was under the assumption we were talking about T3D ...

Happens to me all the time :)