Exemplo n.º 1
0
        /// <summary>
        /// Retrieves the value of a channel's attribute
        /// </summary>
        /// <param name="handle">The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD</param>
        /// <param name="attrib">The attribute to set the value of... one of the following,other attributes may be supported by add-ons, see the documentation</param>
        public static float BASS_ChannelGetAttribute(int handle, BASSAttribute attrib)
        {
            float value  = 0;
            bool  result = false;

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

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

            return(value);
        }