/// <summary> /// Registers the effect in the channel. /// </summary> /// <param name="channel">The channel.</param> public void Register(MixChannel channel) { if (!s_instances.TryGetValue(this, out var refCount)) { refCount = 0; } s_instances[this] = refCount + 1; _ = Native.CheckErrorZero(Native.Mix_RegisterEffect(channel.Index, _effect, _done, UserData)); }
/// <summary> /// Unregisters the effect in the channel. /// </summary> /// <param name="channel">The channel.</param> public void Unregister(MixChannel channel) => _ = Native.CheckErrorZero(Native.Mix_UnregisterEffect(channel.Index, _effect));