It actually seems that the problem I'm having is not the buffering routine, but that BASS will not play the second custom stream for the third song. This seems to only happen when using BASS_SPEAKER flags. In more detail:
I have a Delphi Form with a decoding channel and two custom streams which I initialize using the flags BASS_SPEAKER_FRONT and BASS_SPEAKER_REAR. The STREAMPROCs for these two custom streams are the simplest possible, basically just returning Length so that the streams will keep on playing.
Now, as I create two instances of this Form, the streams will play just as they should without trouble. But when I go on to create a third instance of the Form, what happens is this: custom stream number one plays just as it should, but the second custom stream will only call the STREAMPROC about three to five times, then just STOP calling it. (This is also why my buffering routine failed.) Calling BASS_ChannelIsActive on this second stream will still return BASS_ACTIVE_PLAYING.
Is this a bug in BASS or something wrong with either my drivers or sound card? (SB Live, Windows 2000 SP4)
(To clarify, this only happens when using BASS_SPEAKER flags (which I really need here)).