示例#1
0
 public override void OnStopped()
 {
     Bass.BASS_ChannelRemoveLink(base.ChannelHandle, this._stream);
     Bass.BASS_StreamFree(this._stream);
     this._stream = 0;
     this.ClearBuffer();
 }
示例#2
0
 public override void OnStopped()
 {
     if (this._streamCopy != 0)
     {
         if (this.TargetMixerStream != 0)
         {
             BassMix.BASS_Mixer_ChannelRemove(this._streamCopy);
         }
         Bass.BASS_ChannelRemoveLink(base.ChannelHandle, this._streamCopy);
         Bass.BASS_StreamFree(this._streamCopy);
         this._streamCopy = 0;
     }
 }
        public virtual void Stop()
        {
            Bass.BASS_ChannelStop(audioHandle);

            // Synchronisation is only temporary as user may add or remove streams between different play sessions.
            foreach (int stream in childSyncedStreams)
            {
                if (!Bass.BASS_ChannelRemoveLink(this.audioHandle, stream))
                {
                    var bassError = Bass.BASS_ErrorGetCode();
                    Debug.LogError("AudioStream ClearSyncedStreams error: " + bassError);
                }
            }

            childSyncedStreams.Clear();
        }