Ok, here's what I do:
When opening a file, I create two sync callbacks, one when about 5 seconds out from playing a song and one when 100ms out from the end of a song. The 5 second one starts pre-caching the next song.
Pre-caching and Opening go through the same code in the end. The code for opening is done in a separate thread which sets up the 2 syncs for the new stream and immediately calls Pause on the channel so that it isn't started. I'll have to review the code again, but from the looks of it, I'm calling Play, with restart set (in case it was a re-use of the same channel as it goes through the same code), then pausing it again. After that I'm calling BASS_ChannelSetPosition() which sets it to a previously saved time (for when I'm loading halfway through a song), or 0 again, if it wasn't set.
At the point of playing this pre-cached track, I free the other stream just after unpausing the pre-cached track.
I'm probably over calling on some of the functions and need to refactor the code soon as its a couple of years old and was originally for a different API, however I didn't think that what I was doing would cause a crash?
Sure, I'll give the debug build a whirl. If it crashes again with the debug build, is there anything special I need to do? I.e. do I need to click debug on the crash window, or would the callstack be available from the crash window?
Cliff
