mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-26 00:58:37 +02:00
Double-click record with overdub pins record head center not right
This commit is contained in:
parent
cf28490c83
commit
e1f4ab6af6
@ -382,7 +382,8 @@ class AUDACITY_DLL_API AudioIO final {
|
||||
double GetStreamTime();
|
||||
|
||||
sampleFormat GetCaptureFormat() { return mCaptureFormat; }
|
||||
int GetNumCaptureChannels() { return mNumCaptureChannels; }
|
||||
int GetNumPlaybackChannels() const { return mNumPlaybackChannels; }
|
||||
int GetNumCaptureChannels() const { return mNumCaptureChannels; }
|
||||
|
||||
/** \brief Array of common audio sample rates
|
||||
*
|
||||
|
@ -857,8 +857,22 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
|
||||
mRecord->ClearDoubleClicked();
|
||||
|
||||
if (doubleClicked) {
|
||||
GetActiveProject()->GetPlaybackScroller().Activate
|
||||
(AudacityProject::PlaybackScroller::Mode::Right);
|
||||
// Display a fixed recording head while scrolling the waves continuously.
|
||||
// If you overdub, you may want to anticipate some context in existing tracks,
|
||||
// so center the head. If not, put it rightmost to display as much wave as we can.
|
||||
const auto project = GetActiveProject();
|
||||
bool duplex;
|
||||
gPrefs->Read(wxT("/AudioIO/Duplex"), &duplex, true);
|
||||
|
||||
if (duplex) {
|
||||
// See if there is really anything being overdubbed
|
||||
if (gAudioIO->GetNumPlaybackChannels() == 0)
|
||||
// No.
|
||||
duplex = false;
|
||||
}
|
||||
|
||||
using Mode = AudacityProject::PlaybackScroller::Mode;
|
||||
project->GetPlaybackScroller().Activate(duplex ? Mode::Centered : Mode::Right);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user