Ejemplo n.º 1
0
        /// <summary>
        /// Registers this instance to notify for a type of notification.
        /// </summary>
        /// <param name="notificationType">Type of the notification.</param>
        public void RegisterNotification(NotificationType notificationType)
        {
            if (AudioEngine == null)
            {
                throw new InvalidOperationException("AudioEngine attached to this instance cannot be null");
            }

            var notificationDescription = AudioEngine.VerifyRegister(notificationType, typeof(WaveBank), callback ?? (callback = OnNotificationDelegate));

            notificationDescription.WaveBankPointer = NativePointer;
            AudioEngine.RegisterNotification(ref notificationDescription);
        }