/// <summary> /// Releases all resources used by the <see cref="Sound"/>. /// </summary> public override void Dispose() { Stop(); _buffer?.DetachSound(this); base.Dispose(); }
internal void ResetBuffer() { // First stop the sound in case it is playing Stop(); // Detach the buffer if (_buffer != null) { ALChecker.Check(() => AL.Source(Handle, ALSourcei.Buffer, 0)); _buffer.DetachSound(this); _buffer = null; } }