Retrieves all a sample's existing channels.
|handle||The sample handle.
|channels||An array to put the sample's channel handles in. The array should be the same size as the sample's max setting when the sample was created, which can be retrieved using BASS_SampleGetInfo. NULL can be used to just check how many channels exist.
If successful, the number of existing channels is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
|BASS_ERROR_HANDLE||handle is not a valid sample handle.
To determine whether a particular sample channel still exists, it is simplest to just try it in a function call.
Set the sample rate of all a sample's channels to 10000 Hz.
DWORD a, count;
BASS_SampleGetInfo(sample, &info); // get sample info for "max" value
channels=malloc(info.max*sizeof(HCHANNEL)); // allocate channels array
count=BASS_SampleGetChannels(sample, channels); // get the channels
for (a=0; a<count; a++) // go through them all and...
BASS_ChannelSetAttribute(channels[a], BASS_ATTRIB_FREQ, 10000); // set the sample rate to 10000
free(channels); // free the channels array