Exemple #1
0
        private void OnCurrentTrackChanged(ITrackInfo oldTrack, ITrackInfo newTrack)
        {
            if (_playback != null)
            {
                _playback.Ended -= OnCurrentTrackEnded;
                _playback.Dispose();
            }

            _playback        = _audioHub.CreatePlayback(newTrack.Uri);
            _playback.Name   = _playback.Name ?? newTrack.Name;
            _playback.Volume = Volume;
            _playback.Ended += OnCurrentTrackEnded;
            _playback.AddOutgoingConnections(OutgoingConnections);
        }