mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 16:48:44 +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();
|
double GetStreamTime();
|
||||||
|
|
||||||
sampleFormat GetCaptureFormat() { return mCaptureFormat; }
|
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
|
/** \brief Array of common audio sample rates
|
||||||
*
|
*
|
||||||
|
@ -857,8 +857,22 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
|
|||||||
mRecord->ClearDoubleClicked();
|
mRecord->ClearDoubleClicked();
|
||||||
|
|
||||||
if (doubleClicked) {
|
if (doubleClicked) {
|
||||||
GetActiveProject()->GetPlaybackScroller().Activate
|
// Display a fixed recording head while scrolling the waves continuously.
|
||||||
(AudacityProject::PlaybackScroller::Mode::Right);
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user