Sets a sample's default attributes.
BOOL BASS_SampleSetInfo( HSAMPLE handle, BASS_SAMPLE *info );
handle | The sample handle. |
info | Pointer to the sample information structure. |
BASS_ERROR_HANDLE | The handle is invalid. |
BASS_ERROR_ILLPARAM | The BASS_SAMPLE max value is invalid. |
The sample's maximum number of simultaneous playbacks can be changed via the max member of the BASS_SAMPLE structure. If the new maximum is lower than the existing number of channels, the channels will remain existing until they are stopped.
The length, origres and chans members of the BASS_SAMPLE structure cannot be modified; any changes are ignored. Only the BASS_SAMPLE_LOOP and BASS_SAMPLE_OVER flags can be changed.
BASS_SAMPLE info; BASS_SampleGetInfo(sample, &info); // get the sample's current info info.volume = 0.5; // set the default volume to 0.5 BASS_SampleSetInfo(sample, &info); // set the updated info