1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-02 01:44:25 +01:00

Factor ControlToolBar::OnRecord...

... pulling out the function that chooses existing tracks for append-record,
and a function that does the recording once tracks are chosen.
This commit is contained in:
Paul Licameli
2018-05-28 14:38:37 -04:00
parent c7f97e7730
commit f52b53fc50
2 changed files with 151 additions and 114 deletions

View File

@@ -51,6 +51,9 @@ class ControlToolBar final : public ToolBar {
void UpdatePrefs() override;
void OnKeyEvent(wxKeyEvent & event);
// Find suitable tracks to record into, or return an empty array.
WaveTrackArray ChooseExistingRecordingTracks(AudacityProject &proj, bool selectedOnly);
// msmeyer: These are public, but it's far better to
// call the "real" interface functions like PlayCurrentRegion() and
// StopPlaying() which are defined below.
@@ -58,6 +61,7 @@ class ControlToolBar final : public ToolBar {
void OnPlay(wxCommandEvent & evt);
void OnStop(wxCommandEvent & evt);
void OnRecord(wxCommandEvent & evt);
bool DoRecord(AudacityProject &project, WaveTrackArray &existingTracks, double t0, double t1);
void OnFF(wxCommandEvent & evt);
void OnPause(wxCommandEvent & evt);