public RecordingHost(ISettingProvider settingProvider, SpotifyProcessManager spotifyProcessManager, Logger logger) { this.SettingProvider = settingProvider; this._spotifyProcessManager = spotifyProcessManager; this._logger = logger; }
public RecordingSession(string tempFolder, SpotifyProcessManager spotifyProcessManager, SongClassificationInfo songClassificationInfo, int songRefreshInterval, Logger logger) { this._groupRecordings = new List <SongGroupRecorder>(); this.GroupRecordings = this._groupRecordings.AsReadOnly(); this.TempFolder = tempFolder; this.SpotifyProcessManager = spotifyProcessManager; this.SongClassificationInfo = songClassificationInfo; this.SongRefreshInterval = songRefreshInterval; this._logger = logger; _logger.Log("Starting new recording session."); StartNewGroupRecording(); }
public PlayerTabController(SettingsHost settingsHost, SpotifyProcessManager spotifyProcessManager, Logger logger) { this.SettingsHost = settingsHost; this.SpotifyProcessManager = spotifyProcessManager; this.Logger = logger; this.SpotifyController = new SpotifyController(spotifyProcessManager); this.SongTracker = new SongTracker( spotifyProcessManager, settingsHost.SongClassificationInfo, settingsHost.SongRefreshInterval, logger, maxSongs: 11 //Minimum suported non-infinite value //There's no need to store songs for the player, just get notified when they change ); this.SongTracker.StartTracking(); }
// private bool _splittingCompleted = false; // /// <summary> // /// False until everything, including asynchronously splitting the recording into songs, has been completed // /// </summary> // public bool SplittingCompleted { // get { lock (_lock) return _splittingCompleted; } // } // private object _lock = new object(); public SongGroupRecorder(string tempFolder, SpotifyProcessManager spotifyProcessManager, SongClassificationInfo songClassificationInfo, int songRefreshInterval, Logger logger) { this.TempFolder = tempFolder; this.GroupID = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss.ffff"); this._logger = logger; _logger.Log("Starting new song group with ID '" + this.GroupID + "'."); _songTracker = new SongTracker(spotifyProcessManager, songClassificationInfo, songRefreshInterval, _logger); _audioRecorder = new AudioRecorder(tempFolder, $"Temp Group '{this.GroupID}'"); _logger.Log("Audio recorder created & automatically started", LogType.MinorMessage); RecordingStartTime = DateTime.Now; _songTracker.SongChanged += this.OnSongChanged; _songTracker.StartTracking(); _logger.Log("Successfully started new song group with ID '" + this.GroupID + "'.", LogType.MinorMessage); }
public RecordingTabController(SettingsHost settingsHost, SpotifyProcessManager spotifyProcessManager, Logger logger) { this.SettingsHost = settingsHost; this.SpotifyProcessManager = spotifyProcessManager; this.Logger = logger; this.RecordingHost = new RecordingHost(settingsHost, spotifyProcessManager, logger); this.SongGroupSplitterHost = new SongGroupSplitterHost(settingsHost, logger); this.SongConversionHost = new SongConversionHost(settingsHost, logger); this.RecordingHost.GroupFinished += (sender, e) => { this.SongGroupSplitterHost.Enqueue(sender.RecordedGroup); }; this.SongGroupSplitterHost.SongGroupSplit += (sender, e) => { this.SongConversionHost.EnqueueAll(e.Splitter.CompletedSongs); }; }