private void PlatformDispose(bool disposing) { if (disposing) { _stream?.Dispose(); _stream = null !; } }
private void PlatformInitialize(Stream stream, bool leaveOpen, TimeSpan?duration) { ALController.InitializeInstance(); _stream = new OggStream( stream, leaveOpen, ALController.Get().Streamer, OnFinished, OnLooped); _stream.Prepare(immediate: true); _duration = duration ?? _stream.GetTotalTime(); }