mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Merge branch 'master' into refactor
This commit is contained in:
commit
a3aa1fe630
@ -336,7 +336,7 @@ float Envelope::ValueOfPixel( int y, int height, bool upper, bool dB,
|
|||||||
// TODO: Cache the gPrefs value. Reading it every time is inefficient.
|
// TODO: Cache the gPrefs value. Reading it every time is inefficient.
|
||||||
dBRange = gPrefs->Read(wxT("/GUI/EnvdBRange"), ENV_DB_RANGE);
|
dBRange = gPrefs->Read(wxT("/GUI/EnvdBRange"), ENV_DB_RANGE);
|
||||||
|
|
||||||
float v = ::ValueOfPixel(y, height, mContourOffset, dB, dBRange, zoomMin, zoomMax);
|
float v = ::ValueOfPixel(y, height, 0 != mContourOffset, dB, dBRange, zoomMin, zoomMax);
|
||||||
|
|
||||||
// MB: this is mostly equivalent to what the old code did, I'm not sure
|
// MB: this is mostly equivalent to what the old code did, I'm not sure
|
||||||
// if anything special is needed for asymmetric ranges
|
// if anything special is needed for asymmetric ranges
|
||||||
@ -1413,7 +1413,7 @@ double Envelope::SolveIntegralOfInverse( double t0, double area )
|
|||||||
if(area == 0.0)
|
if(area == 0.0)
|
||||||
return t0;
|
return t0;
|
||||||
|
|
||||||
unsigned int count = mEnv.Count();
|
int count = mEnv.Count();
|
||||||
if(count == 0) // 'empty' envelope
|
if(count == 0) // 'empty' envelope
|
||||||
return t0 + area * mDefaultValue;
|
return t0 + area * mDefaultValue;
|
||||||
|
|
||||||
|
@ -172,14 +172,14 @@
|
|||||||
// Paul Licameli (PRL) 16 Apr 2015
|
// Paul Licameli (PRL) 16 Apr 2015
|
||||||
// Support for scrubbing in the AudioIO engine, without calls to it
|
// Support for scrubbing in the AudioIO engine, without calls to it
|
||||||
#define EXPERIMENTAL_SCRUBBING_SUPPORT
|
#define EXPERIMENTAL_SCRUBBING_SUPPORT
|
||||||
|
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
|
||||||
// The following enable parts of the scrubbing user interface.
|
// The following enable parts of the scrubbing user interface.
|
||||||
// You must define EXPERIMENTAL_SCRUBBING_SUPPORT if you enable this:
|
#define EXPERIMENTAL_SCRUBBING_BASIC
|
||||||
#define EXPERIMENTAL_SCRUBBING_BASIC
|
#ifdef EXPERIMENTAL_SCRUBBING_BASIC
|
||||||
// You must define EXPERIMENTAL_SCRUBBING_BASIC if you enable this:
|
#define EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL
|
||||||
#define EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL
|
#define EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL
|
||||||
// You must define EXPERIMENTAL_SCRUBBING_BASIC if you enable this:
|
#endif
|
||||||
#define EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL
|
#endif
|
||||||
|
|
||||||
// Paul Licameli (PRL) 24 May 2015
|
// Paul Licameli (PRL) 24 May 2015
|
||||||
// Allow scrolling up to one half of a screenful beyond either end of the project,
|
// Allow scrolling up to one half of a screenful beyond either end of the project,
|
||||||
|
@ -122,7 +122,7 @@ public:
|
|||||||
// or child.
|
// or child.
|
||||||
virtual wxAccStatus GetValue( int childId, wxString *strValue );
|
virtual wxAccStatus GetValue( int childId, wxString *strValue );
|
||||||
|
|
||||||
void SetSelected( int item );
|
void SetSelected( int item, bool focused = true );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxListCtrl *mParent;
|
wxListCtrl *mParent;
|
||||||
@ -140,7 +140,7 @@ CheckListAx::~CheckListAx()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckListAx::SetSelected( int item )
|
void CheckListAx::SetSelected( int item, bool focused )
|
||||||
{
|
{
|
||||||
if (mLastId != -1)
|
if (mLastId != -1)
|
||||||
{
|
{
|
||||||
@ -153,10 +153,13 @@ void CheckListAx::SetSelected( int item )
|
|||||||
|
|
||||||
if (item != -1)
|
if (item != -1)
|
||||||
{
|
{
|
||||||
NotifyEvent( wxACC_EVENT_OBJECT_FOCUS,
|
if (focused)
|
||||||
mParent,
|
{
|
||||||
wxOBJID_CLIENT,
|
NotifyEvent( wxACC_EVENT_OBJECT_FOCUS,
|
||||||
item + 1 );
|
mParent,
|
||||||
|
wxOBJID_CLIENT,
|
||||||
|
item + 1 );
|
||||||
|
}
|
||||||
|
|
||||||
NotifyEvent( wxACC_EVENT_OBJECT_SELECTION,
|
NotifyEvent( wxACC_EVENT_OBJECT_SELECTION,
|
||||||
mParent,
|
mParent,
|
||||||
@ -473,14 +476,13 @@ END_EVENT_TABLE()
|
|||||||
PluginRegistrationDialog::PluginRegistrationDialog(wxWindow *parent, EffectType type)
|
PluginRegistrationDialog::PluginRegistrationDialog(wxWindow *parent, EffectType type)
|
||||||
: wxDialog(parent,
|
: wxDialog(parent,
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
_("Plug-in Manager: Effects"),
|
_("Plug-in Manager: Effects, Generators and Analyzers"),
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
{
|
{
|
||||||
mType = type;
|
mType = type;
|
||||||
mEffects = NULL;
|
mEffects = NULL;
|
||||||
SetLabel(_("Plug-in Manager: Effects")); // Provide visual label
|
SetName(GetTitle());
|
||||||
SetName(_("Plug-in Manager: Effects")); // Provide audible label
|
|
||||||
|
|
||||||
mStates.SetCount(STATE_COUNT);
|
mStates.SetCount(STATE_COUNT);
|
||||||
mStates[STATE_Enabled] = _("Enabled");
|
mStates[STATE_Enabled] = _("Enabled");
|
||||||
@ -747,7 +749,7 @@ void PluginRegistrationDialog::RegenerateEffectsList(int filter)
|
|||||||
// mEffects->SetFocus();
|
// mEffects->SetFocus();
|
||||||
mEffects->SetItemState(0, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED);
|
mEffects->SetItemState(0, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED);
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if wxUSE_ACCESSIBILITY
|
||||||
mAx->SetSelected(0);
|
mAx->SetSelected(0, false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1343,14 +1345,17 @@ void PluginDescriptor::SetImporterExtensions(const wxArrayString & extensions)
|
|||||||
//
|
//
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
bool PluginManager::IsPluginRegistered(const PluginID & ID)
|
bool PluginManager::IsPluginRegistered(const wxString & path)
|
||||||
{
|
{
|
||||||
if (mPlugins.find(ID) == mPlugins.end())
|
for (PluginMap::iterator iter = mPlugins.begin(); iter != mPlugins.end(); ++iter)
|
||||||
{
|
{
|
||||||
return false;
|
if (iter->second.GetPath().IsSameAs(path))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PluginID & PluginManager::RegisterPlugin(ModuleInterface *module)
|
const PluginID & PluginManager::RegisterPlugin(ModuleInterface *module)
|
||||||
|
@ -172,7 +172,7 @@ public:
|
|||||||
|
|
||||||
// PluginManagerInterface implementation
|
// PluginManagerInterface implementation
|
||||||
|
|
||||||
virtual bool IsPluginRegistered(const PluginID & ID);
|
virtual bool IsPluginRegistered(const wxString & path);
|
||||||
|
|
||||||
virtual const PluginID & RegisterPlugin(ModuleInterface *module);
|
virtual const PluginID & RegisterPlugin(ModuleInterface *module);
|
||||||
virtual const PluginID & RegisterPlugin(ModuleInterface *provider, EffectIdentInterface *effect);
|
virtual const PluginID & RegisterPlugin(ModuleInterface *provider, EffectIdentInterface *effect);
|
||||||
|
@ -50,6 +50,7 @@ scroll information. It also has some status flags.
|
|||||||
*//*******************************************************************/
|
*//*******************************************************************/
|
||||||
|
|
||||||
#include "Audacity.h"
|
#include "Audacity.h"
|
||||||
|
#include "Project.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -90,8 +91,6 @@ scroll information. It also has some status flags.
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Project.h"
|
|
||||||
|
|
||||||
#include "FreqWindow.h"
|
#include "FreqWindow.h"
|
||||||
#include "effects/Contrast.h"
|
#include "effects/Contrast.h"
|
||||||
#include "AutoRecovery.h"
|
#include "AutoRecovery.h"
|
||||||
@ -1021,7 +1020,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
|||||||
|
|
||||||
mTrackFactory = new TrackFactory(mDirManager);
|
mTrackFactory = new TrackFactory(mDirManager);
|
||||||
|
|
||||||
int widths[] = {0, GetControlToolBar()->WidthForStatusBar(mStatusBar), -2, -1};
|
int widths[] = {0, GetControlToolBar()->WidthForStatusBar(mStatusBar), -1, 150};
|
||||||
mStatusBar->SetStatusWidths(4, widths);
|
mStatusBar->SetStatusWidths(4, widths);
|
||||||
wxString msg = wxString::Format(_("Welcome to Audacity version %s"),
|
wxString msg = wxString::Format(_("Welcome to Audacity version %s"),
|
||||||
AUDACITY_VERSION_STRING);
|
AUDACITY_VERSION_STRING);
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include "xml/XMLTagHandler.h"
|
#include "xml/XMLTagHandler.h"
|
||||||
#include "toolbars/SelectionBarListener.h"
|
#include "toolbars/SelectionBarListener.h"
|
||||||
#include "toolbars/SpectralSelectionBarListener.h"
|
#include "toolbars/SpectralSelectionBarListener.h"
|
||||||
#include "widgets/Meter.h"
|
|
||||||
|
|
||||||
#include <wx/defs.h>
|
#include <wx/defs.h>
|
||||||
#include <wx/event.h>
|
#include <wx/event.h>
|
||||||
@ -63,6 +62,7 @@ class EffectPlugs;
|
|||||||
class TrackPanel;
|
class TrackPanel;
|
||||||
class FreqWindow;
|
class FreqWindow;
|
||||||
class ContrastDialog;
|
class ContrastDialog;
|
||||||
|
class Meter;
|
||||||
|
|
||||||
// toolbar classes
|
// toolbar classes
|
||||||
class ControlToolBar;
|
class ControlToolBar;
|
||||||
|
@ -1952,9 +1952,13 @@ void TrackPanel::SetCursorAndTipWhenSelectTool( Track * t,
|
|||||||
// choose boundaries only in snapping tolerance,
|
// choose boundaries only in snapping tolerance,
|
||||||
// and may choose center.
|
// and may choose center.
|
||||||
// But don't change the cursor when scrubbing.
|
// But don't change the cursor when scrubbing.
|
||||||
SelectionBoundary boundary = IsScrubbing()
|
SelectionBoundary boundary =
|
||||||
|
#ifdef EXPERIMENTAL_SCRUBBING_BASIC
|
||||||
|
IsScrubbing()
|
||||||
? SBNone
|
? SBNone
|
||||||
: ChooseBoundary(event, t, r, !bShiftDown, !bShiftDown);
|
:
|
||||||
|
#endif
|
||||||
|
ChooseBoundary(event, t, r, !bShiftDown, !bShiftDown);
|
||||||
|
|
||||||
#ifdef USE_MIDI
|
#ifdef USE_MIDI
|
||||||
// The MIDI HitTest will only succeed if we are on a midi track, so
|
// The MIDI HitTest will only succeed if we are on a midi track, so
|
||||||
@ -6852,6 +6856,7 @@ void TrackPanel::HandleTrackSpecificMouseEvent(wxMouseEvent & event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_SCRUBBING_BASIC
|
||||||
if ((!pTrack ||
|
if ((!pTrack ||
|
||||||
pTrack->GetKind() == Track::Wave) &&
|
pTrack->GetKind() == Track::Wave) &&
|
||||||
IsScrubbing()) {
|
IsScrubbing()) {
|
||||||
@ -6862,6 +6867,7 @@ void TrackPanel::HandleTrackSpecificMouseEvent(wxMouseEvent & event)
|
|||||||
else if (event.LeftIsDown())
|
else if (event.LeftIsDown())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (pTrack && (pTrack->GetKind() == Track::Wave) &&
|
if (pTrack && (pTrack->GetKind() == Track::Wave) &&
|
||||||
(mMouseCapture == IsUncaptured || mMouseCapture == IsOverCutLine ||
|
(mMouseCapture == IsUncaptured || mMouseCapture == IsOverCutLine ||
|
||||||
|
@ -316,7 +316,9 @@ class AUDACITY_DLL_API TrackPanel:public wxPanel {
|
|||||||
);
|
);
|
||||||
bool MaybeStartScrubbing(wxMouseEvent &event);
|
bool MaybeStartScrubbing(wxMouseEvent &event);
|
||||||
bool ContinueScrubbing(wxCoord position, bool hasFocus, bool seek);
|
bool ContinueScrubbing(wxCoord position, bool hasFocus, bool seek);
|
||||||
|
public:
|
||||||
bool StopScrubbing();
|
bool StopScrubbing();
|
||||||
|
protected:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void SelectionHandleClick(wxMouseEvent &event,
|
virtual void SelectionHandleClick(wxMouseEvent &event,
|
||||||
|
@ -964,7 +964,6 @@ void SpecCache::Populate
|
|||||||
// FFT length may be longer than the window of samples that affect results
|
// FFT length may be longer than the window of samples that affect results
|
||||||
// because of zero padding done for increased frequency resolution
|
// because of zero padding done for increased frequency resolution
|
||||||
const int fftLen = windowSize * zeroPaddingFactor;
|
const int fftLen = windowSize * zeroPaddingFactor;
|
||||||
const int padding = (windowSize * (zeroPaddingFactor - 1)) / 2;
|
|
||||||
|
|
||||||
std::vector<float> buffer(
|
std::vector<float> buffer(
|
||||||
#ifdef EXPERIMENTAL_FFT_SKIP_POINTS
|
#ifdef EXPERIMENTAL_FFT_SKIP_POINTS
|
||||||
|
@ -32,7 +32,7 @@ CommandHandler::~CommandHandler()
|
|||||||
delete mCurrentContext;
|
delete mCurrentContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommandHandler::SetProject(AudacityProject *proj)
|
void CommandHandler::SetProject(AudacityProject *)
|
||||||
{
|
{
|
||||||
// TODO: Review if the extend command handling is ever utilized
|
// TODO: Review if the extend command handling is ever utilized
|
||||||
// mCurrentContext->proj = proj;
|
// mCurrentContext->proj = proj;
|
||||||
|
@ -34,7 +34,7 @@ class wxWindow;
|
|||||||
#include "../Internat.h"
|
#include "../Internat.h"
|
||||||
#include "../widgets/ProgressDialog.h"
|
#include "../widgets/ProgressDialog.h"
|
||||||
|
|
||||||
#define BUILTIN_EFFECT_PREFIX wxT("Builtin Effect: ")
|
#define BUILTIN_EFFECT_PREFIX wxT("Built-in Effect: ")
|
||||||
|
|
||||||
class SelectedRegion;
|
class SelectedRegion;
|
||||||
class TimeWarper;
|
class TimeWarper;
|
||||||
|
@ -288,11 +288,11 @@ bool BuiltinEffectsModule::AutoRegisterPlugins(PluginManagerInterface & pm)
|
|||||||
{
|
{
|
||||||
for (size_t i = 0; i < WXSIZEOF(kEffectNames); i++)
|
for (size_t i = 0; i < WXSIZEOF(kEffectNames); i++)
|
||||||
{
|
{
|
||||||
PluginID ID(wxString(BUILTIN_EFFECT_PREFIX) + kEffectNames[i]);
|
wxString path(wxString(BUILTIN_EFFECT_PREFIX) + kEffectNames[i]);
|
||||||
|
|
||||||
if (!pm.IsPluginRegistered(ID))
|
if (!pm.IsPluginRegistered(path))
|
||||||
{
|
{
|
||||||
RegisterPlugin(pm, ID);
|
RegisterPlugin(pm, path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1391,7 +1391,7 @@ void NyquistEffect::Parse(wxString line)
|
|||||||
long v;
|
long v;
|
||||||
// Splits are restored by default. Set to 0 to prevent.
|
// Splits are restored by default. Set to 0 to prevent.
|
||||||
tokens[1].ToLong(&v);
|
tokens[1].ToLong(&v);
|
||||||
mRestoreSplits = v;
|
mRestoreSplits = !!v;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -69,7 +69,7 @@ bool ImportMIDI(wxString fName, NoteTrack * dest)
|
|||||||
Alg_event_ptr evt;
|
Alg_event_ptr evt;
|
||||||
int note_count = 0;
|
int note_count = 0;
|
||||||
int pitch_sum = 0;
|
int pitch_sum = 0;
|
||||||
while ((evt = iterator.next())) {
|
while (NULL != (evt = iterator.next())) {
|
||||||
// if the event is a note
|
// if the event is a note
|
||||||
if (evt->get_type() == 'n') {
|
if (evt->get_type() == 'n') {
|
||||||
Alg_note_ptr note = (Alg_note_ptr) evt;
|
Alg_note_ptr note = (Alg_note_ptr) evt;
|
||||||
|
@ -140,6 +140,9 @@ void LibraryPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
#if !defined(USE_FFMPEG) || defined(DISABLE_DYNAMIC_LOADING_FFMPEG)
|
#if !defined(USE_FFMPEG) || defined(DISABLE_DYNAMIC_LOADING_FFMPEG)
|
||||||
bdwn->Enable(FALSE);
|
bdwn->Enable(FALSE);
|
||||||
bfnd->Enable(FALSE);
|
bfnd->Enable(FALSE);
|
||||||
|
#else
|
||||||
|
// fix compilation warnings about unused variables
|
||||||
|
bfnd, bdwn;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
S.EndTwoColumn();
|
S.EndTwoColumn();
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
#include "../ShuttleGui.h"
|
#include "../ShuttleGui.h"
|
||||||
#include "../FFT.h"
|
#include "../FFT.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
SpectrumPrefs::SpectrumPrefs(wxWindow * parent)
|
SpectrumPrefs::SpectrumPrefs(wxWindow * parent)
|
||||||
: PrefsPanel(parent, _("Spectrograms"))
|
: PrefsPanel(parent, _("Spectrograms"))
|
||||||
{
|
{
|
||||||
|
@ -74,8 +74,9 @@ class SpectrumPrefs:public PrefsPanel
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct SpectrogramSettings
|
class SpectrogramSettings
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
static SpectrogramSettings &defaults();
|
static SpectrogramSettings &defaults();
|
||||||
SpectrogramSettings();
|
SpectrogramSettings();
|
||||||
~SpectrogramSettings();
|
~SpectrogramSettings();
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
|
#include "ToolsToolBar.h"
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
#include <wx/wxprec.h>
|
#include <wx/wxprec.h>
|
||||||
@ -46,12 +47,14 @@
|
|||||||
#include <wx/tooltip.h>
|
#include <wx/tooltip.h>
|
||||||
|
|
||||||
#include "MeterToolBar.h"
|
#include "MeterToolBar.h"
|
||||||
#include "ToolsToolBar.h"
|
|
||||||
|
|
||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
#include "../AllThemeResources.h"
|
#include "../AllThemeResources.h"
|
||||||
#include "../ImageManipulation.h"
|
#include "../ImageManipulation.h"
|
||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
|
#ifdef EXPERIMENTAL_SCRUBBING_BASIC
|
||||||
|
#include "../TrackPanel.h"
|
||||||
|
#endif
|
||||||
#include "../Theme.h"
|
#include "../Theme.h"
|
||||||
#include "../widgets/AButton.h"
|
#include "../widgets/AButton.h"
|
||||||
|
|
||||||
@ -215,6 +218,18 @@ void ToolsToolBar::SetCurrentTool(int tool, bool show)
|
|||||||
//In multi-mode the current tool is shown by the
|
//In multi-mode the current tool is shown by the
|
||||||
//cursor icon. The buttons are not updated.
|
//cursor icon. The buttons are not updated.
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_SCRUBBING_BASIC
|
||||||
|
if (tool != selectTool) {
|
||||||
|
AudacityProject *p = GetActiveProject();
|
||||||
|
if (p) {
|
||||||
|
TrackPanel *tp = p->GetTrackPanel();
|
||||||
|
if (tp) {
|
||||||
|
tp->StopScrubbing();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool leavingMulticlipMode =
|
bool leavingMulticlipMode =
|
||||||
IsDown(multiTool) && show && tool != multiTool;
|
IsDown(multiTool) && show && tool != multiTool;
|
||||||
|
|
||||||
@ -278,6 +293,18 @@ void ToolsToolBar::OnTool(wxCommandEvent & evt)
|
|||||||
else
|
else
|
||||||
mTool[i]->PopUp();
|
mTool[i]->PopUp();
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_SCRUBBING_BASIC
|
||||||
|
if (0 != mCurrentTool) {
|
||||||
|
AudacityProject *p = GetActiveProject();
|
||||||
|
if (p) {
|
||||||
|
TrackPanel *tp = p->GetTrackPanel();
|
||||||
|
if (tp) {
|
||||||
|
tp->StopScrubbing();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
RedrawAllProjects();
|
RedrawAllProjects();
|
||||||
|
|
||||||
gPrefs->Write(wxT("/GUI/ToolBars/Tools/MultiToolActive"),
|
gPrefs->Write(wxT("/GUI/ToolBars/Tools/MultiToolActive"),
|
||||||
|
@ -2232,31 +2232,38 @@ wxAccStatus MeterAx::GetName(int WXUNUSED(childId), wxString* name)
|
|||||||
|
|
||||||
if (m->mMonitoring)
|
if (m->mMonitoring)
|
||||||
{
|
{
|
||||||
*name += wxString::Format(_(" Monitoring "));
|
// translations of strings such as " Monitoring " did not
|
||||||
|
// always retain the leading space. Therefore a space has
|
||||||
|
// been added to ensure at least one space, and stop
|
||||||
|
// words from being merged
|
||||||
|
*name += wxT(" ") + wxString::Format(_(" Monitoring "));
|
||||||
}
|
}
|
||||||
else if (m->mActive)
|
else if (m->mActive)
|
||||||
{
|
{
|
||||||
*name += wxString::Format(_(" Active "));
|
*name += wxT(" ") + wxString::Format(_(" Active "));
|
||||||
}
|
}
|
||||||
|
|
||||||
float peak = 0.;
|
float peak = 0.;
|
||||||
|
bool clipped = false;
|
||||||
for (int i = 0; i < m->mNumBars; i++)
|
for (int i = 0; i < m->mNumBars; i++)
|
||||||
{
|
{
|
||||||
peak = wxMax(peak, m->mBar[i].peakPeakHold);
|
peak = wxMax(peak, m->mBar[i].peakPeakHold);
|
||||||
|
if (m->mBar[i].clipping)
|
||||||
|
clipped = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m->mDB)
|
if (m->mDB)
|
||||||
{
|
{
|
||||||
*name += wxString::Format(_(" Peak %2.f dB"), (peak * m->mDBRange) - m->mDBRange);
|
*name += wxT(" ") + wxString::Format(_(" Peak %2.f dB"), (peak * m->mDBRange) - m->mDBRange);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*name += wxString::Format(_(" Peak %.2f "), peak);
|
*name += wxT(" ") + wxString::Format(_(" Peak %.2f "), peak);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m->IsClipping())
|
if (clipped)
|
||||||
{
|
{
|
||||||
*name += wxString::Format(_(" Clipped "));
|
*name += wxT(" ") + wxString::Format(_(" Clipped "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1677,9 +1677,9 @@ AdornedRulerPanel::AdornedRulerPanel(wxWindow* parent,
|
|||||||
|
|
||||||
mIsRecording = false;
|
mIsRecording = false;
|
||||||
|
|
||||||
mTimelineToolTip = gPrefs->Read(wxT("/QuickPlay/ToolTips"), 1L);
|
mTimelineToolTip = !!gPrefs->Read(wxT("/QuickPlay/ToolTips"), 1L);
|
||||||
mPlayRegionDragsSelection = (gPrefs->Read(wxT("/QuickPlay/DragSelection"), 0L) == 1)? true : false;
|
mPlayRegionDragsSelection = (gPrefs->Read(wxT("/QuickPlay/DragSelection"), 0L) == 1)? true : false;
|
||||||
mQuickPlayEnabled = gPrefs->Read(wxT("/QuickPlay/QuickPlayEnabled"), 1L);
|
mQuickPlayEnabled = !!gPrefs->Read(wxT("/QuickPlay/QuickPlayEnabled"), 1L);
|
||||||
|
|
||||||
UpdatePrefs();
|
UpdatePrefs();
|
||||||
|
|
||||||
@ -2188,7 +2188,7 @@ void AdornedRulerPanel::ShowMenu(const wxPoint & pos)
|
|||||||
DrawQuickPlayIndicator(&cdc, true);
|
DrawQuickPlayIndicator(&cdc, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdornedRulerPanel::OnToggleQuickPlay(wxCommandEvent& evt)
|
void AdornedRulerPanel::OnToggleQuickPlay(wxCommandEvent&)
|
||||||
{
|
{
|
||||||
mQuickPlayEnabled = (mQuickPlayEnabled)? false : true;
|
mQuickPlayEnabled = (mQuickPlayEnabled)? false : true;
|
||||||
gPrefs->Write(wxT("/QuickPlay/QuickPlayEnabled"), mQuickPlayEnabled);
|
gPrefs->Write(wxT("/QuickPlay/QuickPlayEnabled"), mQuickPlayEnabled);
|
||||||
@ -2196,7 +2196,7 @@ void AdornedRulerPanel::OnToggleQuickPlay(wxCommandEvent& evt)
|
|||||||
RegenerateTooltips();
|
RegenerateTooltips();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdornedRulerPanel::OnSyncSelToQuickPlay(wxCommandEvent& evt)
|
void AdornedRulerPanel::OnSyncSelToQuickPlay(wxCommandEvent&)
|
||||||
{
|
{
|
||||||
mPlayRegionDragsSelection = (mPlayRegionDragsSelection)? false : true;
|
mPlayRegionDragsSelection = (mPlayRegionDragsSelection)? false : true;
|
||||||
gPrefs->Write(wxT("/QuickPlay/DragSelection"), mPlayRegionDragsSelection);
|
gPrefs->Write(wxT("/QuickPlay/DragSelection"), mPlayRegionDragsSelection);
|
||||||
@ -2233,7 +2233,7 @@ void AdornedRulerPanel::HandleSnapping()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AdornedRulerPanel::OnTimelineToolTips(wxCommandEvent& evt)
|
void AdornedRulerPanel::OnTimelineToolTips(wxCommandEvent&)
|
||||||
{
|
{
|
||||||
mTimelineToolTip = (mTimelineToolTip)? false : true;
|
mTimelineToolTip = (mTimelineToolTip)? false : true;
|
||||||
gPrefs->Write(wxT("/QuickPlay/ToolTips"), mTimelineToolTip);
|
gPrefs->Write(wxT("/QuickPlay/ToolTips"), mTimelineToolTip);
|
||||||
@ -2244,7 +2244,7 @@ void AdornedRulerPanel::OnTimelineToolTips(wxCommandEvent& evt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AdornedRulerPanel::OnAutoScroll(wxCommandEvent& evt)
|
void AdornedRulerPanel::OnAutoScroll(wxCommandEvent&)
|
||||||
{
|
{
|
||||||
if (mViewInfo->bUpdateTrackIndicator)
|
if (mViewInfo->bUpdateTrackIndicator)
|
||||||
gPrefs->Write(wxT("/GUI/AutoScroll"), false);
|
gPrefs->Write(wxT("/GUI/AutoScroll"), false);
|
||||||
@ -2255,7 +2255,7 @@ void AdornedRulerPanel::OnAutoScroll(wxCommandEvent& evt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AdornedRulerPanel::OnLockPlayRegion(wxCommandEvent& evt)
|
void AdornedRulerPanel::OnLockPlayRegion(wxCommandEvent&)
|
||||||
{
|
{
|
||||||
if (mProject->IsPlayRegionLocked())
|
if (mProject->IsPlayRegionLocked())
|
||||||
mProject->OnUnlockPlayRegion();
|
mProject->OnUnlockPlayRegion();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user