Example #1
0
 /// <summary>
 /// Free used resources
 /// </summary>
 public void Dispose()
 {
     if (_source != 0)
     {
         if (_mixer != 0)
         {
             Stop();
         }
         RemoveEq(ref _mixer);
         Bass.StreamFree(_source);
         Bass.MusicFree(_source);
         Bass.StreamFree(_mixer);
         _mixer  = 0;
         _source = 0;
     }
     if (_handle.IsAllocated)
     {
         _handle.Free();
     }
     if (_initialized)
     {
         Bass.Free();
     }
     BassCd.Unload();
     BassFx.Unload();
     BassMix.Unload();
     Bass.PluginFree(0);
 }
Example #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (_source != 0)
     {
         if (_mixer != 0)
         {
             Stop();
         }
         RemoveEq(ref _mixer);
         Bass.StreamFree(_source);
         Bass.MusicFree(_source);
         Bass.StreamFree(_mixer);
         _mixer  = 0;
         _source = 0;
     }
     if (_handle.IsAllocated)
     {
         _handle.Free();
     }
     if (_initialized)
     {
         Bass.Free();
     }
     BassCd.Unload();
     BassFx.Unload();
     BassMix.Unload();
     Bass.PluginFree(0);
     GC.SuppressFinalize(this);
 }