Пример #1
0
        /// <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));
        }
Пример #2
0
 /// <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));