Beispiel #1
0
        // Audioframework

        /// <summary>Creates a new AudioFramework</summary>
        /// <param name="afd">Required initialization data from a ConfigFile interpreter.</param>
        public AudioFramework(AudioFrameworkData afd, IPlayerConnection audioBackEnd)
        {
            if (audioBackEnd == null)
            {
                throw new ArgumentNullException(nameof(audioBackEnd));
            }

            audioBackEnd.OnSongEnd += (s, e) => OnResourceEnd(true);

            audioFrameworkData = afd;
            playerConnection   = audioBackEnd;
            playerConnection.Initialize();
        }
        // Audioframework

        /// <summary>Creates a new AudioFramework</summary>
        /// <param name="afd">Required initialization data from a ConfigFile interpreter.</param>
        internal AudioFramework(AudioFrameworkData afd, IPlayerConnection audioBackEnd, PlaylistManager playlistMgr)
        {
            if (audioBackEnd == null)
            {
                throw new ArgumentNullException(nameof(audioBackEnd));
            }

            if (audioBackEnd.SupportsEndCallback)
            {
                audioBackEnd.OnSongEnd += (s, e) => OnSongEnd();
            }
            else
            {
                waitEndTick = TickPool.RegisterTick(NotifyEnd, SongEndTimeoutInterval, false);
            }

            audioFrameworkData = afd;
            playerConnection   = audioBackEnd;
            playerConnection.Initialize();

            PlaylistManager = playlistMgr;
        }
		// Audioframework

		/// <summary>Creates a new AudioFramework</summary>
		/// <param name="afd">Required initialization data from a ConfigFile interpreter.</param>
		internal AudioFramework(AudioFrameworkData afd, IPlayerConnection audioBackEnd, PlaylistManager playlistMgr)
		{
			if (audioBackEnd == null)
				throw new ArgumentNullException(nameof(audioBackEnd));

			if (audioBackEnd.SupportsEndCallback)
				audioBackEnd.OnSongEnd += (s, e) => OnSongEnd();
			else
				waitEndTick = TickPool.RegisterTick(NotifyEnd, SongEndTimeoutInterval, false);

			audioFrameworkData = afd;
			playerConnection = audioBackEnd;
			playerConnection.Initialize();

			PlaylistManager = playlistMgr;
		}