Пример #1
0
 public override void Dispose()
 {
     if (this.Stream != null)
     {
         this.Stream.Dispose();
     }
     this.Stream = null;
     GC.SuppressFinalize(this);
 }
Пример #2
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <exception cref="System.ArgumentException"></exception>
 /// <param name="filename"></param>
 /// <param name="isFloat"></param>
 /// <param name="preScan"></param>
 public BASSDecodeStreamAdapter(string filename, bool isFloat = true, bool preScan = false)
 {
     if (!Initialized)
     {
         BASS.BASS_SetDevice(0);
         Initialized = true;
     }
     try
     {
         this.Stream = new BASS.FileStream(filename, MakeFlag(isFloat, preScan), getData_retryMax: GET_DATA_RETRY_MAX_DEFAULT);
     }
     catch (BASS.BASSException ex)
     {
         throw new ArgumentException("Cannot create stream", ex);
     }
 }