Closed wel97459 closed 4 years ago
Ah, you can't assume replay_get_audio() will always generate the same number of samples, because it depends on the tempo of the song, which can change during playback. The maximum for a particular sampling rate is given by calculate_mix_buf_len(), which is roughly 1/6 of a second.
I've checked-in an SDL player that uses the buffering routine from the Javascript port, which has a similar output mechanism.
Sweet, I'll have a look at it.
SDL Player for IBXM library based off of the one used with the Micromod library. I added a function to the IBXM library to provides the length that will be returned when calling the replay_get_audio() function. This was needed for Initialising the SDL_AudioSpec->samples value.