Audio disposing problems using AudioVideoPlayback library
<p>I'm trying to make playlist, where music plays one after another. I need to <code>Dispose()</code> <code>Audio</code>, when it finishes, because memory leak will occur. I wrote this code:</p>

<pre><code>Audio a = new Audio(@"Music\Title.ogg");
a.Ending += new EventHandler((sender, e) =&gt; { (sender as Audio).Dispose(); });
a.Play();
</code></pre>

<p>The problem is that I have <code>System.AccessViolationException</code> in <code>Application.Run(new MainForm());</code>: <code>Attempted to read or write protected memory. This is often an indication that other memory is corrupt</code>. It happens in ending event handler right after music finishes playing.
So, how can I play some music files one after another and dispose previous audio afer it finishes?</p>