//
// Generated by Brutal.Sdl.Generate; do not edit by hand.
#nullable enable
using System;
using Brutal.Interop;
namespace Brutal.SdlApi.Mixer;
///
/// A strongly-typed interop handle wrapping the opaque SDL MIX_Audio pointer.
///
[InteropHandle]
public readonly unsafe partial struct MixAudio : IDisposable
{
///
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyAudio(this);
}
}
///
/// A strongly-typed interop handle wrapping the opaque SDL MIX_AudioDecoder pointer.
///
[InteropHandle]
public readonly unsafe partial struct MixAudioDecoder : IDisposable
{
///
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyAudioDecoder(this);
}
}
///
/// A strongly-typed interop handle wrapping the opaque SDL MIX_Group pointer.
///
[InteropHandle]
public readonly unsafe partial struct MixGroup : IDisposable
{
///
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyGroup(this);
}
}
///
/// A strongly-typed interop handle wrapping the opaque SDL MIX_Mixer pointer.
///
[InteropHandle]
public readonly unsafe partial struct MixMixer : IDisposable
{
///
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyMixer(this);
}
}
///
/// A strongly-typed interop handle wrapping the opaque SDL MIX_Track pointer.
///
[InteropHandle]
public readonly unsafe partial struct MixTrack : IDisposable
{
///
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyTrack(this);
}
}