private alSourceStop ( uint sourceId ) : void | ||
sourceId | uint | |
return | void |
/// <summary> /// Disposes the object. /// </summary> /// <param name="disposing">The disposing state.</param> protected virtual void Dispose(bool disposing) { _beginDispose = true; if (PlaybackState != PlaybackState.Stopped) { lock (_locker) { OpenAL.alSourceStop(_source.SourceId); PlaybackState = PlaybackState.Stopped; RaisePlaybackChanged(); } } if (_source.SourceId != 0) { lock (_locker) { var queuedBuffers = new uint[3]; OpenAL.alSourceUnqueueBuffers(_source.SourceId, 3, queuedBuffers); OpenAL.alDeleteBuffers(3, queuedBuffers); } Owner.SourcePool.FreeSource(_source); Owner.DestroyAudioBuffer(this); } if (disposing) { } }
/// <summary> /// Stops the playback. /// </summary> public void Stop() { lock (_locker) { Owner.Context.MakeCurrent(); OpenAL.alSourceStop(_source.SourceId); PlaybackState = PlaybackState.Stopped; RaisePlaybackChanged(); } }