Ejemplo n.º 1
0
        public void Record(Song song)
        {
            if (song == null)
            {
                throw new ArgumentNullException(nameof(song));
            }

            lock (Graph)
            {
                if (IsGraphStarted)
                {
                    throw new Exception("Graph is already running");
                }
            }

            Song = song;
            var track = song.AddTrack();

            RecordingTrack = track;
            Song.SetPosition(0);

            SetAudioStatus(AudioStatus.Recording);
        }