コード例 #1
0
        /// <summary>
        /// Retrieves information on a channel
        /// </summary>
        /// <param name="handle">The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD</param>
        /// <returns>If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code</returns>
        public static BASS_CHANNELINFO_INTERNAL BASS_ChannelGetInfo(int handle)
        {
            BASS_CHANNELINFO_INTERNAL info = new BASS_CHANNELINFO_INTERNAL();
            bool result = false;

            if (Environment.Is64BitProcess)
            {
                result = BassX64.BASS_ChannelGetInfo(handle, ref info);
            }
            else
            {
                result = BassX86.BASS_ChannelGetInfo(handle, ref info);
            }

            if (result)
            {
                return(info);
            }
            else
            {
                throw new ApplicationException("BASS_ChannelGetInfo Fail," + BassErrorCode.GetErrorInfo());
            }
        }