internal void Destroy() { // notify all sources first foreach (var source in _sources) { source.OnContextDestroyed(); } ALC10.alcDestroyContext(Handle); }
protected override void Dispose(bool disposeManagedResources) { base.Dispose(disposeManagedResources); _sources.Clear(); _files.Clear(); ALC10.alcMakeContextCurrent(IntPtr.Zero); ALC10.alcDestroyContext(_context); ALC10.alcCloseDevice(_device); }
public void Dispose() { if (_context != IntPtr.Zero) { ALC10.alcMakeContextCurrent(IntPtr.Zero); Check(); ALC10.alcDestroyContext(_context); Check(); } if (_device != IntPtr.Zero) { ALC10.alcCloseDevice(_device); Check(); } }
public void Dispose() { ALC10.alcMakeContextCurrent(IntPtr.Zero); if (alContext != IntPtr.Zero) { ALC10.alcDestroyContext(alContext); alContext = IntPtr.Zero; } if (alDevice != IntPtr.Zero) { ALC10.alcCloseDevice(alDevice); alDevice = IntPtr.Zero; } }
void Dispose(bool disposing) { if (context != IntPtr.Zero) { ALC10.alcMakeContextCurrent(IntPtr.Zero); ALC10.alcDestroyContext(context); context = IntPtr.Zero; } if (device != IntPtr.Zero) { ALC10.alcCloseDevice(device); device = IntPtr.Zero; } }
public void Dispose() { EFX.alDeleteFilters(1, ref INTERNAL_alFilter); ALC10.alcMakeContextCurrent(IntPtr.Zero); if (alContext != IntPtr.Zero) { ALC10.alcDestroyContext(alContext); alContext = IntPtr.Zero; } if (alDevice != IntPtr.Zero) { ALC10.alcCloseDevice(alDevice); alDevice = IntPtr.Zero; } }
void InnerDispose() { if (_disposed) { return; } if (_context != IntPtr.Zero) { ALC10.alcMakeContextCurrent(IntPtr.Zero); Check(); ALC10.alcDestroyContext(_context); Check(); } if (_device != IntPtr.Zero) { ALC10.alcCloseDevice(_device); Check(); } _disposed = true; }
public static void Shutdown() { // Destroy the sources AL10.alDeleteSources(MAX_SOURCE_COUNT, s_allSources); ALUtils.CheckALError("unable to free audio sources"); s_availableSources.Clear(); s_usedSources.Clear(); // Destroy the context, and then close the device ALC10.alcMakeContextCurrent(IntPtr.Zero); ALUtils.CheckALCError(); ALC10.alcDestroyContext(Context); ALUtils.CheckALCError(); Context = IntPtr.Zero; ALC10.alcCloseDevice(Device); ALUtils.CheckALCError(); Device = IntPtr.Zero; IsShutdown = true; // Report LINFO("Shutdown OpenAL audio engine."); }