samples stop playing
Posted: Mon Feb 16, 2009 12:20 pm
I wrote a music-based game where I use my own routines to play a simple instrument loop (two simultaniously actually, bass and drums) and a few samples on top of that based on user actions. I only use the Sample-play option of maxmod and am not playing and modules.
Everything is fine for about 15-30 mins, but after that there slowly starts to be a problem with playing the samples, it starts by missing a few samples, which are not played and gets worse over time. I think its running out of sound channels, which it shouldn't, as the samples are rather short and the number is well below the 30 samples maxmod should be able to play.
my workaround so far is a pause-button which initializes the whole sound process again (
mmInitDefaultMem((mm_addr)soundbank_bin);
mmSelectMode(MM_MODE_C);
and loading the samples (mmLoadEffect).
after that everything works fine again for the next 15-30 mins ... any idea what could go wrong ?
Everything is fine for about 15-30 mins, but after that there slowly starts to be a problem with playing the samples, it starts by missing a few samples, which are not played and gets worse over time. I think its running out of sound channels, which it shouldn't, as the samples are rather short and the number is well below the 30 samples maxmod should be able to play.
my workaround so far is a pause-button which initializes the whole sound process again (
mmInitDefaultMem((mm_addr)soundbank_bin);
mmSelectMode(MM_MODE_C);
and loading the samples (mmLoadEffect).
after that everything works fine again for the next 15-30 mins ... any idea what could go wrong ?