コード例 #1
0
        public void Dispose()
        {
            Stop();

            Log.Debug("Disposing output stream");

            _outputStream.Dispose();
            _outputStream = null;

            Log.Debug("Resetting global Bass environment");

            if (!Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATEPERIOD, 0))
            {
                throw new BassLibraryException("BASS_SetConfig");
            }

            if (!Bass.BASS_SetDevice(_deviceNo))
            {
                throw new BassLibraryException("BASS_SetDevice");
            }

            if (!Bass.BASS_Free())
            {
                throw new BassLibraryException("BASS_Free");
            }

            if (!Bass.BASS_SetDevice(BassConstants.BassNoSoundDevice))
            {
                throw new BassLibraryException("BASS_SetDevice");
            }
        }
コード例 #2
0
 public void Dispose()
 {
     if (_bassStream != null)
     {
         _bassStream.Dispose();
     }
 }
コード例 #3
0
 public override void Dispose()
 {
     base.Dispose();
     if (_BassStream != null)
     {
         _BassStream.Dispose();
     }
 }
コード例 #4
0
 public override void Dispose()
 {
     base.Dispose();
     if (_bassStream != null)
     {
         _bassStream.Dispose();
     }
     // Bass.BASS_MusicFree is not necessary to be called here because of flag BASS_MUSIC_AUTOFREE
 }
コード例 #5
0
 public void Dispose()
 {
     if (_bassStream == null)
     {
         return;
     }
     _bassStream.Dispose();
     _bassStream = null;
 }
コード例 #6
0
        /// <summary>
        /// Resets the instance to its uninitialized state.
        /// </summary>
        public void ResetInputStream()
        {
            TerminateBufferUpdateThread();
            if (_inputStreamInitialized)
            {
                _inputStreamInitialized = false;

                _outputStream.Dispose();
                _outputStream = null;

                _vizStream.Dispose();
                _vizStream = null;

                _vizRawStream.Dispose();
                _vizRawStream = null;

                _buffer             = null;
                _inputStream        = null;
                _vizReadOffsetBytes = 0;
            }
        }
コード例 #7
0
        public override void Dispose()
        {
            base.Dispose();

            Log.Debug("Disposing mixer stream");

            if (_mixer != null)
            {
                _mixer.Dispose();
                _mixer = null;
            }

            Log.Debug("Resetting global Bass environment");

            if (!Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATEPERIOD, 0))
            {
                throw new BassLibraryException("BASS_SetConfig");
            }

            if (!BassWasapi.BASS_WASAPI_Free())
            {
                throw new BassLibraryException("BASS_WASAPI_Free");
            }
        }