Ejemplo n.º 1
0
        /// <summary>
        /// Destroys the instance.
        /// </summary>
        protected virtual void DisposeInternal()
        {
            AudioLayer.SourceDestroy(SoundInstance.Source);

            foreach (var deviceBuffer in deviceBuffers)
            {
                AudioLayer.BufferDestroy(deviceBuffer);
            }

            deviceBuffers.Clear();
            freeBuffers.Clear();
            IsDisposed    = true;
            IsInitialized = false;
        }
Ejemplo n.º 2
0
        protected override void Destroy()
        {
            base.Destroy();

            if (AudioEngine == null || AudioEngine.State == AudioEngineState.Invalidated)
            {
                return;
            }

            if (!StreamFromDisk)
            {
                AudioLayer.BufferDestroy(PreloadedBuffer);
            }
        }