Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
[DllImportAttribute("bass")] public static bool BASS_ChannelSlideAttribute( int handle, BASSAttribute attrib, float value, int time )
Parameters
- handle
- Type: SystemInt32
The channel handle... a HCHANNEL, HSTREAM or HMUSIC, or HRECORD. - attrib
- Type: Un4seen.BassBASSAttribute
The attribute to slide the value of (one of the following, see BASSAttribute):Other attributes may be supported by add-ons, see the documentationBASS_ATTRIB_FREQ Sample rate. BASS_ATTRIB_PAN Panning/balance position. BASS_ATTRIB_VOL Volume level. BASS_ATTRIB_EAXMIX EAX wet/dry mix. BASS_ATTRIB_MUSIC_AMPLIFY Amplification level. (HMUSIC) BASS_ATTRIB_MUSIC_BPM BPM. (HMUSIC) BASS_ATTRIB_MUSIC_PANSEP Pan separation level. (HMUSIC) BASS_ATTRIB_MUSIC_PSCALER Position scaler. (HMUSIC) BASS_ATTRIB_MUSIC_SPEED Speed. (HMUSIC) BASS_ATTRIB_MUSIC_VOL_CHAN A channel volume level. (HMUSIC) BASS_ATTRIB_MUSIC_VOL_GLOBAL Global volume level. (HMUSIC) BASS_ATTRIB_MUSIC_VOL_INST An instrument/sample volume level. (HMUSIC) BASS_SLIDE_LOG Flag: Slide the attribute's value logarthmically rather than linearly. This cannot be used when going from positive to negative or vice versa. An exception is when using a negative value with BASS_ATTRIB_VOL to fade-out and stop. - value
- Type: SystemSingle
The new attribute value. See the attribute's documentation for details on the possible values. - time
- Type: SystemInt32
The length of time (in milliseconds) that it should take for the attribute to reach the value.
Return Value
Type: BooleanIf successful, then is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
This function is similar to BASS_ChannelSetAttribute(Int32, BASSAttribute, Single), except that the attribute is ramped to the value over the specified period of time. Another difference is that the value is not pre-checked. If it is invalid, the slide will simply end early.
If an attribute is already sliding, then the old slide is stopped and replaced by the new one.
BASS_ChannelIsSliding(Int32, BASSAttribute) can be used to check if an attribute is currently sliding. A BASS_SYNC_SLIDE sync can also be set via BASS_ChannelSetSync(Int32, BASSSync, Int64, SYNCPROC, IntPtr), to be triggered at the end of a slide. The sync will not be triggered in the case of an existing slide being replaced by a new one.
Attribute slides are unaffected by whether the channel is playing, paused or stopped. They carry on regardless.
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not a valid channel. |
BASS_ERROR_ILLTYPE | attrib is not valid. |