BASS channel limits and channel stopping problems

Started by Dave,

Dave

Fist off - I'm new to bass having only disovered it a couple of weeks ago, but I do like what I see.  However, I'm having difficulties in stopping a channel.  In the small project I'm working on, I use bass to play some looping samples and then store the channel handle.  I then later on call the stop function to stop a looping sound as required.  However, I have noticed that if many other samples are played (either one timers or loops) before I attempt to stop the first looping sound that it no longer works.  The looped sample remains.  My guess would be that it is somehow related to a maximum number of channels and perhaps when channels get buffered together they cannot be stopped as individual samples or they somehow lose their channel handle.

Has anyone experienced trouble like this or have any idea what the cause may be?  Will I have to alter my code to force certain objects to use certain sound channels?  Is that even possible in bass?

Ian @ un4seen

Please post the code you're using to load/play/stop the samples... that'll make it clearer what you're doing, and what the problem might be.

dave

Strange - I posted but nothing appeared...oh well, repost time:

I'm creating a small game in C++ using classes, and one of my classes needs to make a constant sound.  I do this by calling:

BASS_SAMPLE* info=new BASS_SAMPLE;
BASS_SampleGetInfo(sampleID, info);
info->flags=info->flags+BASS_SAMPLE_LOOP;
BASS_SampleSetInfo(sampleID,info);
ambChan = BASS_SamplePlay(sampleID);

then later on when the object is destroyed, in its destructor I use:

BASS_ChannelSlideAttributes(ambChan, -1, -2, -101, 250);

ambChan is of course a handle to the channel, which is stored by the class so shouldn't be lost.  But when I attempt to stop the sound, every so often (usually after several other samples have been played) it doesn't stop.

Ian @ un4seen

I'll send you a debug version of BASS.DLL, to find out what's happening there :)