Hello.
I’ve been messing around with the FMOD Core examples, and I’ve noticed that the pitch fade out present in channel_groups.cpp
doesn’t work as expected.
It appears as if setPitch called on the master channel initiates a pitch sweep, with the speed somehow tied to the pitch parameter. (Depending on the sign of the argument, the pitch reaches the lowest possible value (0/stopped) or the max value).
I tried slightly altering the example code, to set an arbitrary pitch value and without calling System::update()
periodically, and this effect still applies:
/*
A little fade out over 2 seconds.
*/
{
masterGroup->setPitch(0.5f);
result = system->update();
ERRCHECK(result);
for (count = 0; count < 200; count++)
{
Common_Sleep(10);
}
}
In this example I want all channels to be playing at half the speed, but I get an unwanted fast sweep to pitch 0. (You can try with 0.99f to get a slower, more noticeable, sweep).
The same happens if I periodically call system->update()
in the for loop.