Ejemplo n.º 1
0
        private void changeSong()
        {
            this._mediaFoundationReader = new MediaFoundationReader(this._songManager.GetNextSong());
            this._sampleAggregator.SetSource(this._mediaFoundationReader.ToSampleProvider());

            if (SongContextEventHandler != null)
            {
                SongContext songContext = this._songManager.GetSongContext();
                SongContextEventHandler.Invoke(this, songContext);
            }
        }
Ejemplo n.º 2
0
        public void Play()
        {
            if (this._playbackDevice != null && this._sampleAggregator != null && this._playbackDevice.PlaybackState != PlaybackState.Playing)
            {
                this._playbackDevice.Play();
            }

            if (SongContextEventHandler != null)
            {
                SongContext songContext = this._songManager.GetSongContext();
                SongContextEventHandler.Invoke(this, songContext);
            }
        }