I use the following code to have a fade in sound:
result = FMOD_System_GetMasterChannelGroup(systemx, &channelgroup); result = FMOD_System_PlayDSP(systemx, mydsp, channelgroup, 0, &channel); result = FMOD_Channel_GetSystemObject(channel, &systemx); result = FMOD_Channel_GetDSPClock(channel, 0, &dspclock); FMOD_System_Update(systemx); result = FMOD_Channel_AddFadePoint(channel, dspclock, 0.0f ); endclock = dspclock + 2400; result = FMOD_Channel_AddFadePoint(channel, endclock, 0.2f ); FMOD_System_Update(systemx);
The idea is to start with zero volume and fade in until the volume is 0.2. This seems to work fine. However, when I after that try to check the volume with this command
the value of “volume” is always 1.0. This I don’t understand. I need to be able to regulate the volume after the fade in, but if the value is already 1, how can I then possibly increase the volume?
Thanks in advance.
Thank you for your answer.
Actually, I found that I can set the volume to more than 1. I thought first that it only could have a value between 0 and 1. So when I want to increase the volume after the fade in, I regulate it’s value between 1 and 2. This seems to work fine.
Please login first to submit.