コード例 #1
0
        /// <summary>
        /// Slides a channel's attribute from its current value to a new value
        /// </summary>
        /// <param name="handle">The channel handle... a HCHANNEL, HSTREAM, HMUSIC, or HRECORD</param>
        /// <param name="attrib">The attribute to slide the value of... one of the following,other attributes may be supported by add-ons, see the documentation</param>
        /// <param name="value">The new attribute value. See the attribute's documentation for details on the possible values. </param>
        /// <param name="duration">The length of time (in milliseconds) that it should take for the attribute to reach the value</param>
        /// <returns>If successful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code</returns>
        public static void BASS_ChannelSlideAttribute(int handle, BASSAttribute attrib, float value, int duration)
        {
            bool result = false;

            if (Environment.Is64BitProcess)
            {
                result = BassX64.BASS_ChannelSlideAttribute(handle, attrib, value, duration);
            }
            else
            {
                result = BassX86.BASS_ChannelSlideAttribute(handle, attrib, value, duration);
            }

            if (!result)
            {
                throw new ApplicationException("BASS_ChannelSlideAttribute Fail," + BassErrorCode.GetErrorInfo());
            }
        }