Esempio n. 1
0
        /// <summary>
        /// Dispose of the OpenALSoundCOntroller.
        /// </summary>
        /// <param name="disposing">If true, the managed resources are to be disposed.</param>
        void Dispose(bool disposing)
        {
            if (!_isDisposed)
            {
                if (disposing)
                {
#if DESKTOPGL
                    if (_oggstreamer != null)
                    {
                        _oggstreamer.Dispose();
                    }
#endif
                    for (int i = 0; i < allSourcesArray.Length; i++)
                    {
                        AL.DeleteSource(allSourcesArray[i]);
                        ALHelper.CheckError("Failed to delete source.");
                    }

                    if (Filter != 0 && Efx.IsInitialized)
                    {
                        Efx.DeleteFilter(Filter);
                    }

                    Microphone.StopMicrophones();
                    CleanUpOpenAL();
                }
                _isDisposed = true;
            }
        }
        /// <summary>
        /// Dispose of the OpenALSoundCOntroller.
        /// </summary>
        /// <param name="disposing">If true, the managed resources are to be disposed.</param>
        void Dispose(bool disposing)
        {
            if (!_isDisposed)
            {
                if (disposing)
                {
                    if (_bSoundAvailable)
                    {
#if DESKTOPGL
                        if (_oggstreamer != null)
                        {
                            _oggstreamer.Dispose();
                        }
#endif
                        for (int i = 0; i < allSourcesArray.Length; i++)
                        {
                            AL.DeleteSource(allSourcesArray[i]);
                            ALHelper.CheckError("Failed to delete source.");
                        }

                        CleanUpOpenAL();
                    }
                }
                _isDisposed = true;
            }
        }
        /// <summary>
        /// Dispose of the OpenALSoundCOntroller.
        /// </summary>
        /// <param name="disposing">If true, the managed resources are to be disposed.</param>
        void Dispose(bool disposing)
        {
            if (!_isDisposed)
            {
                if (disposing)
                {
                    if (_bSoundAvailable)
                    {
                        CleanUpOpenAL();
#if DESKTOPGL
                        if (_oggstreamer != null)
                        {
                            _oggstreamer.Dispose();
                        }
#endif
                    }
                }
                _isDisposed = true;
            }
        }