Exemplo n.º 1
0
        /// <summary>
        /// Creates a BASS stream that represents the song.
        /// </summary>
        /// <param name="flags">The flags to apply to the stream that is created.</param>
        /// <returns>The handle to the BASS stream that was created.</returns>
        internal UInt32 CreateStream(UInt32 flags)
        {
            if (FileSystemService.Source == null)
            {
                var stream = BASSNative.StreamCreateFile(file, flags);
                if (!BASSUtil.IsValidHandle(stream))
                    throw new BASSException();

                return stream;
            }
            else
            {
                if (instanceManager == null)
                {
                    instanceManager = new BASSSongInstanceManager(file);
                }
                return instanceManager.CreateInstance(flags);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a BASS stream that represents the song.
        /// </summary>
        /// <param name="flags">The flags to apply to the stream that is created.</param>
        /// <returns>The handle to the BASS stream that was created.</returns>
        internal UInt32 CreateStream(UInt32 flags)
        {
            if (FileSystemService.Source == null)
            {
                var stream = BASSNative.StreamCreateFile(file, flags);
                if (!BASSUtil.IsValidHandle(stream))
                {
                    throw new BASSException();
                }

                return(stream);
            }
            else
            {
                if (instanceManager == null)
                {
                    instanceManager = new BASSSongInstanceManager(file);
                }
                return(instanceManager.CreateInstance(flags));
            }
        }