Cleanup fixes
parent
977b1fd163
commit
7a754e1c90
|
@ -240,17 +240,20 @@ namespace MoonWorks.Audio
|
||||||
{
|
{
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
// TODO: dispose managed state (managed objects)
|
for (var i = streamingSounds.Count - 1; i >= 0; i--)
|
||||||
foreach (var weakReference in streamingSounds)
|
{
|
||||||
{
|
var weakReference = streamingSounds[i];
|
||||||
if (weakReference.TryGetTarget(out var streamingSound))
|
|
||||||
|
if (weakReference.TryGetTarget(out var streamingSound))
|
||||||
{
|
{
|
||||||
streamingSound.Dispose();
|
streamingSound.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
streamingSounds.Clear();
|
streamingSounds.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FAudio.FAudioVoice_DestroyVoice(ReverbVoice);
|
||||||
|
FAudio.FAudioVoice_DestroyVoice(MasteringVoice);
|
||||||
FAudio.FAudio_Release(Handle);
|
FAudio.FAudio_Release(Handle);
|
||||||
|
|
||||||
IsDisposed = true;
|
IsDisposed = true;
|
||||||
|
|
Loading…
Reference in New Issue