I’d like to calculate some data in every second while the song is playing. But it doesn’t work, this is part of my codes.
if(length1==5000) std::cout<<length1<<"\r"; }
Interesting, it worked well if i wiped the condition
Is it a FMOD’s bug or I missed something? furthermore，how many samples are proccessed in one loop? can i process the data by samples rather than time? im using vs.net2003
- Ziming asked 10 years ago
You’re assuming every time your loop iterates, that the position goes up by 1? That is not going to happen, it will jump up depending on how long it took between calls to getPosition, and it may be even coarser than that because fmod’s mixer is updated in chunks of 256 samples at a time.
You should use greater than/less than comparisons rather than ==.
Please login first to submit.