Hey there. This fixes a bug in some music playback. noticed it in a game I'm working on:
Without this fix the title song only plays the drumloop once and cuts short the longer section.
the Audio code didn't seem super testable... Any insight into how to unit test this would be great. I haven't coded C++ in a while and a half.
even after this change the master channel detection doesn't seem 100% correct. I'd think it should look at the longest non-looping section, or the longest looping section if there are not non-looping sections. I can try to make this more robust in a follow-up.
here's the game where the title track wasn't playing right.
Hey there. This fixes a bug in some music playback. noticed it in a game I'm working on:
Without this fix the title song only plays the drumloop once and cuts short the longer section.
the Audio code didn't seem super testable... Any insight into how to unit test this would be great. I haven't coded C++ in a while and a half.
even after this change the master channel detection doesn't seem 100% correct. I'd think it should look at the longest non-looping section, or the longest looping section if there are not non-looping sections. I can try to make this more robust in a follow-up.
here's the game where the title track wasn't playing right.