/// <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); } }
/// <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)); } }