1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-17 00:57:40 +02:00

Merge branch 'master' into scrubbing

This commit is contained in:
Paul-Licameli 2015-04-21 17:50:59 -04:00
commit a3f564bf98
118 changed files with 11304 additions and 863 deletions

@ -259,12 +259,14 @@ public:
{ {
val.Replace(wxT("\\"), wxT("\\\\"), true); val.Replace(wxT("\\"), wxT("\\\\"), true);
val.Replace(wxT("\""), wxT("\\\""), true); val.Replace(wxT("\""), wxT("\\\""), true);
val.Replace(wxT("\n"), wxT("\\n"), true);
return val; return val;
} }
wxString Unescape(wxString val) wxString Unescape(wxString val)
{ {
val.Replace(wxT("\\n"), wxT("\n"), true);
val.Replace(wxT("\\\""), wxT("\""), true); val.Replace(wxT("\\\""), wxT("\""), true);
val.Replace(wxT("\\\\"), wxT("\\"), true); val.Replace(wxT("\\\\"), wxT("\\"), true);

@ -93,8 +93,8 @@ public:
virtual ~EffectHostInterface() {}; virtual ~EffectHostInterface() {};
virtual double GetDefaultDuration() = 0; virtual double GetDefaultDuration() = 0;
virtual double GetDuration() = 0; virtual double GetDuration(bool *isSelection = NULL) = 0;
virtual bool SetDuration(double seconds) = 0; virtual void SetDuration(double seconds) = 0;
virtual bool Apply() = 0; virtual bool Apply() = 0;
virtual void Preview() = 0; virtual void Preview() = 0;

@ -8,7 +8,7 @@ subdir = po
top_builddir = .. top_builddir = ..
# These options get passed to xgettext. # These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=wxTRANSLATE XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=XO
# This is the copyright holder that gets inserted into the header of the # This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding

@ -23,6 +23,7 @@ src/AudacityLogger.cpp
src/AudacityLogger.h src/AudacityLogger.h
src/AudioIO.cpp src/AudioIO.cpp
src/AudioIO.h src/AudioIO.h
src/AudioIOListener.h
src/AutoRecovery.cpp src/AutoRecovery.cpp
src/AutoRecovery.h src/AutoRecovery.h
src/BatchCommandDialog.cpp src/BatchCommandDialog.cpp
@ -41,8 +42,12 @@ src/CrossFade.cpp
src/CrossFade.h src/CrossFade.h
src/Dependencies.cpp src/Dependencies.cpp
src/Dependencies.h src/Dependencies.h
src/DeviceChange.cpp
src/DeviceChange.h
src/DeviceManager.cpp src/DeviceManager.cpp
src/DeviceManager.h src/DeviceManager.h
src/Diags.cpp
src/Diags.h
src/DirManager.cpp src/DirManager.cpp
src/DirManager.h src/DirManager.h
src/Dither.cpp src/Dither.cpp
@ -121,12 +126,14 @@ src/RealFFTf48x.cpp
src/RealFFTf48x.h src/RealFFTf48x.h
src/Resample.cpp src/Resample.cpp
src/Resample.h src/Resample.h
src/RevisionIdent.h
src/RingBuffer.cpp src/RingBuffer.cpp
src/RingBuffer.h src/RingBuffer.h
src/SampleFormat.cpp src/SampleFormat.cpp
src/SampleFormat.h src/SampleFormat.h
src/Screenshot.cpp src/Screenshot.cpp
src/Screenshot.h src/Screenshot.h
src/SelectedRegion.cpp
src/SelectedRegion.h src/SelectedRegion.h
src/Sequence.cpp src/Sequence.cpp
src/Sequence.h src/Sequence.h
@ -168,6 +175,7 @@ src/TrackPanelAx.h
src/TrackPanelListener.h src/TrackPanelListener.h
src/UndoManager.cpp src/UndoManager.cpp
src/UndoManager.h src/UndoManager.h
src/ViewInfo.cpp
src/ViewInfo.h src/ViewInfo.h
src/VoiceKey.cpp src/VoiceKey.cpp
src/VoiceKey.h src/VoiceKey.h
@ -343,6 +351,7 @@ src/effects/VST/VSTEffect.h
src/effects/VST/aeffectx.h src/effects/VST/aeffectx.h
src/effects/Wahwah.cpp src/effects/Wahwah.cpp
src/effects/Wahwah.h src/effects/Wahwah.h
src/effects/audiounits/AudioUnitCocoaHelper.h
src/effects/audiounits/AudioUnitEffect.cpp src/effects/audiounits/AudioUnitEffect.cpp
src/effects/audiounits/AudioUnitEffect.h src/effects/audiounits/AudioUnitEffect.h
src/effects/ladspa/LadspaEffect.cpp src/effects/ladspa/LadspaEffect.cpp

@ -864,6 +864,7 @@
28884971131B6CF600B59735 /* vi.po in Sources */ = {isa = PBXBuildFile; fileRef = 28884940131B6CF600B59735 /* vi.po */; }; 28884971131B6CF600B59735 /* vi.po in Sources */ = {isa = PBXBuildFile; fileRef = 28884940131B6CF600B59735 /* vi.po */; };
28884972131B6CF600B59735 /* zh_TW.po in Sources */ = {isa = PBXBuildFile; fileRef = 28884941131B6CF600B59735 /* zh_TW.po */; }; 28884972131B6CF600B59735 /* zh_TW.po in Sources */ = {isa = PBXBuildFile; fileRef = 28884941131B6CF600B59735 /* zh_TW.po */; };
28884973131B6CF600B59735 /* zh.po in Sources */ = {isa = PBXBuildFile; fileRef = 28884942131B6CF600B59735 /* zh.po */; }; 28884973131B6CF600B59735 /* zh.po in Sources */ = {isa = PBXBuildFile; fileRef = 28884942131B6CF600B59735 /* zh.po */; };
2888A1631AE25F9A00E06FDC /* Diags.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2888A1611AE25F9A00E06FDC /* Diags.cpp */; };
288A544B1346D1BA0050D774 /* chanmap.c in Sources */ = {isa = PBXBuildFile; fileRef = 288A54481346D1BA0050D774 /* chanmap.c */; }; 288A544B1346D1BA0050D774 /* chanmap.c in Sources */ = {isa = PBXBuildFile; fileRef = 288A54481346D1BA0050D774 /* chanmap.c */; };
288A544C1346D1BA0050D774 /* chanmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 288A54491346D1BA0050D774 /* chanmap.h */; }; 288A544C1346D1BA0050D774 /* chanmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 288A54491346D1BA0050D774 /* chanmap.h */; };
288A544D1346D1BA0050D774 /* id3.c in Sources */ = {isa = PBXBuildFile; fileRef = 288A544A1346D1BA0050D774 /* id3.c */; }; 288A544D1346D1BA0050D774 /* id3.c in Sources */ = {isa = PBXBuildFile; fileRef = 288A544A1346D1BA0050D774 /* id3.c */; };
@ -936,6 +937,7 @@
28DA07390E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DA07380E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp */; }; 28DA07390E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DA07380E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp */; };
28DABFBE0FF19DB100AC7848 /* RealFFTf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DABFBC0FF19DB100AC7848 /* RealFFTf.cpp */; }; 28DABFBE0FF19DB100AC7848 /* RealFFTf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DABFBC0FF19DB100AC7848 /* RealFFTf.cpp */; };
28DB34790FDC2C5D0011F589 /* ResponseQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DB34780FDC2C5D0011F589 /* ResponseQueue.cpp */; }; 28DB34790FDC2C5D0011F589 /* ResponseQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DB34780FDC2C5D0011F589 /* ResponseQueue.cpp */; };
28DDE3A21AE3771100C784FE /* ViewInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DDE3A11AE3771100C784FE /* ViewInfo.cpp */; };
28DE72AE10388583007E18EC /* PreferenceCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DE72AA10388583007E18EC /* PreferenceCommands.cpp */; }; 28DE72AE10388583007E18EC /* PreferenceCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DE72AA10388583007E18EC /* PreferenceCommands.cpp */; };
28DE72AF10388583007E18EC /* SetTrackInfoCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DE72AC10388583007E18EC /* SetTrackInfoCommand.cpp */; }; 28DE72AF10388583007E18EC /* SetTrackInfoCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DE72AC10388583007E18EC /* SetTrackInfoCommand.cpp */; };
28DE72B2103885AA007E18EC /* TimeWarper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DE72B0103885AA007E18EC /* TimeWarper.cpp */; }; 28DE72B2103885AA007E18EC /* TimeWarper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DE72B0103885AA007E18EC /* TimeWarper.cpp */; };
@ -2584,6 +2586,8 @@
28884940131B6CF600B59735 /* vi.po */ = {isa = PBXFileReference; explicitFileType = sourcecode; fileEncoding = 5; name = vi.po; path = ../locale/vi.po; sourceTree = SOURCE_ROOT; }; 28884940131B6CF600B59735 /* vi.po */ = {isa = PBXFileReference; explicitFileType = sourcecode; fileEncoding = 5; name = vi.po; path = ../locale/vi.po; sourceTree = SOURCE_ROOT; };
28884941131B6CF600B59735 /* zh_TW.po */ = {isa = PBXFileReference; explicitFileType = sourcecode; fileEncoding = 5; name = zh_TW.po; path = ../locale/zh_TW.po; sourceTree = SOURCE_ROOT; }; 28884941131B6CF600B59735 /* zh_TW.po */ = {isa = PBXFileReference; explicitFileType = sourcecode; fileEncoding = 5; name = zh_TW.po; path = ../locale/zh_TW.po; sourceTree = SOURCE_ROOT; };
28884942131B6CF600B59735 /* zh.po */ = {isa = PBXFileReference; explicitFileType = sourcecode; fileEncoding = 5; name = zh.po; path = ../locale/zh.po; sourceTree = SOURCE_ROOT; }; 28884942131B6CF600B59735 /* zh.po */ = {isa = PBXFileReference; explicitFileType = sourcecode; fileEncoding = 5; name = zh.po; path = ../locale/zh.po; sourceTree = SOURCE_ROOT; };
2888A1611AE25F9A00E06FDC /* Diags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Diags.cpp; sourceTree = "<group>"; };
2888A1621AE25F9A00E06FDC /* Diags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Diags.h; sourceTree = "<group>"; };
288A54481346D1BA0050D774 /* chanmap.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = chanmap.c; sourceTree = "<group>"; }; 288A54481346D1BA0050D774 /* chanmap.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = chanmap.c; sourceTree = "<group>"; };
288A54491346D1BA0050D774 /* chanmap.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = chanmap.h; sourceTree = "<group>"; }; 288A54491346D1BA0050D774 /* chanmap.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = chanmap.h; sourceTree = "<group>"; };
288A544A1346D1BA0050D774 /* id3.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = id3.c; sourceTree = "<group>"; }; 288A544A1346D1BA0050D774 /* id3.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = id3.c; sourceTree = "<group>"; };
@ -2695,6 +2699,7 @@
28DABFBD0FF19DB100AC7848 /* RealFFTf.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = RealFFTf.h; sourceTree = "<group>"; tabWidth = 3; }; 28DABFBD0FF19DB100AC7848 /* RealFFTf.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = RealFFTf.h; sourceTree = "<group>"; tabWidth = 3; };
28DB34770FDC2C5D0011F589 /* ResponseQueue.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ResponseQueue.h; sourceTree = "<group>"; tabWidth = 3; }; 28DB34770FDC2C5D0011F589 /* ResponseQueue.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ResponseQueue.h; sourceTree = "<group>"; tabWidth = 3; };
28DB34780FDC2C5D0011F589 /* ResponseQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ResponseQueue.cpp; sourceTree = "<group>"; tabWidth = 3; }; 28DB34780FDC2C5D0011F589 /* ResponseQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ResponseQueue.cpp; sourceTree = "<group>"; tabWidth = 3; };
28DDE3A11AE3771100C784FE /* ViewInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewInfo.cpp; sourceTree = "<group>"; };
28DE72AA10388583007E18EC /* PreferenceCommands.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = PreferenceCommands.cpp; sourceTree = "<group>"; tabWidth = 3; }; 28DE72AA10388583007E18EC /* PreferenceCommands.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = PreferenceCommands.cpp; sourceTree = "<group>"; tabWidth = 3; };
28DE72AB10388583007E18EC /* PreferenceCommands.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = PreferenceCommands.h; sourceTree = "<group>"; tabWidth = 3; }; 28DE72AB10388583007E18EC /* PreferenceCommands.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = PreferenceCommands.h; sourceTree = "<group>"; tabWidth = 3; };
28DE72AC10388583007E18EC /* SetTrackInfoCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = SetTrackInfoCommand.cpp; sourceTree = "<group>"; tabWidth = 3; }; 28DE72AC10388583007E18EC /* SetTrackInfoCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = SetTrackInfoCommand.cpp; sourceTree = "<group>"; tabWidth = 3; };
@ -3869,6 +3874,8 @@
28D000A41A32920C00367B21 /* DeviceChange.h */, 28D000A41A32920C00367B21 /* DeviceChange.h */,
8484F31213086237002DF7F0 /* DeviceManager.cpp */, 8484F31213086237002DF7F0 /* DeviceManager.cpp */,
8484F31313086237002DF7F0 /* DeviceManager.h */, 8484F31313086237002DF7F0 /* DeviceManager.h */,
2888A1611AE25F9A00E06FDC /* Diags.cpp */,
2888A1621AE25F9A00E06FDC /* Diags.h */,
1790AFF709883BFD008A330A /* DirManager.cpp */, 1790AFF709883BFD008A330A /* DirManager.cpp */,
1790AFF809883BFD008A330A /* DirManager.h */, 1790AFF809883BFD008A330A /* DirManager.h */,
1790AFF909883BFD008A330A /* Dither.cpp */, 1790AFF909883BFD008A330A /* Dither.cpp */,
@ -3997,6 +4004,7 @@
2803C8B619F35AA000278526 /* TrackPanelListener.h */, 2803C8B619F35AA000278526 /* TrackPanelListener.h */,
1790B0F209883BFD008A330A /* UndoManager.cpp */, 1790B0F209883BFD008A330A /* UndoManager.cpp */,
1790B0F309883BFD008A330A /* UndoManager.h */, 1790B0F309883BFD008A330A /* UndoManager.h */,
28DDE3A11AE3771100C784FE /* ViewInfo.cpp */,
1790B0F609883BFD008A330A /* ViewInfo.h */, 1790B0F609883BFD008A330A /* ViewInfo.h */,
1790B0F709883BFD008A330A /* VoiceKey.cpp */, 1790B0F709883BFD008A330A /* VoiceKey.cpp */,
1790B0F809883BFD008A330A /* VoiceKey.h */, 1790B0F809883BFD008A330A /* VoiceKey.h */,
@ -7646,6 +7654,8 @@
28285C801A27A81600BC2205 /* AudioUnitCocoaHelper.mm in Sources */, 28285C801A27A81600BC2205 /* AudioUnitCocoaHelper.mm in Sources */,
28D000A51A32920C00367B21 /* DeviceChange.cpp in Sources */, 28D000A51A32920C00367B21 /* DeviceChange.cpp in Sources */,
28D8425C1AD8D69D00551353 /* SelectedRegion.cpp in Sources */, 28D8425C1AD8D69D00551353 /* SelectedRegion.cpp in Sources */,
2888A1631AE25F9A00E06FDC /* Diags.cpp in Sources */,
28DDE3A21AE3771100C784FE /* ViewInfo.cpp in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };

@ -0,0 +1,20 @@
At this time, the newest SDK version that Audacity can build with
is 10.6. To build Audacity using Xcode 5.1 or newer, you need
to extract the 10.6 SDK from an earlier version of Xcode.
In the instructions below, Xcode 4.3.3 (for the 10.6 SDK) and
Xcode 5.1.1 will be used. Xcode 6.1.1 and 6.3 have been verified
to work as well.
1) Download Xcode 5.1.1 or greater and install it to /Applications
2) Download Xcode 4.3.3 and open it in Finder
3) Right click the "Xcode.app" bundle and select "Show Package Contents"
4) Navigate down the directories to get to:
Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
5) Copy the MacOSX10.6.sdk folder to:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
That's it. You can now build using the Xcode project in this directory.

File diff suppressed because it is too large Load Diff

@ -155,4 +155,7 @@ void QuitAudacity();
// This macro is used widely, so declared here. // This macro is used widely, so declared here.
#define QUANTIZED_TIME(time, rate) ((double)((sampleCount)floor(((double)(time) * (rate)) + 0.5))) / (rate) #define QUANTIZED_TIME(time, rate) ((double)((sampleCount)floor(((double)(time) * (rate)) + 0.5))) / (rate)
// Marks strings for extraction only...must use wxGetTranslation() to translate.
#define XO(s) wxT(s)
#endif // __AUDACITY_H__ #endif // __AUDACITY_H__

@ -99,6 +99,12 @@ It handles initialization and termination by subclassing wxApp.
#include "import/Import.h" #include "import/Import.h"
#if defined(EXPERIMENTAL_CRASH_REPORT)
#include <wx/debugrpt.h>
#include <wx/evtloop.h>
#include <wx/textdlg.h>
#endif
#ifdef EXPERIMENTAL_SCOREALIGN #ifdef EXPERIMENTAL_SCOREALIGN
#include "effects/ScoreAlignDialog.h" #include "effects/ScoreAlignDialog.h"
#endif #endif
@ -184,6 +190,26 @@ It handles initialization and termination by subclassing wxApp.
# pragma comment(lib, "libvamp") # pragma comment(lib, "libvamp")
# endif # endif
# if defined(__WXDEBUG__)
# define D "d"
# else
# define D ""
# endif
# if wxCHECK_VERSION(3, 1, 0)
# define V "31"
# elif wxCHECK_VERSION(3, 0, 0)
# define V "30"
# else
# define V "28"
# endif
# if defined(EXPERIMENTAL_CRASH_REPORT)
# pragma comment(lib, "wxmsw" V "u" D "_qa")
# endif
# undef V
# undef D
#endif //(__WXMSW__) #endif //(__WXMSW__)
#include "../images/AudacityLogoWithName.xpm" #include "../images/AudacityLogoWithName.xpm"
@ -925,7 +951,9 @@ bool AudacityApp::ShouldShowMissingAliasedFileWarning()
AudacityLogger *AudacityApp::GetLogger() AudacityLogger *AudacityApp::GetLogger()
{ {
return static_cast<AudacityLogger *>(wxLog::GetActiveTarget()); // Use dynamic_cast so that we get a NULL ptr if we haven't yet
// setup our logger.
return dynamic_cast<AudacityLogger *>(wxLog::GetActiveTarget());
} }
void AudacityApp::InitLang( const wxString & lang ) void AudacityApp::InitLang( const wxString & lang )
@ -984,12 +1012,60 @@ void AudacityApp::InitLang( const wxString & lang )
Internat::Init(); Internat::Init();
} }
// Only used when checking plugins
void AudacityApp::OnFatalException() void AudacityApp::OnFatalException()
{ {
#if defined(EXPERIMENTAL_CRASH_REPORT)
GenerateCrashReport(wxDebugReport::Context_Exception);
#endif
exit(-1); exit(-1);
} }
#if defined(EXPERIMENTAL_CRASH_REPORT)
void AudacityApp::GenerateCrashReport(wxDebugReport::Context ctx)
{
wxDebugReportCompress rpt;
rpt.AddAll(ctx);
wxFileName fn(FileNames::DataDir(), wxT("audacity.cfg"));
rpt.AddFile(fn.GetFullPath(), wxT("Audacity Configuration"));
rpt.AddFile(FileNames::PluginRegistry(), wxT("Plugin Registry"));
rpt.AddFile(FileNames::PluginSettings(), wxT("Plugin Settings"));
if (ctx == wxDebugReport::Context_Current)
{
rpt.AddText(wxT("audiodev.txt"), gAudioIO->GetDeviceInfo(), wxT("Audio Device Info"));
}
AudacityLogger *logger = GetLogger();
if (logger)
{
rpt.AddText(wxT("log.txt"), logger->GetLog(), wxT("Audacity Log"));
}
bool ok = wxDebugReportPreviewStd().Show(rpt);
#if defined(__WXMSW__)
wxEventLoop::SetCriticalWindow(NULL);
#endif
if (ok && rpt.Process())
{
wxTextEntryDialog dlg(NULL,
_("Report generated to:"),
_("Audacity Support Data"),
rpt.GetCompressedFileName(),
wxOK | wxCENTER);
dlg.ShowModal();
wxLogMessage(wxT("Report generated to: %s"),
rpt.GetCompressedFileName().c_str());
rpt.Reset();
}
}
#endif
#if defined(__WXGTK__) #if defined(__WXGTK__)
// On wxGTK, there's a focus issue where dialogs do not automatically pass focus // On wxGTK, there's a focus issue where dialogs do not automatically pass focus
// to the first child. This means that you can use the keyboard to navigate within // to the first child. This means that you can use the keyboard to navigate within
@ -1014,6 +1090,15 @@ int AudacityApp::FilterEvent(wxEvent & event)
} }
#endif #endif
AudacityApp::AudacityApp()
{
#if defined(EXPERIMENTAL_CRASH_REPORT)
#if defined(wxUSE_ON_FATAL_EXCEPTION) && wxUSE_ON_FATAL_EXCEPTION
wxHandleFatalExceptions();
#endif
#endif
}
// The `main program' equivalent, creating the windows and returning the // The `main program' equivalent, creating the windows and returning the
// main frame // main frame
bool AudacityApp::OnInit() bool AudacityApp::OnInit()
@ -1291,6 +1376,21 @@ Click the 'Help' button for known issue."),
Sequence::SetMaxDiskBlockSize(lval); Sequence::SetMaxDiskBlockSize(lval);
} }
wxString fileName;
if (parser->Found(wxT("d"), &fileName))
{
AutoSaveFile asf;
if (asf.Decode(fileName))
{
wxPrintf(_("File decoded successfully\n"));
}
else
{
wxPrintf(_("Decoding failed\n"));
}
exit(1);
}
// No Splash screen on wx3 whislt we sort out the problem // No Splash screen on wx3 whislt we sort out the problem
// with showing a dialog AND a splash screen during inits. // with showing a dialog AND a splash screen during inits.
#if !wxCHECK_VERSION(3, 0, 0) #if !wxCHECK_VERSION(3, 0, 0)
@ -1734,6 +1834,10 @@ wxCmdLineParser *AudacityApp::ParseCommandLine()
parser->AddOption(wxT("b"), wxT("blocksize"), _("set max disk block size in bytes"), parser->AddOption(wxT("b"), wxT("blocksize"), _("set max disk block size in bytes"),
wxCMD_LINE_VAL_NUMBER); wxCMD_LINE_VAL_NUMBER);
/*i18n-hint: This decodes an autosave file */
parser->AddOption(wxT("d"), wxT("decode"), _("decode an autosave file"),
wxCMD_LINE_VAL_STRING);
/*i18n-hint: This displays a list of available options */ /*i18n-hint: This displays a list of available options */
parser->AddSwitch(wxT("h"), wxT("help"), _("this help message"), parser->AddSwitch(wxT("h"), wxT("help"), _("this help message"),
wxCMD_LINE_OPTION_HELP); wxCMD_LINE_OPTION_HELP);

@ -31,6 +31,10 @@
#include "ondemand/ODTaskThread.h" #include "ondemand/ODTaskThread.h"
#include "Experimental.h" #include "Experimental.h"
#if defined(EXPERIMENTAL_CRASH_REPORT)
#include <wx/debugrpt.h>
#endif
class IPCServ; class IPCServ;
class Importer; class Importer;
class CommandHandler; class CommandHandler;
@ -98,6 +102,7 @@ class BlockFile;
class AudacityApp:public wxApp { class AudacityApp:public wxApp {
public: public:
AudacityApp();
virtual bool OnInit(void); virtual bool OnInit(void);
void FinishInits(); void FinishInits();
#if wxCHECK_VERSION(3, 0, 0) #if wxCHECK_VERSION(3, 0, 0)
@ -201,6 +206,10 @@ class AudacityApp:public wxApp {
AudacityLogger *GetLogger(); AudacityLogger *GetLogger();
#if defined(EXPERIMENTAL_CRASH_REPORT)
void GenerateCrashReport(wxDebugReport::Context ctx);
#endif
#if defined(__WXGTK__) #if defined(__WXGTK__)
/** \brief This flag is set true when in a keyboard event handler. /** \brief This flag is set true when in a keyboard event handler.
* Used to work around a hang issue with ibus (bug 154) */ * Used to work around a hang issue with ibus (bug 154) */

@ -259,6 +259,13 @@ void AudacityLogger::Show(bool show)
Flush(); Flush();
} }
#if defined(EXPERIMENTAL_CRASH_REPORT)
wxString AudacityLogger::GetLog()
{
return mBuffer;
}
#endif
void AudacityLogger::OnCloseWindow(wxCloseEvent & WXUNUSED(e)) void AudacityLogger::OnCloseWindow(wxCloseEvent & WXUNUSED(e))
{ {
#if defined(__WXMAC__) #if defined(__WXMAC__)

@ -22,6 +22,8 @@
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/string.h> #include <wx/string.h>
#include "Experimental.h"
class AudacityLogger:public wxEvtHandler, public wxLog { class AudacityLogger:public wxEvtHandler, public wxLog {
public: public:
AudacityLogger(); AudacityLogger();
@ -30,6 +32,10 @@ class AudacityLogger:public wxEvtHandler, public wxLog {
void Show(bool show = true); void Show(bool show = true);
void Destroy(); void Destroy();
#if defined(EXPERIMENTAL_CRASH_REPORT)
wxString GetLog();
#endif
protected: protected:
virtual void Flush(); virtual void Flush();
virtual void DoLogString(const wxChar *szString, time_t t); virtual void DoLogString(const wxChar *szString, time_t t);

@ -302,6 +302,7 @@ writing audio.
#include "Prefs.h" #include "Prefs.h"
#include "Project.h" #include "Project.h"
#include "WaveTrack.h" #include "WaveTrack.h"
#include "AutoRecovery.h"
#include "toolbars/ControlToolBar.h" #include "toolbars/ControlToolBar.h"
#include "widgets/Meter.h" #include "widgets/Meter.h"
@ -1766,6 +1767,20 @@ int AudioIO::StartStream(WaveTrackArray playbackTracks,
AILASetStartTime(); AILASetStartTime();
#endif #endif
if (options.pStartTime)
{
// Calculate the new time position
mTime = std::max(mT0, std::min(mT1, *options.pStartTime));
// Reset mixer positions for all playback tracks
unsigned numMixers = mPlaybackTracks.GetCount();
for (unsigned ii = 0; ii < numMixers; ++ii)
mPlaybackMixers[ii]->Reposition(mTime);
if(mTimeTrack)
mWarpedTime = mTimeTrack->ComputeWarpedLength(mT0, mTime);
else
mWarpedTime = mTime - mT0;
}
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT #ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
delete mScrubQueue; delete mScrubQueue;
if (scrubbing) if (scrubbing)

@ -84,6 +84,7 @@ struct AudioIOStartStreamOptions
, playLooped(false) , playLooped(false)
, cutPreviewGapStart(0.0) , cutPreviewGapStart(0.0)
, cutPreviewGapLen(0.0) , cutPreviewGapLen(0.0)
, pStartTime(NULL)
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT #ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
, scrubDelay(0.0) , scrubDelay(0.0)
, maxScrubSpeed(1.0) , maxScrubSpeed(1.0)
@ -97,6 +98,7 @@ struct AudioIOStartStreamOptions
bool playLooped; bool playLooped;
double cutPreviewGapStart; double cutPreviewGapStart;
double cutPreviewGapLen; double cutPreviewGapLen;
double * pStartTime;
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT #ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
// Positive value indicates that scrubbing will happen // Positive value indicates that scrubbing will happen

@ -15,7 +15,7 @@
#include <wx/string.h> #include <wx/string.h>
#include "AutoRecovery.h" class AutoSaveFile;
class AUDACITY_DLL_API AudioIOListener { class AUDACITY_DLL_API AudioIOListener {
public: public:

@ -637,8 +637,41 @@ bool AutoSaveFile::Decode(const wxString & fileName)
if (file.Read(&ident, len) != len || strncmp(ident, AutoSaveIdent, len) != 0) if (file.Read(&ident, len) != len || strncmp(ident, AutoSaveIdent, len) != 0)
{ {
// Not something we recognize. Could be decoded already. Let the caller // It could be that the file has already been decoded or that it is one
// deal with it. // from 2.1.0 or earlier. In the latter case, we need to ensure the
// closing </project> tag is preset.
// Close the file so we can reopen it in read/write mode
file.Close();
// Add </project> tag, if necessary
if (!file.Open(fn.GetFullPath(), wxT("r+b")))
{
// Really shouldn't happen, but let the caller deal with it
return false;
}
// Read the last 16 bytes of the file and check if they contain
// "</project>" somewhere.
const int bufsize = 16;
char buf[bufsize + 1];
if (file.SeekEnd(-bufsize) != wxInvalidOffset)
{
if (file.Read(buf, bufsize) == bufsize)
{
buf[bufsize] = 0;
if (strstr(buf, "</project>") == 0)
{
// End of file does not contain closing </project> tag, so add it
if (file.Seek(0, wxFromEnd) != wxInvalidOffset)
{
strcpy(buf, "</project>\n");
file.Write(buf, strlen(buf));
}
}
}
}
file.Close(); file.Close();
return true; return true;
@ -650,7 +683,6 @@ bool AutoSaveFile::Decode(const wxString & fileName)
if (file.Read(buf, len) != len) if (file.Read(buf, len) != len)
{ {
delete buf; delete buf;
file.Close();
return false; return false;
} }

@ -66,8 +66,8 @@ private:
#define AutoSaveIdent "<?xml autosave>" #define AutoSaveIdent "<?xml autosave>"
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(short, NameMap, class AUDACITY_DLL_API); WX_DECLARE_STRING_HASH_MAP_WITH_DECL(short, NameMap, class AUDACITY_DLL_API);
WX_DECLARE_HASH_MAP(short, wxString, wxIntegerHash, wxIntegerEqual, IdMap); WX_DECLARE_HASH_MAP_WITH_DECL(short, wxString, wxIntegerHash, wxIntegerEqual, IdMap, class AUDACITY_DLL_API);
WX_DECLARE_OBJARRAY(IdMap, IdMapArray); WX_DECLARE_OBJARRAY_WITH_DECL(IdMap, IdMapArray, class AUDACITY_DLL_API);
class AUDACITY_DLL_API AutoSaveFile : public XMLWriter class AUDACITY_DLL_API AutoSaveFile : public XMLWriter
{ {

@ -55,20 +55,20 @@ extern void diagnostics_do_perfmon_stop( t_diag_struct ** ppDiag);
// static ensures struct is initialised just once. // static ensures struct is initialised just once.
// No function is called after the countdown is counted out. // No function is called after the countdown is counted out.
#define DIAG( message ) { \ #define DIAG( message ) { \
static t_diag_struct diag{ DEFAULT_LOG_COUNT, DEFAULT_LOG_COUNT, 0,0,0,0,wxT(message)};\ static t_diag_struct diag = { DEFAULT_LOG_COUNT, DEFAULT_LOG_COUNT, 0,0,0,0,wxT(message)};\
if( --diag.countdown >=0 )\ if( --diag.countdown >=0 )\
diagnostics_do_diag( &diag );\ diagnostics_do_diag( &diag );\
} }
#define TRACK_MEM( message, amount ) { \ #define TRACK_MEM( message, amount ) { \
static t_diag_struct diag{ DEFAULT_LOG_COUNT, DEFAULT_LOG_COUNT, 0,0,0,0,wxT(message)};\ static t_diag_struct diag = { DEFAULT_LOG_COUNT, DEFAULT_LOG_COUNT, 0,0,0,0,wxT(message)};\
if( --diag.countdown >=0 )\ if( --diag.countdown >=0 )\
diagnostics_do_diag_mem( &diag, amount );\ diagnostics_do_diag_mem( &diag, amount );\
} }
#define TIMER_START( message, timername )\ #define TIMER_START( message, timername )\
MAKE_TIMER( timername ); { \ MAKE_TIMER( timername ); { \
static t_diag_struct diag{ DEFAULT_LOG_COUNT, DEFAULT_LOG_COUNT, 0,0,0,0,wxT(message)};\ static t_diag_struct diag = { DEFAULT_LOG_COUNT, DEFAULT_LOG_COUNT, 0,0,0,0,wxT(message)};\
if( --diag.countdown >=0 )\ if( --diag.countdown >=0 )\
diagnostics_do_perfmon_start( &diag, &timername );\ diagnostics_do_perfmon_start( &diag, &timername );\
} }

@ -178,4 +178,11 @@
// You must define EXPERIMENTAL_SCRUBBING_BASIC if you enable this: // You must define EXPERIMENTAL_SCRUBBING_BASIC if you enable this:
#define EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL #define EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL
// Define to include crash reporting
#define EXPERIMENTAL_CRASH_REPORT
#if !defined(wxUSE_DEBUGREPORT) || !wxUSE_DEBUGREPORT
#undef EXPERIMENTAL_CRASH_REPORT
#endif
#endif #endif

@ -233,6 +233,7 @@ audacity_SOURCES = \
TrackPanelAx.h \ TrackPanelAx.h \
UndoManager.cpp \ UndoManager.cpp \
UndoManager.h \ UndoManager.h \
ViewInfo.cpp \
ViewInfo.h \ ViewInfo.h \
VoiceKey.cpp \ VoiceKey.cpp \
VoiceKey.h \ VoiceKey.h \

@ -279,46 +279,48 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \
BatchProcessDialog.cpp BatchProcessDialog.h Benchmark.cpp \ BatchProcessDialog.cpp BatchProcessDialog.h Benchmark.cpp \
Benchmark.h CaptureEvents.cpp CaptureEvents.h Dependencies.cpp \ Benchmark.h CaptureEvents.cpp CaptureEvents.h Dependencies.cpp \
Dependencies.h DeviceChange.cpp DeviceChange.h \ Dependencies.h DeviceChange.cpp DeviceChange.h \
DeviceManager.cpp DeviceManager.h Envelope.cpp Envelope.h \ DeviceManager.cpp DeviceManager.h Diags.cpp Diags.h \
Experimental.h FFmpeg.cpp FFmpeg.h FFT.cpp FFT.h FileIO.cpp \ Envelope.cpp Envelope.h Experimental.h FFmpeg.cpp FFmpeg.h \
FileIO.h FileNames.cpp FileNames.h float_cast.h FreqWindow.cpp \ FFT.cpp FFT.h FileIO.cpp FileIO.h FileNames.cpp FileNames.h \
FreqWindow.h HelpText.cpp HelpText.h HistoryWindow.cpp \ float_cast.h FreqWindow.cpp FreqWindow.h HelpText.cpp \
HistoryWindow.h ImageManipulation.cpp ImageManipulation.h \ HelpText.h HistoryWindow.cpp HistoryWindow.h \
InterpolateAudio.cpp InterpolateAudio.h LabelDialog.cpp \ ImageManipulation.cpp ImageManipulation.h InterpolateAudio.cpp \
LabelDialog.h LabelTrack.cpp LabelTrack.h LangChoice.cpp \ InterpolateAudio.h LabelDialog.cpp LabelDialog.h \
LangChoice.h Languages.cpp Languages.h Legacy.cpp Legacy.h \ LabelTrack.cpp LabelTrack.h LangChoice.cpp LangChoice.h \
Lyrics.cpp Lyrics.h LyricsWindow.cpp LyricsWindow.h \ Languages.cpp Languages.h Legacy.cpp Legacy.h Lyrics.cpp \
MacroMagic.h Matrix.cpp Matrix.h Menus.cpp Menus.h Mix.cpp \ Lyrics.h LyricsWindow.cpp LyricsWindow.h MacroMagic.h \
Mix.h MixerBoard.cpp MixerBoard.h ModuleManager.cpp \ Matrix.cpp Matrix.h Menus.cpp Menus.h Mix.cpp Mix.h \
ModuleManager.h PitchName.cpp PitchName.h \ MixerBoard.cpp MixerBoard.h ModuleManager.cpp ModuleManager.h \
PlatformCompatibility.cpp PlatformCompatibility.h \ PitchName.cpp PitchName.h PlatformCompatibility.cpp \
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \ PlatformCompatibility.h PluginManager.cpp PluginManager.h \
Profiler.cpp Profiler.h Project.cpp Project.h RealFFTf.cpp \ Printing.cpp Printing.h Profiler.cpp Profiler.h Project.cpp \
RealFFTf.h RealFFTf48x.cpp RealFFTf48x.h Resample.cpp \ Project.h RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp \
Resample.h RevisionIdent.h RingBuffer.cpp RingBuffer.h \ RealFFTf48x.h Resample.cpp Resample.h RevisionIdent.h \
Screenshot.cpp Screenshot.h SelectedRegion.cpp \ RingBuffer.cpp RingBuffer.h Screenshot.cpp Screenshot.h \
SelectedRegion.h Shuttle.cpp Shuttle.h ShuttleGui.cpp \ SelectedRegion.cpp SelectedRegion.h Shuttle.cpp Shuttle.h \
ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \ ShuttleGui.cpp ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h \
SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \ Snap.cpp Snap.h SoundActivatedRecord.cpp \
Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \ SoundActivatedRecord.h Spectrum.cpp Spectrum.h \
SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \
SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \ SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \
ThemeAsCeeCode.h TimeDialog.cpp TimeDialog.h \ ThemeAsCeeCode.h TimeDialog.cpp TimeDialog.h \
TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \ TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \
TimeTrack.h Track.cpp Track.h TrackArtist.cpp TrackArtist.h \ TimeTrack.h Track.cpp Track.h TrackArtist.cpp TrackArtist.h \
TrackPanel.cpp TrackPanel.h TrackPanelAx.cpp TrackPanelAx.h \ TrackPanel.cpp TrackPanel.h TrackPanelAx.cpp TrackPanelAx.h \
UndoManager.cpp UndoManager.h ViewInfo.h VoiceKey.cpp \ UndoManager.cpp UndoManager.h ViewInfo.cpp ViewInfo.h \
VoiceKey.h WaveClip.cpp WaveClip.h WaveTrack.cpp WaveTrack.h \ VoiceKey.cpp VoiceKey.h WaveClip.cpp WaveClip.h WaveTrack.cpp \
WrappedType.cpp WrappedType.h commands/AppCommandEvent.cpp \ WaveTrack.h WrappedType.cpp WrappedType.h \
commands/AppCommandEvent.h commands/BatchEvalCommand.cpp \ commands/AppCommandEvent.cpp commands/AppCommandEvent.h \
commands/BatchEvalCommand.h commands/Command.cpp \ commands/BatchEvalCommand.cpp commands/BatchEvalCommand.h \
commands/Command.h commands/CommandBuilder.cpp \ commands/Command.cpp commands/Command.h \
commands/CommandBuilder.h commands/CommandDirectory.cpp \ commands/CommandBuilder.cpp commands/CommandBuilder.h \
commands/CommandDirectory.h commands/CommandHandler.cpp \ commands/CommandDirectory.cpp commands/CommandDirectory.h \
commands/CommandHandler.h commands/CommandManager.cpp \ commands/CommandHandler.cpp commands/CommandHandler.h \
commands/CommandManager.h commands/CommandMisc.h \ commands/CommandManager.cpp commands/CommandManager.h \
commands/CommandSignature.cpp commands/CommandSignature.h \ commands/CommandMisc.h commands/CommandSignature.cpp \
commands/CommandTargets.h commands/CommandType.cpp \ commands/CommandSignature.h commands/CommandTargets.h \
commands/CommandType.h commands/CompareAudioCommand.cpp \ commands/CommandType.cpp commands/CommandType.h \
commands/CompareAudioCommand.cpp \
commands/CompareAudioCommand.h commands/ExecMenuCommand.cpp \ commands/CompareAudioCommand.h commands/ExecMenuCommand.cpp \
commands/ExecMenuCommand.h commands/GetAllMenuCommands.cpp \ commands/ExecMenuCommand.h commands/GetAllMenuCommands.cpp \
commands/GetAllMenuCommands.h \ commands/GetAllMenuCommands.h \
@ -514,11 +516,11 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \
audacity-Benchmark.$(OBJEXT) audacity-CaptureEvents.$(OBJEXT) \ audacity-Benchmark.$(OBJEXT) audacity-CaptureEvents.$(OBJEXT) \
audacity-Dependencies.$(OBJEXT) \ audacity-Dependencies.$(OBJEXT) \
audacity-DeviceChange.$(OBJEXT) \ audacity-DeviceChange.$(OBJEXT) \
audacity-DeviceManager.$(OBJEXT) audacity-Envelope.$(OBJEXT) \ audacity-DeviceManager.$(OBJEXT) audacity-Diags.$(OBJEXT) \
audacity-FFmpeg.$(OBJEXT) audacity-FFT.$(OBJEXT) \ audacity-Envelope.$(OBJEXT) audacity-FFmpeg.$(OBJEXT) \
audacity-FileIO.$(OBJEXT) audacity-FileNames.$(OBJEXT) \ audacity-FFT.$(OBJEXT) audacity-FileIO.$(OBJEXT) \
audacity-FreqWindow.$(OBJEXT) audacity-HelpText.$(OBJEXT) \ audacity-FileNames.$(OBJEXT) audacity-FreqWindow.$(OBJEXT) \
audacity-HistoryWindow.$(OBJEXT) \ audacity-HelpText.$(OBJEXT) audacity-HistoryWindow.$(OBJEXT) \
audacity-ImageManipulation.$(OBJEXT) \ audacity-ImageManipulation.$(OBJEXT) \
audacity-InterpolateAudio.$(OBJEXT) \ audacity-InterpolateAudio.$(OBJEXT) \
audacity-LabelDialog.$(OBJEXT) audacity-LabelTrack.$(OBJEXT) \ audacity-LabelDialog.$(OBJEXT) audacity-LabelTrack.$(OBJEXT) \
@ -545,8 +547,9 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \
audacity-TimeTrack.$(OBJEXT) audacity-Track.$(OBJEXT) \ audacity-TimeTrack.$(OBJEXT) audacity-Track.$(OBJEXT) \
audacity-TrackArtist.$(OBJEXT) audacity-TrackPanel.$(OBJEXT) \ audacity-TrackArtist.$(OBJEXT) audacity-TrackPanel.$(OBJEXT) \
audacity-TrackPanelAx.$(OBJEXT) audacity-UndoManager.$(OBJEXT) \ audacity-TrackPanelAx.$(OBJEXT) audacity-UndoManager.$(OBJEXT) \
audacity-VoiceKey.$(OBJEXT) audacity-WaveClip.$(OBJEXT) \ audacity-ViewInfo.$(OBJEXT) audacity-VoiceKey.$(OBJEXT) \
audacity-WaveTrack.$(OBJEXT) audacity-WrappedType.$(OBJEXT) \ audacity-WaveClip.$(OBJEXT) audacity-WaveTrack.$(OBJEXT) \
audacity-WrappedType.$(OBJEXT) \
commands/audacity-AppCommandEvent.$(OBJEXT) \ commands/audacity-AppCommandEvent.$(OBJEXT) \
commands/audacity-BatchEvalCommand.$(OBJEXT) \ commands/audacity-BatchEvalCommand.$(OBJEXT) \
commands/audacity-Command.$(OBJEXT) \ commands/audacity-Command.$(OBJEXT) \
@ -1137,46 +1140,48 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \
BatchProcessDialog.cpp BatchProcessDialog.h Benchmark.cpp \ BatchProcessDialog.cpp BatchProcessDialog.h Benchmark.cpp \
Benchmark.h CaptureEvents.cpp CaptureEvents.h Dependencies.cpp \ Benchmark.h CaptureEvents.cpp CaptureEvents.h Dependencies.cpp \
Dependencies.h DeviceChange.cpp DeviceChange.h \ Dependencies.h DeviceChange.cpp DeviceChange.h \
DeviceManager.cpp DeviceManager.h Envelope.cpp Envelope.h \ DeviceManager.cpp DeviceManager.h Diags.cpp Diags.h \
Experimental.h FFmpeg.cpp FFmpeg.h FFT.cpp FFT.h FileIO.cpp \ Envelope.cpp Envelope.h Experimental.h FFmpeg.cpp FFmpeg.h \
FileIO.h FileNames.cpp FileNames.h float_cast.h FreqWindow.cpp \ FFT.cpp FFT.h FileIO.cpp FileIO.h FileNames.cpp FileNames.h \
FreqWindow.h HelpText.cpp HelpText.h HistoryWindow.cpp \ float_cast.h FreqWindow.cpp FreqWindow.h HelpText.cpp \
HistoryWindow.h ImageManipulation.cpp ImageManipulation.h \ HelpText.h HistoryWindow.cpp HistoryWindow.h \
InterpolateAudio.cpp InterpolateAudio.h LabelDialog.cpp \ ImageManipulation.cpp ImageManipulation.h InterpolateAudio.cpp \
LabelDialog.h LabelTrack.cpp LabelTrack.h LangChoice.cpp \ InterpolateAudio.h LabelDialog.cpp LabelDialog.h \
LangChoice.h Languages.cpp Languages.h Legacy.cpp Legacy.h \ LabelTrack.cpp LabelTrack.h LangChoice.cpp LangChoice.h \
Lyrics.cpp Lyrics.h LyricsWindow.cpp LyricsWindow.h \ Languages.cpp Languages.h Legacy.cpp Legacy.h Lyrics.cpp \
MacroMagic.h Matrix.cpp Matrix.h Menus.cpp Menus.h Mix.cpp \ Lyrics.h LyricsWindow.cpp LyricsWindow.h MacroMagic.h \
Mix.h MixerBoard.cpp MixerBoard.h ModuleManager.cpp \ Matrix.cpp Matrix.h Menus.cpp Menus.h Mix.cpp Mix.h \
ModuleManager.h PitchName.cpp PitchName.h \ MixerBoard.cpp MixerBoard.h ModuleManager.cpp ModuleManager.h \
PlatformCompatibility.cpp PlatformCompatibility.h \ PitchName.cpp PitchName.h PlatformCompatibility.cpp \
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \ PlatformCompatibility.h PluginManager.cpp PluginManager.h \
Profiler.cpp Profiler.h Project.cpp Project.h RealFFTf.cpp \ Printing.cpp Printing.h Profiler.cpp Profiler.h Project.cpp \
RealFFTf.h RealFFTf48x.cpp RealFFTf48x.h Resample.cpp \ Project.h RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp \
Resample.h RevisionIdent.h RingBuffer.cpp RingBuffer.h \ RealFFTf48x.h Resample.cpp Resample.h RevisionIdent.h \
Screenshot.cpp Screenshot.h SelectedRegion.cpp \ RingBuffer.cpp RingBuffer.h Screenshot.cpp Screenshot.h \
SelectedRegion.h Shuttle.cpp Shuttle.h ShuttleGui.cpp \ SelectedRegion.cpp SelectedRegion.h Shuttle.cpp Shuttle.h \
ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \ ShuttleGui.cpp ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h \
SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \ Snap.cpp Snap.h SoundActivatedRecord.cpp \
Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \ SoundActivatedRecord.h Spectrum.cpp Spectrum.h \
SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \
SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \ SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \
ThemeAsCeeCode.h TimeDialog.cpp TimeDialog.h \ ThemeAsCeeCode.h TimeDialog.cpp TimeDialog.h \
TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \ TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \
TimeTrack.h Track.cpp Track.h TrackArtist.cpp TrackArtist.h \ TimeTrack.h Track.cpp Track.h TrackArtist.cpp TrackArtist.h \
TrackPanel.cpp TrackPanel.h TrackPanelAx.cpp TrackPanelAx.h \ TrackPanel.cpp TrackPanel.h TrackPanelAx.cpp TrackPanelAx.h \
UndoManager.cpp UndoManager.h ViewInfo.h VoiceKey.cpp \ UndoManager.cpp UndoManager.h ViewInfo.cpp ViewInfo.h \
VoiceKey.h WaveClip.cpp WaveClip.h WaveTrack.cpp WaveTrack.h \ VoiceKey.cpp VoiceKey.h WaveClip.cpp WaveClip.h WaveTrack.cpp \
WrappedType.cpp WrappedType.h commands/AppCommandEvent.cpp \ WaveTrack.h WrappedType.cpp WrappedType.h \
commands/AppCommandEvent.h commands/BatchEvalCommand.cpp \ commands/AppCommandEvent.cpp commands/AppCommandEvent.h \
commands/BatchEvalCommand.h commands/Command.cpp \ commands/BatchEvalCommand.cpp commands/BatchEvalCommand.h \
commands/Command.h commands/CommandBuilder.cpp \ commands/Command.cpp commands/Command.h \
commands/CommandBuilder.h commands/CommandDirectory.cpp \ commands/CommandBuilder.cpp commands/CommandBuilder.h \
commands/CommandDirectory.h commands/CommandHandler.cpp \ commands/CommandDirectory.cpp commands/CommandDirectory.h \
commands/CommandHandler.h commands/CommandManager.cpp \ commands/CommandHandler.cpp commands/CommandHandler.h \
commands/CommandManager.h commands/CommandMisc.h \ commands/CommandManager.cpp commands/CommandManager.h \
commands/CommandSignature.cpp commands/CommandSignature.h \ commands/CommandMisc.h commands/CommandSignature.cpp \
commands/CommandTargets.h commands/CommandType.cpp \ commands/CommandSignature.h commands/CommandTargets.h \
commands/CommandType.h commands/CompareAudioCommand.cpp \ commands/CommandType.cpp commands/CommandType.h \
commands/CompareAudioCommand.cpp \
commands/CompareAudioCommand.h commands/ExecMenuCommand.cpp \ commands/CompareAudioCommand.h commands/ExecMenuCommand.cpp \
commands/ExecMenuCommand.h commands/GetAllMenuCommands.cpp \ commands/ExecMenuCommand.h commands/GetAllMenuCommands.cpp \
commands/GetAllMenuCommands.h \ commands/GetAllMenuCommands.h \
@ -1963,6 +1968,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Dependencies.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Dependencies.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-DeviceChange.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-DeviceChange.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-DeviceManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-DeviceManager.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Diags.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-DirManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-DirManager.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Dither.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Dither.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Envelope.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Envelope.Po@am__quote@
@ -2023,6 +2029,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-TrackPanel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-TrackPanel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-TrackPanelAx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-TrackPanelAx.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-UndoManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-UndoManager.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ViewInfo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-VoiceKey.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-VoiceKey.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-WaveClip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-WaveClip.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-WaveTrack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-WaveTrack.Po@am__quote@
@ -2777,6 +2784,20 @@ audacity-DeviceManager.obj: DeviceManager.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-DeviceManager.obj `if test -f 'DeviceManager.cpp'; then $(CYGPATH_W) 'DeviceManager.cpp'; else $(CYGPATH_W) '$(srcdir)/DeviceManager.cpp'; fi` @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-DeviceManager.obj `if test -f 'DeviceManager.cpp'; then $(CYGPATH_W) 'DeviceManager.cpp'; else $(CYGPATH_W) '$(srcdir)/DeviceManager.cpp'; fi`
audacity-Diags.o: Diags.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-Diags.o -MD -MP -MF $(DEPDIR)/audacity-Diags.Tpo -c -o audacity-Diags.o `test -f 'Diags.cpp' || echo '$(srcdir)/'`Diags.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-Diags.Tpo $(DEPDIR)/audacity-Diags.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Diags.cpp' object='audacity-Diags.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-Diags.o `test -f 'Diags.cpp' || echo '$(srcdir)/'`Diags.cpp
audacity-Diags.obj: Diags.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-Diags.obj -MD -MP -MF $(DEPDIR)/audacity-Diags.Tpo -c -o audacity-Diags.obj `if test -f 'Diags.cpp'; then $(CYGPATH_W) 'Diags.cpp'; else $(CYGPATH_W) '$(srcdir)/Diags.cpp'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-Diags.Tpo $(DEPDIR)/audacity-Diags.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Diags.cpp' object='audacity-Diags.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-Diags.obj `if test -f 'Diags.cpp'; then $(CYGPATH_W) 'Diags.cpp'; else $(CYGPATH_W) '$(srcdir)/Diags.cpp'; fi`
audacity-Envelope.o: Envelope.cpp audacity-Envelope.o: Envelope.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-Envelope.o -MD -MP -MF $(DEPDIR)/audacity-Envelope.Tpo -c -o audacity-Envelope.o `test -f 'Envelope.cpp' || echo '$(srcdir)/'`Envelope.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-Envelope.o -MD -MP -MF $(DEPDIR)/audacity-Envelope.Tpo -c -o audacity-Envelope.o `test -f 'Envelope.cpp' || echo '$(srcdir)/'`Envelope.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-Envelope.Tpo $(DEPDIR)/audacity-Envelope.Po @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-Envelope.Tpo $(DEPDIR)/audacity-Envelope.Po
@ -3505,6 +3526,20 @@ audacity-UndoManager.obj: UndoManager.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-UndoManager.obj `if test -f 'UndoManager.cpp'; then $(CYGPATH_W) 'UndoManager.cpp'; else $(CYGPATH_W) '$(srcdir)/UndoManager.cpp'; fi` @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-UndoManager.obj `if test -f 'UndoManager.cpp'; then $(CYGPATH_W) 'UndoManager.cpp'; else $(CYGPATH_W) '$(srcdir)/UndoManager.cpp'; fi`
audacity-ViewInfo.o: ViewInfo.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ViewInfo.o -MD -MP -MF $(DEPDIR)/audacity-ViewInfo.Tpo -c -o audacity-ViewInfo.o `test -f 'ViewInfo.cpp' || echo '$(srcdir)/'`ViewInfo.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ViewInfo.Tpo $(DEPDIR)/audacity-ViewInfo.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ViewInfo.cpp' object='audacity-ViewInfo.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-ViewInfo.o `test -f 'ViewInfo.cpp' || echo '$(srcdir)/'`ViewInfo.cpp
audacity-ViewInfo.obj: ViewInfo.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ViewInfo.obj -MD -MP -MF $(DEPDIR)/audacity-ViewInfo.Tpo -c -o audacity-ViewInfo.obj `if test -f 'ViewInfo.cpp'; then $(CYGPATH_W) 'ViewInfo.cpp'; else $(CYGPATH_W) '$(srcdir)/ViewInfo.cpp'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ViewInfo.Tpo $(DEPDIR)/audacity-ViewInfo.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ViewInfo.cpp' object='audacity-ViewInfo.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-ViewInfo.obj `if test -f 'ViewInfo.cpp'; then $(CYGPATH_W) 'ViewInfo.cpp'; else $(CYGPATH_W) '$(srcdir)/ViewInfo.cpp'; fi`
audacity-VoiceKey.o: VoiceKey.cpp audacity-VoiceKey.o: VoiceKey.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-VoiceKey.o -MD -MP -MF $(DEPDIR)/audacity-VoiceKey.Tpo -c -o audacity-VoiceKey.o `test -f 'VoiceKey.cpp' || echo '$(srcdir)/'`VoiceKey.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-VoiceKey.o -MD -MP -MF $(DEPDIR)/audacity-VoiceKey.Tpo -c -o audacity-VoiceKey.o `test -f 'VoiceKey.cpp' || echo '$(srcdir)/'`VoiceKey.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-VoiceKey.Tpo $(DEPDIR)/audacity-VoiceKey.Po @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-VoiceKey.Tpo $(DEPDIR)/audacity-VoiceKey.Po

@ -36,6 +36,7 @@ simplifies construction of menu items.
#include <limits> #include <limits>
#include <math.h> #include <math.h>
#include <wx/defs.h> #include <wx/defs.h>
#include <wx/docview.h> #include <wx/docview.h>
#include <wx/msgdlg.h> #include <wx/msgdlg.h>
@ -117,6 +118,10 @@ simplifies construction of menu items.
#include "CaptureEvents.h" #include "CaptureEvents.h"
#include "Snap.h" #include "Snap.h"
#if defined(EXPERIMENTAL_CRASH_REPORT)
#include <wx/debugrpt.h>
#endif
#ifdef EXPERIMENTAL_SCOREALIGN #ifdef EXPERIMENTAL_SCOREALIGN
#include "effects/ScoreAlignDialog.h" #include "effects/ScoreAlignDialog.h"
#include "audioreader.h" #include "audioreader.h"
@ -1061,6 +1066,10 @@ void AudacityProject::CreateMenusAndCommands()
c->AddItem(wxT("Log"), _("Show &Log..."), FN(OnShowLog)); c->AddItem(wxT("Log"), _("Show &Log..."), FN(OnShowLog));
#if defined(EXPERIMENTAL_CRASH_REPORT)
c->AddItem(wxT("CrashReport"), _("&Generate Support Data..."), FN(OnCrashReport));
#endif
#ifndef __WXMAC__ #ifndef __WXMAC__
c->AddSeparator(); c->AddSeparator();
#endif #endif
@ -1732,9 +1741,11 @@ wxUint32 AudacityProject::GetUpdateFlags()
flags |= GetFocusedFrame(); flags |= GetFocusedFrame();
double start, end;
GetPlayRegion(&start, &end);
if (IsPlayRegionLocked()) if (IsPlayRegionLocked())
flags |= PlayRegionLockedFlag; flags |= PlayRegionLockedFlag;
else else if (start != end)
flags |= PlayRegionNotLockedFlag; flags |= PlayRegionNotLockedFlag;
if (flags & AudioIONotBusyFlag) { if (flags & AudioIONotBusyFlag) {
@ -4933,6 +4944,7 @@ void AudacityProject::OnHistory()
mHistoryWindow = new HistoryWindow(this, &mUndoManager); mHistoryWindow = new HistoryWindow(this, &mUndoManager);
mHistoryWindow->Show(); mHistoryWindow->Show();
mHistoryWindow->Raise(); mHistoryWindow->Raise();
mHistoryWindow->UpdateDisplay();
} }
void AudacityProject::OnKaraoke() void AudacityProject::OnKaraoke()
@ -6175,6 +6187,18 @@ void AudacityProject::OnBenchmark()
::RunBenchmark(this); ::RunBenchmark(this);
} }
#if defined(EXPERIMENTAL_CRASH_REPORT)
void AudacityProject::OnCrashReport()
{
// Change to "1" to test a real crash
#if 0
char *p = 0;
*p = 1234;
#endif
wxGetApp().GenerateCrashReport(wxDebugReport::Context_Current);
}
#endif
void AudacityProject::OnScreenshot() void AudacityProject::OnScreenshot()
{ {
::OpenScreenshotTools(); ::OpenScreenshotTools();
@ -6183,11 +6207,39 @@ void AudacityProject::OnScreenshot()
void AudacityProject::OnAudioDeviceInfo() void AudacityProject::OnAudioDeviceInfo()
{ {
wxString info = gAudioIO->GetDeviceInfo(); wxString info = gAudioIO->GetDeviceInfo();
HelpSystem::ShowInfoDialog( this,
_("Audio Device Info"), wxDialog dlg(this, wxID_ANY, wxString(_("Audio Device Info")));
wxT(""), ShuttleGui S(&dlg, eIsCreating);
info,
350,450); wxTextCtrl *text;
S.StartVerticalLay();
{
S.SetStyle(wxTE_MULTILINE | wxTE_READONLY);
text = S.Id(wxID_STATIC).AddTextWindow(info);
S.AddStandardButtons(eOkButton | eCancelButton);
}
S.EndVerticalLay();
dlg.FindWindowById(wxID_OK)->SetLabel(_("&Save"));
dlg.SetSize(350, 450);
if (dlg.ShowModal() == wxID_OK)
{
wxString fName = FileSelector(_("Save Device Info"),
wxEmptyString,
wxT("deviceinfo.txt"),
wxT("txt"),
wxT("*.txt"),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
this);
if (!fName.IsEmpty())
{
if (!text->SaveFile(fName))
{
wxMessageBox(_("Unable to save device info"), _("Save Device Info"));
}
}
}
} }
void AudacityProject::OnSeparator() void AudacityProject::OnSeparator()
@ -6262,9 +6314,17 @@ void AudacityProject::OnUnMuteAllTracks()
void AudacityProject::OnLockPlayRegion() void AudacityProject::OnLockPlayRegion()
{ {
double start, end;
GetPlayRegion(&start, &end);
if (start >= mTracks->GetEndTime()) {
wxMessageBox(_("Cannot lock region beyond\nend of project."),
_("Error"));
}
else {
mLockPlayRegion = true; mLockPlayRegion = true;
mRuler->Refresh(false); mRuler->Refresh(false);
} }
}
void AudacityProject::OnUnlockPlayRegion() void AudacityProject::OnUnlockPlayRegion()
{ {

@ -372,6 +372,9 @@ void OnManual();
void OnShowLog(); void OnShowLog();
void OnHelpWelcome(); void OnHelpWelcome();
void OnBenchmark(); void OnBenchmark();
#if defined(EXPERIMENTAL_CRASH_REPORT)
void OnCrashReport();
#endif
void OnScreenshot(); void OnScreenshot();
void OnAudioDeviceInfo(); void OnAudioDeviceInfo();

@ -74,7 +74,7 @@ public:
void SetPath(const wxString & path); void SetPath(const wxString & path);
void SetSymbol(const wxString & symbol); void SetSymbol(const wxString & symbol);
// These should be passed an untranslated value wrapped in wxTRANSLATE() so // These should be passed an untranslated value wrapped in XO() so
// the value will still be extracted for translation // the value will still be extracted for translation
void SetName(const wxString & name); void SetName(const wxString & name);
void SetVersion(const wxString & version); void SetVersion(const wxString & version);

@ -2548,10 +2548,6 @@ void AudacityProject::OpenFile(wxString fileName, bool addtohistory)
SetProjectTitle(); SetProjectTitle();
// Auto-save files (which are known by the special ending .autosave) do
// not necessarily have the closing </project> tag, because log data can
// be added anytime. So before opening an .autosave file, add the necessary
// closing bracket to make the XML parser happy.
const wxString autoSaveExt = wxT(".autosave"); const wxString autoSaveExt = wxT(".autosave");
if (mFileName.Length() >= autoSaveExt.Length() && if (mFileName.Length() >= autoSaveExt.Length() &&
mFileName.Right(autoSaveExt.Length()) == autoSaveExt) mFileName.Right(autoSaveExt.Length()) == autoSaveExt)

@ -52,6 +52,7 @@ class wxScrollBar;
class wxPanel; class wxPanel;
class AudacityProject; class AudacityProject;
class AutoSaveFile;
class Importer; class Importer;
class ODLock; class ODLock;
class RecordingRecoveryHandler; class RecordingRecoveryHandler;

@ -480,7 +480,7 @@ void ScreenFrame::OnCloseWindow(wxCloseEvent & WXUNUSED(event))
void ScreenFrame::OnUIUpdate(wxUpdateUIEvent & WXUNUSED(event)) void ScreenFrame::OnUIUpdate(wxUpdateUIEvent & WXUNUSED(event))
{ {
#ifdef __WXMAC__ #ifdef __WXMAC__
wxTopLevelWindow *top = mCommand->GetFrontWindow(mContext.proj); wxTopLevelWindow *top = mCommand->GetFrontWindow(GetActiveProject());
bool needupdate = false; bool needupdate = false;
bool enable = false; bool enable = false;

@ -30,6 +30,7 @@
#include "Audacity.h" #include "Audacity.h"
#include <algorithm>
#include <float.h> #include <float.h>
#include <math.h> #include <math.h>
@ -1247,194 +1248,239 @@ bool Sequence::Set(samplePtr buffer, sampleFormat format,
return ConsistencyCheck(wxT("Set")); return ConsistencyCheck(wxT("Set"));
} }
bool Sequence::GetWaveDisplay(float *min, float *max, float *rms,int* bl, namespace {
int len, const sampleCount *where,
double samplesPerPixel)
{
sampleCount s0 = where[0];
sampleCount s1 = where[len];
// None of the samples asked for are in range. Abandon. struct MinMaxSumsq
{
MinMaxSumsq(const float *pv, int count, int divisor)
{
min = FLT_MAX, max = -FLT_MAX, sumsq = 0.0f;
while (count--) {
float v;
switch (divisor) {
default:
case 1:
// array holds samples
v = *pv++;
if (v < min)
min = v;
if (v > max)
max = v;
sumsq += v * v;
break;
case 256:
case 65536:
// array holds triples of min, max, and rms values
v = *pv++;
if (v < min)
min = v;
v = *pv++;
if (v > max)
max = v;
v = *pv++;
sumsq += v * v;
break;
}
}
}
float min;
float max;
float sumsq;
};
}
bool Sequence::GetWaveDisplay(float *min, float *max, float *rms, int* bl,
int len, const sampleCount *where)
{
const sampleCount s0 = std::max(sampleCount(0), where[0]);
if (s0 >= mNumSamples) if (s0 >= mNumSamples)
// None of the samples asked for are in range. Abandon.
return false; return false;
int divisor; // In case where[len - 1] == where[len], raise the limit by one,
if (samplesPerPixel >= 65536) // so we load at least one pixel for column len - 1
divisor = 65536; // ... unless the mNumSamples ceiling applies, and then there are other defenses
else if (samplesPerPixel >= 256) const sampleCount s1 =
divisor = 256; std::min(mNumSamples, std::max(1 + where[len - 1], where[len]));
else
divisor = 1;
if (s1 > mNumSamples)
s1 = mNumSamples;
sampleCount srcX = s0;
unsigned int block0 = FindBlock(s0);
float *temp = new float[mMaxSamples]; float *temp = new float[mMaxSamples];
int pixel = 0; int pixel = 0;
float theMin = 0.0;
float theMax = 0.0;
float sumsq = float(0.0);
unsigned int b = block0;
int jcount = 0;
int blockStatus = 1;
while (srcX < s1) { sampleCount srcX = s0;
// Get more samples sampleCount nextSrcX = 0;
sampleCount num; int lastRmsDenom = 0;
int lastDivisor = 0;
int whereNow = std::min(s1 - 1, where[0]);
int whereNext = 0;
// Loop over block files, opening and reading and closing each
// not more than once
unsigned nBlocks = mBlock->GetCount();
const unsigned int block0 = FindBlock(s0);
for (unsigned int b = block0; b < nBlocks; ++b) {
if (b > block0)
srcX = nextSrcX;
if (srcX >= s1)
break;
num = ((mBlock->Item(b)->f->GetLength() - // Find the range of sample values for this block that
(srcX - mBlock->Item(b)->start)) + divisor - 1) // are in the display.
/ divisor; SeqBlock *const pSeqBlock = mBlock->Item(b);
const sampleCount start = pSeqBlock->start;
nextSrcX = std::min(s1, start + pSeqBlock->f->GetLength());
if (num > (s1 - srcX + divisor - 1) / divisor) // The column for pixel p covers samples from
num = (s1 - srcX + divisor - 1) / divisor; // where[p] up to but excluding where[p + 1].
// Find the range of pixels covered by the current block file
// (Their starting samples covered by it, to be exact)
int nextPixel;
if (nextSrcX >= s1)
// last pass
nextPixel = len;
else {
nextPixel = pixel;
// Taking min with s1 - 1, here and elsewhere, is another defense
// to be sure the last pixel column gets at least one sample
while (nextPixel < len &&
(whereNext = std::min(s1 - 1, where[nextPixel])) < nextSrcX)
++nextPixel;
}
if (nextPixel == pixel)
// The entire block's samples fall within one pixel column.
// Either it's a rare odd block at the end, or else,
// we must be really zoomed out!
// Omit the entire block's contents from min/max/rms
// calculation, which is not correct, but correctness might not
// be worth the compute time if this happens every pixel
// column. -- PRL
continue;
if (nextPixel == len)
whereNext = s1;
// Decide the summary level
const double samplesPerPixel =
double(whereNext - whereNow) / (nextPixel - pixel);
const int divisor =
(samplesPerPixel >= 65536) ? 65536
: (samplesPerPixel >= 256) ? 256
: 1;
int blockStatus = b;
// How many samples or triples are needed?
const sampleCount startPosition =
std::max(sampleCount(0), (srcX - start) / divisor);
const sampleCount inclusiveEndPosition =
std::min((mMaxSamples / divisor) - 1, (nextSrcX - 1 - start) / divisor);
const sampleCount num = 1 + inclusiveEndPosition - startPosition;
if (num <= 0) {
// What? There was a zero length block file?
wxASSERT(false);
// Do some defense against this case anyway
while (pixel < nextPixel) {
min[pixel] = max[pixel] = rms[pixel] = 0;
bl[pixel] = blockStatus;//MC
++pixel;
}
continue;
}
// Read from the block file or its summary
switch (divisor) { switch (divisor) {
default: default:
case 1: case 1:
Read((samplePtr)temp, floatSample, mBlock->Item(b), // Read samples
srcX - mBlock->Item(b)->start, num); Read((samplePtr)temp, floatSample, pSeqBlock, startPosition, num);
blockStatus=b;
break; break;
case 256: case 256:
// Read triples
//check to see if summary data has been computed //check to see if summary data has been computed
if(mBlock->Item(b)->f->IsSummaryAvailable()) if (pSeqBlock->f->IsSummaryAvailable())
{ pSeqBlock->f->Read256(temp, startPosition, num);
mBlock->Item(b)->f->Read256(temp,
(srcX - mBlock->Item(b)->start) / divisor, num);
blockStatus=b;
}
else else
{
//otherwise, mark the display as not yet computed //otherwise, mark the display as not yet computed
blockStatus = -1 - b; blockStatus = -1 - b;
}
break; break;
case 65536: case 65536:
// Read triples
//check to see if summary data has been computed //check to see if summary data has been computed
if(mBlock->Item(b)->f->IsSummaryAvailable()) if (pSeqBlock->f->IsSummaryAvailable())
{ pSeqBlock->f->Read64K(temp, startPosition, num);
mBlock->Item(b)->f->Read64K(temp,
(srcX - mBlock->Item(b)->start) / divisor, num);
blockStatus=b;
}
else else
{ //otherwise, mark the display as not yet computed
blockStatus = -1 - b; blockStatus = -1 - b;
}
break; break;
} }
// Get min/max/rms of samples for each pixel we can sampleCount filePosition = startPosition;
int x = 0;
if (b==block0) { // The previous pixel column might straddle blocks.
if (divisor > 1) { // If so, impute some of the data to it.
theMin = temp[0]; if (b > block0 && pixel > 0) {
theMax = temp[1]; sampleCount midPosition = (whereNow - start) / divisor;
} int diff(midPosition - filePosition);
else { if (diff > 0) {
theMin = temp[0]; MinMaxSumsq values(temp, diff, divisor);
theMax = temp[0]; const int lastPixel = pixel - 1;
} float &lastMin = min[lastPixel];
sumsq = float(0.0); lastMin = std::min(lastMin, values.min);
jcount = 0; float &lastMax = max[lastPixel];
} lastMax = std::max(lastMax, values.max);
float &lastRms = rms[lastPixel];
int lastNumSamples = lastRmsDenom * lastDivisor;
lastRms = sqrt(
(lastRms * lastRms * lastNumSamples + values.sumsq * divisor) /
(lastNumSamples + diff * divisor)
);
while (x < num) { filePosition = midPosition;
while (pixel < len &&
where[pixel] / divisor == srcX / divisor + x) {
if (pixel > 0) {
min[pixel - 1] = theMin;
max[pixel - 1] = theMax;
bl[pixel - 1] = blockStatus;//MC
if (jcount > 0)
rms[pixel - 1] = (float)sqrt(sumsq / jcount);
else
rms[pixel - 1] = 0.0f;
}
pixel++;
if (where[pixel] != where[pixel - 1]) {
theMin = FLT_MAX;
theMax = -FLT_MAX;
sumsq = float(0.0);
jcount = 0;
} }
} }
sampleCount stop = (where[pixel] - srcX) / divisor; // Loop over file positions
if (stop == x) int rmsDenom = 0;
stop++; for (; filePosition <= inclusiveEndPosition;) {
if (stop > num) // Find range of pixel columns for this file position
stop = num; // (normally just one, but maybe more when zoomed very close)
// and the range of positions for those columns
// (normally one or more, for that one column)
int pixelX = pixel + 1;
sampleCount positionX = 0;
while (pixelX < nextPixel &&
filePosition ==
(positionX = (std::min(s1 - 1, where[pixelX]) - start) / divisor)
)
++pixelX;
if (pixelX >= nextPixel)
positionX = 1 + inclusiveEndPosition;
switch (divisor) { // Find results to assign
default: rmsDenom = (positionX - filePosition);
case 1: wxASSERT(rmsDenom > 0);
while (x < stop) { const float *const pv =
if (temp[x] < theMin) temp + (filePosition - startPosition) * (divisor == 1 ? 1 : 3);
theMin = temp[x]; MinMaxSumsq values(pv, rmsDenom, divisor);
if (temp[x] > theMax)
theMax = temp[x]; // Assign results
sumsq += ((float)temp[x]) * ((float)temp[x]); std::fill(&min[pixel], &min[pixelX], values.min);
x++; std::fill(&max[pixel], &max[pixelX], values.max);
jcount++; std::fill(&bl[pixel], &bl[pixelX], blockStatus);
} std::fill(&rms[pixel], &rms[pixelX], (float)sqrt(values.sumsq / rmsDenom));
break;
case 256: pixel = pixelX;
case 65536: filePosition = positionX;
while (x < stop) {
if (temp[3 * x] < theMin)
theMin = temp[3 * x];
if (temp[3 * x + 1] > theMax)
theMax = temp[3 * x + 1];
sumsq += ((float)temp[3*x+2]) * ((float)temp[3*x+2]);
x++;
jcount++;
} }
break; wxASSERT(pixel == nextPixel);
} whereNow = whereNext;
} pixel = nextPixel;
lastDivisor = divisor;
lastRmsDenom = rmsDenom;
} // for each block file
b++; wxASSERT(pixel == len);
srcX += num * divisor;
if (b >= mBlock->GetCount())
break;
srcX = mBlock->Item(b)->start;
}
// Make sure that min[pixel - 1] doesn't segfault
if (pixel <= 0)
pixel = 1;
if (pixel == 0)
pixel++;
if (pixel == 0)
pixel++;
while (pixel <= len) {
min[pixel - 1] = theMin;
max[pixel - 1] = theMax;
bl[pixel - 1] = blockStatus;//mchinen
if (jcount > 0)
rms[pixel - 1] = (float)sqrt(sumsq / jcount);
else
rms[pixel - 1] = 0.0f;
pixel++;
}
delete[] temp; delete[] temp;

@ -79,9 +79,15 @@ class Sequence: public XMLTagHandler {
bool Set(samplePtr buffer, sampleFormat format, bool Set(samplePtr buffer, sampleFormat format,
sampleCount start, sampleCount len); sampleCount start, sampleCount len);
// where is input, assumed to be nondecreasing, and its size is len + 1.
// min, max, rms, bl are outputs, and their lengths are len.
// Each position in the output arrays corresponds to one column of pixels.
// The column for pixel p covers samples from
// where[p] up to (but excluding) where[p + 1].
// bl is negative wherever data are not yet available.
// Return true if successful.
bool GetWaveDisplay(float *min, float *max, float *rms,int* bl, bool GetWaveDisplay(float *min, float *max, float *rms,int* bl,
int len, const sampleCount *where, int len, const sampleCount *where);
double samplesPerPixel);
bool Copy(sampleCount s0, sampleCount s1, Sequence **dest); bool Copy(sampleCount s0, sampleCount s1, Sequence **dest);
bool Paste(sampleCount s0, const Sequence *src); bool Paste(sampleCount s0, const Sequence *src);

@ -740,6 +740,10 @@ wxScrolledWindow * ShuttleGuiBase::StartScroller(int iStyle)
Style( wxSUNKEN_BORDER ) ); Style( wxSUNKEN_BORDER ) );
pScroller->SetScrollRate( 20,20 ); pScroller->SetScrollRate( 20,20 );
// This fools NVDA into not saying "Panel" when the dialog gets focus
pScroller->SetName(wxT("\a"));
pScroller->SetLabel(wxT("\a"));
mpWind->SetBackgroundColour( mpWind->SetBackgroundColour(
iStyle==0 iStyle==0
? wxColour( 245,244,240) : ? wxColour( 245,244,240) :

@ -576,7 +576,7 @@ protected:
double mLastIndicator; double mLastIndicator;
double mLastCursor; double mLastCursor;
// Quick Play indicator postion // Quick-Play indicator postion
double mOldQPIndicatorPos; double mOldQPIndicatorPos;
int mTimeCount; int mTimeCount;

@ -25,6 +25,7 @@ UndoManager
#include <wx/hashset.h> #include <wx/hashset.h>
#include "BlockFile.h" #include "BlockFile.h"
#include "Diags.h"
#include "Internat.h" #include "Internat.h"
#include "Sequence.h" #include "Sequence.h"
#include "Track.h" #include "Track.h"

0
src/ViewInfo.cpp Normal file

@ -500,8 +500,7 @@ bool WaveClip::GetWaveDisplay(float *min, float *max, float *rms,int* bl,
&mWaveCache->rms[invStart], &mWaveCache->rms[invStart],
&mWaveCache->bl[invStart], &mWaveCache->bl[invStart],
invEnd-invStart, invEnd-invStart,
&mWaveCache->where[invStart], &mWaveCache->where[invStart]);
mRate / pixelsPerSecond);
//after check number of ODPixels //after check number of ODPixels
for(int j=invStart;j<invEnd;j++) for(int j=invStart;j<invEnd;j++)
{ {
@ -605,8 +604,7 @@ bool WaveClip::GetWaveDisplay(float *min, float *max, float *rms,int* bl,
&oldCache->rms[invStart], &oldCache->rms[invStart],
&oldCache->bl[invStart], &oldCache->bl[invStart],
invEnd-invStart, invEnd-invStart,
&oldCache->where[invStart], &oldCache->where[invStart]);
mRate / pixelsPerSecond);
} }
oldCache->ClearInvalidRegions(); oldCache->ClearInvalidRegions();
@ -717,8 +715,7 @@ bool WaveClip::GetWaveDisplay(float *min, float *max, float *rms,int* bl,
&mWaveCache->rms[p0], &mWaveCache->rms[p0],
&mWaveCache->bl[p0], &mWaveCache->bl[p0],
p1-p0, p1-p0,
&mWaveCache->where[p0], &mWaveCache->where[p0]))
mRate / pixelsPerSecond))
{ {
isLoadingOD=false; isLoadingOD=false;
mWaveCacheMutex.Unlock(); mWaveCacheMutex.Unlock();

@ -46,8 +46,8 @@ enum
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Ratio, float, wxTRANSLATE("Ratio"), 0.9f, -FLT_MAX, FLT_MAX, 1.0f ); Param( Ratio, float, XO("Ratio"), 0.9f, -FLT_MAX, FLT_MAX, 1.0f );
Param( NoClip, bool, wxTRANSLATE("Allow Clipping"), false, false, true, 1.0f ); Param( NoClip, bool, XO("Allow Clipping"), false, false, true, 1.0f );
Param( Amp, float, wxT(""), -0.91515f, -50.0, 50.0, 10.0f ); Param( Amp, float, wxT(""), -0.91515f, -50.0, 50.0, 10.0f );
// //
@ -83,7 +83,7 @@ wxString EffectAmplify::GetSymbol()
wxString EffectAmplify::GetDescription() wxString EffectAmplify::GetDescription()
{ {
// Note: This is useful only after ratio has been set. // Note: This is useful only after ratio has been set.
return wxTRANSLATE("Increases or decreases the volume of the audio you have selected"); return XO("Increases or decreases the volume of the audio you have selected");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -25,7 +25,7 @@
#include "Effect.h" #include "Effect.h"
#define AMPLIFY_PLUGIN_SYMBOL wxTRANSLATE("Amplify") #define AMPLIFY_PLUGIN_SYMBOL XO("Amplify")
class EffectAmplify : public Effect class EffectAmplify : public Effect
{ {

@ -36,13 +36,13 @@
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( DuckAmountDb, double, wxTRANSLATE("DuckAmountDb"), -12.0, -24.0, 0.0, 1 ); Param( DuckAmountDb, double, XO("DuckAmountDb"), -12.0, -24.0, 0.0, 1 );
Param( InnerFadeDownLen, double, wxTRANSLATE("InnerFadeDownLen"), 0.0, 0.0, 3.0, 1 ); Param( InnerFadeDownLen, double, XO("InnerFadeDownLen"), 0.0, 0.0, 3.0, 1 );
Param( InnerFadeUpLen, double, wxTRANSLATE("InnerFadeUpLen"), 0.0, 0.0, 3.0, 1 ); Param( InnerFadeUpLen, double, XO("InnerFadeUpLen"), 0.0, 0.0, 3.0, 1 );
Param( OuterFadeDownLen, double, wxTRANSLATE("OuterFadeDownLen"), 0.5, 0.0, 3.0, 1 ); Param( OuterFadeDownLen, double, XO("OuterFadeDownLen"), 0.5, 0.0, 3.0, 1 );
Param( OuterFadeUpLen, double, wxTRANSLATE("OuterFadeUpLen"), 0.5, 0.0, 3.0, 1 ); Param( OuterFadeUpLen, double, XO("OuterFadeUpLen"), 0.5, 0.0, 3.0, 1 );
Param( ThresholdDb, double, wxTRANSLATE("ThresholdDb"), -30.0, -100.0, 0.0, 1 ); Param( ThresholdDb, double, XO("ThresholdDb"), -30.0, -100.0, 0.0, 1 );
Param( MaximumPause, double, wxTRANSLATE("MaximumPause"), 1.0, 0.0, DBL_MAX, 1 ); Param( MaximumPause, double, XO("MaximumPause"), 1.0, 0.0, DBL_MAX, 1 );
/* /*
* Common constants * Common constants
@ -108,7 +108,7 @@ wxString EffectAutoDuck::GetSymbol()
wxString EffectAutoDuck::GetDescription() wxString EffectAutoDuck::GetDescription()
{ {
return wxTRANSLATE("Reduces (ducks) the volume of one or more tracks whenever the volume of a specified \"control\" track reaches a particular level"); return XO("Reduces (ducks) the volume of one or more tracks whenever the volume of a specified \"control\" track reaches a particular level");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -28,7 +28,7 @@ class EffectAutoDuckPanel;
#define AUTO_DUCK_PANEL_NUM_CONTROL_POINTS 5 #define AUTO_DUCK_PANEL_NUM_CONTROL_POINTS 5
#define AUTODUCK_PLUGIN_SYMBOL wxTRANSLATE("Auto Duck") #define AUTODUCK_PLUGIN_SYMBOL XO("Auto Duck")
class EffectAutoDuck : public Effect class EffectAutoDuck : public Effect
{ {

@ -44,10 +44,10 @@ enum
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Bass, double, wxTRANSLATE("Bass"), 0.0, -15.0, 15.0, 1 ); Param( Bass, double, XO("Bass"), 0.0, -15.0, 15.0, 1 );
Param( Treble, double, wxTRANSLATE("Treble"), 0.0, -15.0, 15.0, 1 ); Param( Treble, double, XO("Treble"), 0.0, -15.0, 15.0, 1 );
Param( Level, double, wxTRANSLATE("Level"), -1.0, -30.0, 0.0, 1 ); Param( Level, double, XO("Level"), -1.0, -30.0, 0.0, 1 );
Param( Normalize, bool, wxTRANSLATE("Normalize"), true, false, true, 1 ); Param( Normalize, bool, XO("Normalize"), true, false, true, 1 );
// Sliders are integer, so range is x 10 // Sliders are integer, so range is x 10
// to allow 1 decimal place resolution // to allow 1 decimal place resolution
@ -91,7 +91,7 @@ wxString EffectBassTreble::GetSymbol()
wxString EffectBassTreble::GetDescription() wxString EffectBassTreble::GetDescription()
{ {
return wxTRANSLATE("Increases or decreases the lower frequencies and higher frequencies of your audio independently"); return XO("Increases or decreases the lower frequencies and higher frequencies of your audio independently");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -23,7 +23,7 @@
#include "Effect.h" #include "Effect.h"
#define BASSTREBLE_PLUGIN_SYMBOL wxTRANSLATE("Bass and Treble") #define BASSTREBLE_PLUGIN_SYMBOL XO("Bass and Treble")
class EffectBassTreble : public Effect class EffectBassTreble : public Effect
{ {

@ -49,7 +49,7 @@ enum {
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Percentage, double, wxTRANSLATE("Percentage"), 0.0, -99.0, 3000.0, 1 ); Param( Percentage, double, XO("Percentage"), 0.0, -99.0, 3000.0, 1 );
// We warp the slider to go up to 400%, but user can enter up to 3000% // We warp the slider to go up to 400%, but user can enter up to 3000%
static const double kSliderMax = 100.0; // warped above zero to actually go up to 400% static const double kSliderMax = 100.0; // warped above zero to actually go up to 400%
@ -109,7 +109,7 @@ wxString EffectChangePitch::GetSymbol()
wxString EffectChangePitch::GetDescription() wxString EffectChangePitch::GetDescription()
{ {
return wxTRANSLATE("Change the pitch of a track without changing its tempo"); return XO("Change the pitch of a track without changing its tempo");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -31,7 +31,7 @@ the pitch without changing the tempo.
#include "SoundTouchEffect.h" #include "SoundTouchEffect.h"
#define CHANGEPITCH_PLUGIN_SYMBOL wxTRANSLATE("Change Pitch") #define CHANGEPITCH_PLUGIN_SYMBOL XO("Change Pitch")
class EffectChangePitch : public EffectSoundTouch class EffectChangePitch : public EffectSoundTouch
{ {

@ -57,7 +57,7 @@ static const wxChar *kVinylStrings[kNumVinyl] =
wxT("45"), wxT("45"),
wxT("78"), wxT("78"),
/* i18n-hint: n/a is an English abbreviation meaning "not applicable". */ /* i18n-hint: n/a is an English abbreviation meaning "not applicable". */
wxTRANSLATE("n/a"), XO("n/a"),
}; };
// Soundtouch is not reasonable below -99% or above 3000%. // Soundtouch is not reasonable below -99% or above 3000%.
@ -65,7 +65,7 @@ static const wxChar *kVinylStrings[kNumVinyl] =
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Percentage, double, wxTRANSLATE("Percentage"), 0.0, -99.0, 4900.0, 1 ); Param( Percentage, double, XO("Percentage"), 0.0, -99.0, 4900.0, 1 );
// We warp the slider to go up to 400%, but user can enter higher values // We warp the slider to go up to 400%, but user can enter higher values
static const double kSliderMax = 100.0; // warped above zero to actually go up to 400% static const double kSliderMax = 100.0; // warped above zero to actually go up to 400%
@ -111,7 +111,7 @@ wxString EffectChangeSpeed::GetSymbol()
wxString EffectChangeSpeed::GetDescription() wxString EffectChangeSpeed::GetDescription()
{ {
return wxTRANSLATE("Change the speed of a track, also changing its pitch"); return XO("Change the speed of a track, also changing its pitch");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -26,7 +26,7 @@
#include "Effect.h" #include "Effect.h"
#define CHANGESPEED_PLUGIN_SYMBOL wxTRANSLATE("Change Speed") #define CHANGESPEED_PLUGIN_SYMBOL XO("Change Speed")
class EffectChangeSpeed : public Effect class EffectChangeSpeed : public Effect
{ {

@ -43,7 +43,7 @@ enum
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Percentage, double, wxTRANSLATE("Percentage"), 0.0, -99.0, 3000.0, 1 ); Param( Percentage, double, XO("Percentage"), 0.0, -99.0, 3000.0, 1 );
// We warp the slider to go up to 400%, but user can enter higher values. // We warp the slider to go up to 400%, but user can enter higher values.
static const double kSliderMax = 100.0; // warped above zero to actually go up to 400% static const double kSliderMax = 100.0; // warped above zero to actually go up to 400%
@ -85,7 +85,7 @@ wxString EffectChangeTempo::GetSymbol()
wxString EffectChangeTempo::GetDescription() wxString EffectChangeTempo::GetDescription()
{ {
return wxTRANSLATE("Change the tempo of a selection without changing its pitch"); return XO("Change the tempo of a selection without changing its pitch");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -25,7 +25,7 @@
#include "SoundTouchEffect.h" #include "SoundTouchEffect.h"
#define CHANGETEMPO_PLUGIN_SYMBOL wxTRANSLATE("Change Tempo") #define CHANGETEMPO_PLUGIN_SYMBOL XO("Change Tempo")
class EffectChangeTempo : public EffectSoundTouch class EffectChangeTempo : public EffectSoundTouch
{ {

@ -46,8 +46,8 @@ enum
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Threshold, int, wxTRANSLATE("Threshold"), 200, 0, 900, 1 ); Param( Threshold, int, XO("Threshold"), 200, 0, 900, 1 );
Param( Width, int, wxTRANSLATE("Width"), 20, 0, 40, 1 ); Param( Width, int, XO("Width"), 20, 0, 40, 1 );
BEGIN_EVENT_TABLE(EffectClickRemoval, wxEvtHandler) BEGIN_EVENT_TABLE(EffectClickRemoval, wxEvtHandler)
EVT_SLIDER(ID_Thresh, EffectClickRemoval::OnThreshSlider) EVT_SLIDER(ID_Thresh, EffectClickRemoval::OnThreshSlider)
@ -78,7 +78,7 @@ wxString EffectClickRemoval::GetSymbol()
wxString EffectClickRemoval::GetDescription() wxString EffectClickRemoval::GetDescription()
{ {
return wxTRANSLATE("Click Removal is designed to remove clicks on audio tracks"); return XO("Click Removal is designed to remove clicks on audio tracks");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -27,7 +27,7 @@
#include "Effect.h" #include "Effect.h"
#define CLICKREMOVAL_PLUGIN_SYMBOL wxTRANSLATE("Click Removal") #define CLICKREMOVAL_PLUGIN_SYMBOL XO("Click Removal")
class EffectClickRemoval : public Effect class EffectClickRemoval : public Effect
{ {

@ -52,13 +52,13 @@ enum
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Threshold, double, wxTRANSLATE("Threshold"), -12.0, -60.0, -1.0, 1 ); Param( Threshold, double, XO("Threshold"), -12.0, -60.0, -1.0, 1 );
Param( NoiseFloor, double, wxTRANSLATE("NoiseFloor"), -40.0, -80.0, -20.0, 5 ); Param( NoiseFloor, double, XO("NoiseFloor"), -40.0, -80.0, -20.0, 5 );
Param( Ratio, double, wxTRANSLATE("Ratio"), 2.0, 1.5, 10.0, 2 ); Param( Ratio, double, XO("Ratio"), 2.0, 1.5, 10.0, 2 );
Param( AttackTime, double, wxTRANSLATE("AttackTime"), 0.2, 0.1, 5.0, 100 ); Param( AttackTime, double, XO("AttackTime"), 0.2, 0.1, 5.0, 100 );
Param( ReleaseTime, double, wxTRANSLATE("ReleaseTime"), 1.0, 1.0, 30.0, 10 ); Param( ReleaseTime, double, XO("ReleaseTime"), 1.0, 1.0, 30.0, 10 );
Param( Normalize, bool, wxTRANSLATE("Normalize"), true, false, true, 1 ); Param( Normalize, bool, XO("Normalize"), true, false, true, 1 );
Param( UsePeak, bool, wxTRANSLATE("UsePeak"), false, false, true, 1 ); Param( UsePeak, bool, XO("UsePeak"), false, false, true, 1 );
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EffectCompressor // EffectCompressor
@ -112,7 +112,7 @@ wxString EffectCompressor::GetSymbol()
wxString EffectCompressor::GetDescription() wxString EffectCompressor::GetDescription()
{ {
return wxTRANSLATE("Compresses the dynamic range of audio"); return XO("Compresses the dynamic range of audio");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -27,7 +27,7 @@
class EffectCompressorPanel; class EffectCompressorPanel;
#define COMPRESSOR_PLUGIN_SYMBOL wxTRANSLATE("Compressor") #define COMPRESSOR_PLUGIN_SYMBOL XO("Compressor")
class EffectCompressor : public EffectTwoPassSimpleMono class EffectCompressor : public EffectTwoPassSimpleMono
{ {

@ -27,9 +27,9 @@
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Sequence, wxString, wxTRANSLATE("Sequence"), wxT("audacity"), wxT(""), wxT(""), wxT("")); Param( Sequence, wxString, XO("Sequence"), wxT("audacity"), wxT(""), wxT(""), wxT(""));
Param( DutyCycle, double, wxTRANSLATE("Duty Cycle"), 55.0, 0.0, 100.0, 10.0 ); Param( DutyCycle, double, XO("Duty Cycle"), 55.0, 0.0, 100.0, 10.0 );
Param( Amplitude, double, wxTRANSLATE("Amplitude"), 0.8, 0.0, 1.0, 1 ); Param( Amplitude, double, XO("Amplitude"), 0.8, 0.0, 1.0, 1 );
static const double kFadeInOut = 250.0; // used for fadein/out needed to remove clicking noise static const double kFadeInOut = 250.0; // used for fadein/out needed to remove clicking noise
@ -62,7 +62,6 @@ EffectDtmf::EffectDtmf()
dtmfDutyCycle = DEF_DutyCycle; dtmfDutyCycle = DEF_DutyCycle;
dtmfAmplitude = DEF_Amplitude; dtmfAmplitude = DEF_Amplitude;
dtmfString = DEF_Sequence; dtmfString = DEF_Sequence;
mDuration = GetDefaultDuration();
dtmfTone = 0.0; dtmfTone = 0.0;
dtmfSilence = 0.0; dtmfSilence = 0.0;
} }
@ -80,7 +79,7 @@ wxString EffectDtmf::GetSymbol()
wxString EffectDtmf::GetDescription() wxString EffectDtmf::GetDescription()
{ {
return wxTRANSLATE("Generates dual-tone multi-frequency (DTMF) tones like those produced by the keypad on telephones"); return XO("Generates dual-tone multi-frequency (DTMF) tones like those produced by the keypad on telephones");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation
@ -99,6 +98,8 @@ int EffectDtmf::GetAudioOutCount()
bool EffectDtmf::ProcessInitialize(sampleCount WXUNUSED(totalLen), ChannelNames WXUNUSED(chanMap)) bool EffectDtmf::ProcessInitialize(sampleCount WXUNUSED(totalLen), ChannelNames WXUNUSED(chanMap))
{ {
double duration = GetDuration();
// all dtmf sequence durations in samples from seconds // all dtmf sequence durations in samples from seconds
// MJS: Note that mDuration is in seconds but will have been quantised to the units of the TTC. // MJS: Note that mDuration is in seconds but will have been quantised to the units of the TTC.
// If this was 'samples' and the project rate was lower than the track rate, // If this was 'samples' and the project rate was lower than the track rate,
@ -106,7 +107,7 @@ bool EffectDtmf::ProcessInitialize(sampleCount WXUNUSED(totalLen), ChannelNames
// However we are making our best efforts at creating what was asked for. // However we are making our best efforts at creating what was asked for.
sampleCount nT0 = (sampleCount)floor(mT0 * mSampleRate + 0.5); sampleCount nT0 = (sampleCount)floor(mT0 * mSampleRate + 0.5);
sampleCount nT1 = (sampleCount)floor((mT0 + mDuration) * mSampleRate + 0.5); sampleCount nT1 = (sampleCount)floor((mT0 + duration) * mSampleRate + 0.5);
numSamplesSequence = nT1 - nT0; // needs to be exact number of samples selected numSamplesSequence = nT1 - nT0; // needs to be exact number of samples selected
//make under-estimates if anything, and then redistribute the few remaining samples //make under-estimates if anything, and then redistribute the few remaining samples
@ -280,17 +281,6 @@ void EffectDtmf::PopulateOrExchange(ShuttleGui & S)
// value from saved config: this is useful is user wants to // value from saved config: this is useful is user wants to
// replace selection with dtmf sequence // replace selection with dtmf sequence
bool isSelection = false;
if (mT1 > mT0) {
// there is a selection: let's fit in there...
// MJS: note that this is just for the TTC and is independent of the track rate
// but we do need to make sure we have the right number of samples at the project rate
double quantMT0 = QUANTIZED_TIME(mT0, mProjectRate);
double quantMT1 = QUANTIZED_TIME(mT1, mProjectRate);
mDuration = quantMT1 - quantMT0;
isSelection = true;
}
S.AddSpace(0, 5); S.AddSpace(0, 5);
S.StartMultiColumn(2, wxCENTER); S.StartMultiColumn(2, wxCENTER);
{ {
@ -302,17 +292,16 @@ void EffectDtmf::PopulateOrExchange(ShuttleGui & S)
vldAmp.SetRange(MIN_Amplitude, MAX_Amplitude); vldAmp.SetRange(MIN_Amplitude, MAX_Amplitude);
S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 10)->SetValidator(vldAmp); S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 10)->SetValidator(vldAmp);
bool isSelection;
double duration = GetDuration(&isSelection);
S.AddPrompt(_("Duration:")); S.AddPrompt(_("Duration:"));
mDtmfDurationT = new mDtmfDurationT = new
NumericTextCtrl(NumericConverter::TIME, NumericTextCtrl(NumericConverter::TIME,
S.GetParent(), S.GetParent(),
wxID_ANY, wxID_ANY,
/* use this instead of "seconds" because if a selection is passed to the
* effect, I want it (mDuration) to be used as the duration, and with
* "seconds" this does not always work properly. For example, it rounds
* down to zero... */
isSelection ? _("hh:mm:ss + samples") : _("hh:mm:ss + milliseconds"), isSelection ? _("hh:mm:ss + samples") : _("hh:mm:ss + milliseconds"),
mDuration, duration,
mProjectRate, mProjectRate,
wxDefaultPosition, wxDefaultPosition,
wxDefaultSize, wxDefaultSize,
@ -355,7 +344,8 @@ bool EffectDtmf::TransferDataToWindow()
} }
mDtmfDutyS->SetValue(dtmfDutyCycle * SCL_DutyCycle); mDtmfDutyS->SetValue(dtmfDutyCycle * SCL_DutyCycle);
mDtmfDurationT->SetValue(mDuration);
mDtmfDurationT->SetValue(GetDuration());
UpdateUI(); UpdateUI();
@ -370,7 +360,7 @@ bool EffectDtmf::TransferDataFromWindow()
} }
dtmfDutyCycle = (double) mDtmfDutyS->GetValue() / SCL_DutyCycle; dtmfDutyCycle = (double) mDtmfDutyS->GetValue() / SCL_DutyCycle;
mDuration = mDtmfDurationT->GetValue(); SetDuration(mDtmfDurationT->GetValue());
// recalculate to make sure all values are up-to-date. This is especially // recalculate to make sure all values are up-to-date. This is especially
// important if the user did not change any values in the dialog // important if the user did not change any values in the dialog
@ -391,13 +381,13 @@ void EffectDtmf::Recalculate()
// no tones, all zero: don't do anything // no tones, all zero: don't do anything
// this should take care of the case where user got an empty // this should take care of the case where user got an empty
// dtmf sequence into the generator: track won't be generated // dtmf sequence into the generator: track won't be generated
mDuration = 0; SetDuration(0.0);
dtmfTone = 0; dtmfTone = 0;
dtmfSilence = mDuration; dtmfSilence = 0;
} else { } else {
if (dtmfNTones==1) { if (dtmfNTones==1) {
// single tone, as long as the sequence // single tone, as long as the sequence
dtmfTone = mDuration; dtmfTone = GetDuration();
dtmfSilence = 0; dtmfSilence = 0;
} else { } else {
// Don't be fooled by the fact that you divide the sequence into dtmfNTones: // Don't be fooled by the fact that you divide the sequence into dtmfNTones:
@ -409,7 +399,7 @@ void EffectDtmf::Recalculate()
// which can be simplified in the one below. // which can be simplified in the one below.
// Then just take the part that belongs to tone or silence. // Then just take the part that belongs to tone or silence.
// //
double slot = mDuration / ((double)dtmfNTones + (dtmfDutyCycle / 100.0) - 1); double slot = GetDuration() / ((double)dtmfNTones + (dtmfDutyCycle / 100.0) - 1);
dtmfTone = slot * (dtmfDutyCycle / 100.0); // seconds dtmfTone = slot * (dtmfDutyCycle / 100.0); // seconds
dtmfSilence = slot * (1.0 - (dtmfDutyCycle / 100.0)); // seconds dtmfSilence = slot * (1.0 - (dtmfDutyCycle / 100.0)); // seconds
@ -572,7 +562,7 @@ void EffectDtmf::OnSlider(wxCommandEvent & evt)
void EffectDtmf::OnText(wxCommandEvent & WXUNUSED(evt)) void EffectDtmf::OnText(wxCommandEvent & WXUNUSED(evt))
{ {
mDuration = mDtmfDurationT->GetValue(); SetDuration(mDtmfDurationT->GetValue());
mUIParent->TransferDataFromWindow(); mUIParent->TransferDataFromWindow();
Recalculate(); Recalculate();
UpdateUI(); UpdateUI();

@ -24,7 +24,7 @@
#include "Effect.h" #include "Effect.h"
#define DTMFTONES_PLUGIN_SYMBOL wxTRANSLATE("DTMF Tones") #define DTMFTONES_PLUGIN_SYMBOL XO("DTMF Tones")
class EffectDtmf : public Effect class EffectDtmf : public Effect
{ {

@ -32,8 +32,8 @@
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Delay, float, wxTRANSLATE("Delay"), 1.0, 0.0, FLT_MAX, 1 ); Param( Delay, float, XO("Delay"), 1.0, 0.0, FLT_MAX, 1 );
Param( Decay, float, wxTRANSLATE("Decay"), 0.5, 1.0, 1.0, 1 ); Param( Decay, float, XO("Decay"), 0.5, 1.0, 1.0, 1 );
EffectEcho::EffectEcho() EffectEcho::EffectEcho()
{ {
@ -54,7 +54,7 @@ wxString EffectEcho::GetSymbol()
wxString EffectEcho::GetDescription() wxString EffectEcho::GetDescription()
{ {
return wxTRANSLATE("Repeats the selected audio again and again"); return XO("Repeats the selected audio again and again");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -20,7 +20,7 @@
#include "Effect.h" #include "Effect.h"
#define ECHO_PLUGIN_SYMBOL wxTRANSLATE("Echo") #define ECHO_PLUGIN_SYMBOL XO("Echo")
class EffectEcho : public Effect class EffectEcho : public Effect
{ {

@ -646,26 +646,64 @@ double Effect::GetDefaultDuration()
return 30.0; return 30.0;
} }
double Effect::GetDuration() double Effect::GetDuration(bool *isSelection)
{ {
if (mT1 > mT0) if (mT1 > mT0)
{ {
return mT1 - mT0; // there is a selection: let's fit in there...
// MJS: note that this is just for the TTC and is independent of the track rate
// but we do need to make sure we have the right number of samples at the project rate
double quantMT0 = QUANTIZED_TIME(mT0, mProjectRate);
double quantMT1 = QUANTIZED_TIME(mT1, mProjectRate);
mDuration = quantMT1 - quantMT0;
if (isSelection)
{
*isSelection = true;
}
return mDuration;
}
if (isSelection)
{
*isSelection = false;
}
GetPrivateConfig(GetCurrentSettingsGroup(), wxT("LastUsedDuration"), mDuration, 0.0);
if (mDuration > 0.0)
{
return mDuration;
}
if (mDuration < 0.0)
{
mDuration = 0.0;
} }
if (GetType() == EffectTypeGenerate) if (GetType() == EffectTypeGenerate)
{ {
return GetDefaultDuration(); mDuration = GetDefaultDuration();
} }
return 0; return mDuration;
} }
bool Effect::SetDuration(double seconds) void Effect::SetDuration(double seconds)
{ {
if (seconds < 0.0)
{
seconds = 0.0;
}
if (mDuration != seconds)
{
SetPrivateConfig(GetCurrentSettingsGroup(), wxT("LastUsedDuration"), seconds);
}
mDuration = seconds; mDuration = seconds;
return true; return;
} }
bool Effect::Apply() bool Effect::Apply()
@ -961,9 +999,7 @@ bool Effect::DoEffect(wxWindow *parent,
SelectedRegion *selectedRegion, SelectedRegion *selectedRegion,
bool shouldPrompt /* = true */) bool shouldPrompt /* = true */)
{ {
double t0 = selectedRegion->t0(); wxASSERT(selectedRegion->duration() >= 0.0);
double t1 = selectedRegion->t1();
wxASSERT(t0 <= t1);
if (mOutputTracks) if (mOutputTracks)
{ {
@ -975,8 +1011,9 @@ bool Effect::DoEffect(wxWindow *parent,
mProjectRate = projectRate; mProjectRate = projectRate;
mParent = parent; mParent = parent;
mTracks = list; mTracks = list;
mT0 = t0; mT0 = selectedRegion->t0();
mT1 = t1; mT1 = selectedRegion->t1();
mDuration = GetDuration();
#ifdef EXPERIMENTAL_SPECTRAL_EDITING #ifdef EXPERIMENTAL_SPECTRAL_EDITING
mF0 = selectedRegion->f0(); mF0 = selectedRegion->f0();
mF1 = selectedRegion->f1(); mF1 = selectedRegion->f1();
@ -2409,6 +2446,10 @@ public:
EffectPanel(wxWindow *parent) EffectPanel(wxWindow *parent)
: wxPanel(parent) : wxPanel(parent)
{ {
// This fools NVDA into not saying "Panel" when the dialog gets focus
SetName(wxT("\a"));
SetLabel(wxT("\a"));
mAcceptsFocus = true; mAcceptsFocus = true;
} }
@ -2593,6 +2634,10 @@ bool EffectUIHost::Initialize()
wxPanel *bar = new wxPanel(this, wxID_ANY); wxPanel *bar = new wxPanel(this, wxID_ANY);
// This fools NVDA into not saying "Panel" when the dialog gets focus
bar->SetName(wxT("\a"));
bar->SetLabel(wxT("\a"));
wxBoxSizer *bs = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer *bs = new wxBoxSizer(wxHORIZONTAL);
mSupportsRealtime = mEffect->SupportsRealtime(); mSupportsRealtime = mEffect->SupportsRealtime();

@ -144,8 +144,8 @@ class AUDACITY_DLL_API Effect : public wxEvtHandler,
// EffectHostInterface implementation // EffectHostInterface implementation
virtual double GetDefaultDuration(); virtual double GetDefaultDuration();
virtual double GetDuration(); virtual double GetDuration(bool *isSelection = NULL);
virtual bool SetDuration(double duration); virtual void SetDuration(double duration);
virtual bool Apply(); virtual bool Apply();
virtual void Preview(); virtual void Preview();
@ -344,7 +344,6 @@ protected:
wxDialog *mUIDialog; wxDialog *mUIDialog;
wxWindow *mUIParent; wxWindow *mUIParent;
double mDuration;
sampleCount mSampleCnt; sampleCount mSampleCnt;
// type of the tracks on mOutputTracks // type of the tracks on mOutputTracks
@ -373,6 +372,8 @@ protected:
private: private:
wxWindow *mParent; wxWindow *mParent;
double mDuration;
wxArrayPtrVoid mIMap; wxArrayPtrVoid mIMap;
wxArrayPtrVoid mOMap; wxArrayPtrVoid mOMap;

@ -143,9 +143,9 @@ enum kInterpolations
static const wxString kInterpStrings[kNumInterpolations] = static const wxString kInterpStrings[kNumInterpolations] =
{ {
/* i18n-hint: Technical term for a kind of curve.*/ /* i18n-hint: Technical term for a kind of curve.*/
wxTRANSLATE("B-spline"), XO("B-spline"),
wxTRANSLATE("Cosine"), XO("Cosine"),
wxTRANSLATE("Cubic") XO("Cubic")
}; };
static const double kThirdOct[] = static const double kThirdOct[] =
@ -158,10 +158,10 @@ static const double kThirdOct[] =
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( FilterLength, int, wxTRANSLATE("FilterLength"), 4001, 21, 8191, 0 ); Param( FilterLength, int, XO("FilterLength"), 4001, 21, 8191, 0 );
Param( CurveName, wxChar*, wxTRANSLATE("CurveName"), wxT("unnamed"), wxT(""), wxT(""), wxT("")); Param( CurveName, wxChar*, XO("CurveName"), wxT("unnamed"), wxT(""), wxT(""), wxT(""));
Param( InterpLin, bool, wxTRANSLATE("InterpolateLin"), false, false, true, false ); Param( InterpLin, bool, XO("InterpolateLin"), false, false, true, false );
Param( InterpMeth, int, wxTRANSLATE("InterpolationMethod"), 0, 0, 0, 0 ); Param( InterpMeth, int, XO("InterpolationMethod"), 0, 0, 0, 0 );
Param( DrawMode, bool, wxT(""), true, false, true, false ); Param( DrawMode, bool, wxT(""), true, false, true, false );
Param( DrawGrid, bool, wxT(""), true, false, true, false ); Param( DrawGrid, bool, wxT(""), true, false, true, false );
Param( dBMin, float, wxT(""), -30.0, -120.0, -10.0, 0 ); Param( dBMin, float, wxT(""), -30.0, -120.0, -10.0, 0 );
@ -323,7 +323,7 @@ wxString EffectEqualization::GetSymbol()
wxString EffectEqualization::GetDescription() wxString EffectEqualization::GetDescription()
{ {
return wxTRANSLATE("Adjusts the volume levels of particular frequencies"); return XO("Adjusts the volume levels of particular frequencies");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -42,7 +42,7 @@
#include "../widgets/Ruler.h" #include "../widgets/Ruler.h"
#include "../RealFFTf.h" #include "../RealFFTf.h"
#define EQUALIZATION_PLUGIN_SYMBOL wxTRANSLATE("Equalization") #define EQUALIZATION_PLUGIN_SYMBOL XO("Equalization")
class EqualizationPanel; class EqualizationPanel;

@ -40,8 +40,8 @@ wxString EffectFade::GetSymbol()
wxString EffectFade::GetDescription() wxString EffectFade::GetDescription()
{ {
return mFadeIn return mFadeIn
? wxTRANSLATE("Applies a linear fade-in to the selected audio") ? XO("Applies a linear fade-in to the selected audio")
: wxTRANSLATE("Applies a linear fade-out to the selected audio"); : XO("Applies a linear fade-out to the selected audio");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -15,8 +15,8 @@
#include "Effect.h" #include "Effect.h"
#define FADEIN_PLUGIN_SYMBOL wxTRANSLATE("Fade In") #define FADEIN_PLUGIN_SYMBOL XO("Fade In")
#define FADEOUT_PLUGIN_SYMBOL wxTRANSLATE("Fade Out") #define FADEOUT_PLUGIN_SYMBOL XO("Fade Out")
class EffectFade : public Effect class EffectFade : public Effect
{ {

@ -30,11 +30,11 @@
#include "FindClipping.h" #include "FindClipping.h"
#define DEF_Start 3 // Define keys, defaults, minimums, and maximums for the effect parameters
#define MIN_Start 1 //
// Name Type Key Def Min Max Scale
#define DEF_Stop 3 Param( Start, int, XO("Duty Cycle"), 3, 1, INT_MAX, 1 );
#define MIN_Stop 1 Param( Stop, int, XO("Duty Cycle"), 3, 1, INT_MAX, 1 );
EffectFindClipping::EffectFindClipping() EffectFindClipping::EffectFindClipping()
{ {
@ -55,7 +55,7 @@ wxString EffectFindClipping::GetSymbol()
wxString EffectFindClipping::GetDescription() wxString EffectFindClipping::GetDescription()
{ {
return wxTRANSLATE("This displays runs of clipped samples in a Label Track"); return XO("This displays runs of clipped samples in a Label Track");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation
@ -69,24 +69,19 @@ EffectType EffectFindClipping::GetType()
bool EffectFindClipping::GetAutomationParameters(EffectAutomationParameters & parms) bool EffectFindClipping::GetAutomationParameters(EffectAutomationParameters & parms)
{ {
parms.Write(wxT("Start"), mStart); parms.Write(KEY_Start, mStart);
parms.Write(wxT("Stop"), mStop); parms.Write(KEY_Stop, mStop);
return true; return true;
} }
bool EffectFindClipping::SetAutomationParameters(EffectAutomationParameters & parms) bool EffectFindClipping::SetAutomationParameters(EffectAutomationParameters & parms)
{ {
int start; ReadAndVerifyInt(Start);
int stop; ReadAndVerifyInt(Stop);
parms.Read(wxT("Start"), &start, DEF_Start); mStart = Start;
parms.Read(wxT("Stop"), &stop, DEF_Stop); mStop = Stop;
if (start < MIN_Start || stop < MIN_Stop)
{
return false;
}
return true; return true;
} }

@ -21,7 +21,7 @@ class wxString;
#include "Effect.h" #include "Effect.h"
#define FINDCLIPPING_PLUGIN_SYMBOL wxTRANSLATE("Find Clipping") #define FINDCLIPPING_PLUGIN_SYMBOL XO("Find Clipping")
class EffectFindClipping : public Effect class EffectFindClipping : public Effect
{ {

@ -23,7 +23,7 @@
bool Generator::Process() bool Generator::Process()
{ {
if (mDuration < 0.0) if (GetDuration() < 0.0)
return false; return false;
@ -49,7 +49,7 @@ bool Generator::Process()
//make sure there's room. //make sure there's room.
if (!editClipCanMove && if (!editClipCanMove &&
track->IsEmpty(mT0, mT1+1.0/track->GetRate()) && track->IsEmpty(mT0, mT1+1.0/track->GetRate()) &&
!track->IsEmpty(mT0, mT0+mDuration-(mT1-mT0)-1.0/track->GetRate())) !track->IsEmpty(mT0, mT0+GetDuration()-(mT1-mT0)-1.0/track->GetRate()))
{ {
wxMessageBox( wxMessageBox(
_("There is not enough room available to generate the audio"), _("There is not enough room available to generate the audio"),
@ -58,7 +58,7 @@ bool Generator::Process()
return false; return false;
} }
if (mDuration > 0.0) if (GetDuration() > 0.0)
{ {
// Create a temporary track // Create a temporary track
std::auto_ptr<WaveTrack> tmp( std::auto_ptr<WaveTrack> tmp(
@ -74,7 +74,7 @@ bool Generator::Process()
else { else {
// Transfer the data from the temporary track to the actual one // Transfer the data from the temporary track to the actual one
tmp->Flush(); tmp->Flush();
SetTimeWarper(new StepTimeWarper(mT0+mDuration, mDuration-(mT1-mT0))); SetTimeWarper(new StepTimeWarper(mT0+GetDuration(), GetDuration()-(mT1-mT0)));
bGoodResult = track->ClearAndPaste(mT0, mT1, &*tmp, true, bGoodResult = track->ClearAndPaste(mT0, mT1, &*tmp, true,
false, GetTimeWarper()); false, GetTimeWarper());
} }
@ -94,7 +94,7 @@ bool Generator::Process()
ntrack++; ntrack++;
} }
else if (t->IsSyncLockSelected()) { else if (t->IsSyncLockSelected()) {
t->SyncLockAdjust(mT1, mT0 + mDuration); t->SyncLockAdjust(mT1, mT0 + GetDuration());
} }
// Move on to the next track // Move on to the next track
t = iter.Next(); t = iter.Next();
@ -104,7 +104,7 @@ bool Generator::Process()
this->ReplaceProcessedTracks(bGoodResult); this->ReplaceProcessedTracks(bGoodResult);
mT1 = mT0 + mDuration; // Update selection. mT1 = mT0 + GetDuration(); // Update selection.
return true; return true;
} }
@ -114,7 +114,7 @@ bool BlockGenerator::GenerateTrack(WaveTrack *tmp,
int ntrack) int ntrack)
{ {
bool bGoodResult = true; bool bGoodResult = true;
numSamples = track.TimeToLongSamples(mDuration); numSamples = track.TimeToLongSamples(GetDuration());
sampleCount i = 0; sampleCount i = 0;
float *data = new float[tmp->GetMaxBlockSize()]; float *data = new float[tmp->GetMaxBlockSize()];
sampleCount block = 0; sampleCount block = 0;

@ -24,12 +24,9 @@
class Generator : public Effect class Generator : public Effect
{ {
public: public:
Generator() : mDuration(GetDefaultDuration()) { } Generator() { }
protected: protected:
// Amount of time to generate, in seconds
double mDuration;
// [ GenerateTrack() must be overridden by the actual generator class ] // [ GenerateTrack() must be overridden by the actual generator class ]
// Precondition: mDuration > 0.0 // Precondition: mDuration > 0.0
// Postcondition: <tmp> is filled with the data intended for <track> // Postcondition: <tmp> is filled with the data intended for <track>

@ -37,7 +37,7 @@ wxString EffectInvert::GetSymbol()
wxString EffectInvert::GetDescription() wxString EffectInvert::GetDescription()
{ {
return wxTRANSLATE("Flips the audio samples upside-down, reversing their polarity"); return XO("Flips the audio samples upside-down, reversing their polarity");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -17,7 +17,7 @@
#include "Effect.h" #include "Effect.h"
#define INVERT_PLUGIN_SYMBOL wxTRANSLATE("Invert") #define INVERT_PLUGIN_SYMBOL XO("Invert")
class EffectInvert : public Effect class EffectInvert : public Effect
{ {

@ -38,19 +38,19 @@ enum kPasses
static const wxString kPassStrings[kNumPasses] = static const wxString kPassStrings[kNumPasses] =
{ {
/* i18n-hint: Of strength of an effect. Not strongly.*/ /* i18n-hint: Of strength of an effect. Not strongly.*/
wxTRANSLATE("Light"), XO("Light"),
wxTRANSLATE("Moderate"), XO("Moderate"),
/* i18n-hint: Of strength of an effect. Strongly.*/ /* i18n-hint: Of strength of an effect. Strongly.*/
wxTRANSLATE("Heavy"), XO("Heavy"),
wxTRANSLATE("Heavier"), XO("Heavier"),
wxTRANSLATE("Heaviest"), XO("Heaviest"),
}; };
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Level, int, wxTRANSLATE("dB"), 10, 0, Enums::NumDbChoices - 1, 1 ); Param( Level, int, XO("dB"), 10, 0, Enums::NumDbChoices - 1, 1 );
Param( Passes, int, wxTRANSLATE("Passes"), kModerate, 0, kNumPasses - 1, 1 ); Param( Passes, int, XO("Passes"), kModerate, 0, kNumPasses - 1, 1 );
// //
// EffectLeveller // EffectLeveller
@ -80,7 +80,7 @@ wxString EffectLeveller::GetSymbol()
wxString EffectLeveller::GetDescription() wxString EffectLeveller::GetDescription()
{ {
return wxTRANSLATE("Leveler is a simple, combined compressor and limiter effect for reducing the dynamic range of audio"); return XO("Leveler is a simple, combined compressor and limiter effect for reducing the dynamic range of audio");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -18,7 +18,7 @@
#include "Effect.h" #include "Effect.h"
#define LEVELLER_PLUGIN_SYMBOL wxTRANSLATE("Leveller") #define LEVELLER_PLUGIN_SYMBOL XO("Leveller")
class EffectLeveller : public Effect class EffectLeveller : public Effect
{ {

@ -220,17 +220,17 @@ wxString BuiltinEffectsModule::GetPath()
wxString BuiltinEffectsModule::GetSymbol() wxString BuiltinEffectsModule::GetSymbol()
{ {
return wxTRANSLATE("Builtin Effects"); return XO("Builtin Effects");
} }
wxString BuiltinEffectsModule::GetName() wxString BuiltinEffectsModule::GetName()
{ {
return wxTRANSLATE("Builtin Effects"); return XO("Builtin Effects");
} }
wxString BuiltinEffectsModule::GetVendor() wxString BuiltinEffectsModule::GetVendor()
{ {
return wxTRANSLATE("The Audacity Team"); return XO("The Audacity Team");
} }
wxString BuiltinEffectsModule::GetVersion() wxString BuiltinEffectsModule::GetVersion()
@ -241,7 +241,7 @@ wxString BuiltinEffectsModule::GetVersion()
wxString BuiltinEffectsModule::GetDescription() wxString BuiltinEffectsModule::GetDescription()
{ {
return wxTRANSLATE("Provides builtin effects to Audacity"); return XO("Provides builtin effects to Audacity");
} }
// ============================================================================ // ============================================================================

@ -37,14 +37,16 @@ enum kTypes
static const wxChar *kTypeStrings[kNumTypes] = static const wxChar *kTypeStrings[kNumTypes] =
{ {
wxTRANSLATE("White"), XO("White"),
wxTRANSLATE("Pink"), XO("Pink"),
wxTRANSLATE("Brownian") XO("Brownian")
}; };
// Define keys, defaults, minimums, and maximums for the effect parameters
//
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Type, int, wxTRANSLATE("Type"), kWhite, 0, kNumTypes - 1, 1 ); Param( Type, int, XO("Type"), kWhite, 0, kNumTypes - 1, 1 );
Param( Amp, double, wxTRANSLATE("Amplitude"), 0.8, 0.0, 1.0, 1 ); Param( Amp, double, XO("Amplitude"), 0.8, 0.0, 1.0, 1 );
// //
// EffectNoise // EffectNoise
@ -54,7 +56,6 @@ EffectNoise::EffectNoise()
{ {
mType = DEF_Type; mType = DEF_Type;
mAmp = DEF_Amp; mAmp = DEF_Amp;
mDuration = GetDefaultDuration();
y = z = buf0 = buf1 = buf2 = buf3 = buf4 = buf5 = buf6 = 0; y = z = buf0 = buf1 = buf2 = buf3 = buf4 = buf5 = buf6 = 0;
} }
@ -72,7 +73,7 @@ wxString EffectNoise::GetSymbol()
wxString EffectNoise::GetDescription() wxString EffectNoise::GetDescription()
{ {
return wxTRANSLATE("Generates one of three different types of noise"); return XO("Generates one of three different types of noise");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation
@ -220,18 +221,17 @@ void EffectNoise::PopulateOrExchange(ShuttleGui & S)
FloatingPointValidator<double> vldAmp(1, &mAmp, NUM_VAL_NO_TRAILING_ZEROES); FloatingPointValidator<double> vldAmp(1, &mAmp, NUM_VAL_NO_TRAILING_ZEROES);
vldAmp.SetRange(MIN_Amp, MAX_Amp); vldAmp.SetRange(MIN_Amp, MAX_Amp);
S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 12)->SetValidator(vldAmp); S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 12)->SetValidator(vldAmp);
S.AddPrompt(_("Duration:"));
bool isSelection;
double duration = GetDuration(&isSelection);
S.AddPrompt(_("Duration:"));
mNoiseDurationT = new mNoiseDurationT = new
NumericTextCtrl(NumericConverter::TIME, NumericTextCtrl(NumericConverter::TIME,
S.GetParent(), S.GetParent(),
wxID_ANY, wxID_ANY,
/* use this instead of "seconds" because if a selection is passed to isSelection ? _("hh:mm:ss + samples") : _("hh:mm:ss + milliseconds"),
* the effect, I want it (nDuration) to be used as the duration, and duration,
* with "seconds" this does not always work properly. For example,
* it rounds down to zero... */
(mT1 > mT0) ? _("hh:mm:ss + samples") : _("hh:mm:ss + milliseconds"),
mDuration,
mProjectRate, mProjectRate,
wxDefaultPosition, wxDefaultPosition,
wxDefaultSize, wxDefaultSize,
@ -250,7 +250,7 @@ bool EffectNoise::TransferDataToWindow()
return false; return false;
} }
mNoiseDurationT->SetValue(mDuration); mNoiseDurationT->SetValue(GetDuration());
return true; return true;
} }
@ -262,7 +262,7 @@ bool EffectNoise::TransferDataFromWindow()
return false; return false;
} }
mDuration = mNoiseDurationT->GetValue(); SetDuration(mNoiseDurationT->GetValue());
return true; return true;
} }

@ -20,7 +20,7 @@
#include "Effect.h" #include "Effect.h"
#define NOISE_PLUGIN_SYMBOL wxTRANSLATE("Noise") #define NOISE_PLUGIN_SYMBOL XO("Noise")
class EffectNoise : public Effect class EffectNoise : public Effect
{ {

@ -426,7 +426,7 @@ wxString EffectNoiseReduction::GetSymbol()
wxString EffectNoiseReduction::GetDescription() wxString EffectNoiseReduction::GetDescription()
{ {
return wxTRANSLATE("Removes background noise such as fans, tape noise, or hums"); return XO("Removes background noise such as fans, tape noise, or hums");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation
@ -1451,26 +1451,26 @@ const ControlInfo *controlInfo() {
static const ControlInfo table[] = { static const ControlInfo table[] = {
ControlInfo(&EffectNoiseReduction::Settings::mNoiseGain, ControlInfo(&EffectNoiseReduction::Settings::mNoiseGain,
0.0, 48.0, 48, wxT("%d"), true, 0.0, 48.0, 48, wxT("%d"), true,
wxTRANSLATE("&Noise reduction (dB):"), wxTRANSLATE("Noise reduction")), XO("&Noise reduction (dB):"), XO("Noise reduction")),
ControlInfo(&EffectNoiseReduction::Settings::mNewSensitivity, ControlInfo(&EffectNoiseReduction::Settings::mNewSensitivity,
0.0, 24.0, 48, wxT("%.2f"), false, 0.0, 24.0, 48, wxT("%.2f"), false,
wxTRANSLATE("&Sensitivity:"), wxTRANSLATE("Sensitivity")), XO("&Sensitivity:"), XO("Sensitivity")),
#ifdef ATTACK_AND_RELEASE #ifdef ATTACK_AND_RELEASE
ControlInfo(&EffectNoiseReduction::Settings::mAttackTime, ControlInfo(&EffectNoiseReduction::Settings::mAttackTime,
0, 1.0, 100, wxT("%.2f"), false, 0, 1.0, 100, wxT("%.2f"), false,
wxTRANSLATE("Attac&k time (secs):"), wxTRANSLATE("Attack time")), XO("Attac&k time (secs):"), XO("Attack time")),
ControlInfo(&EffectNoiseReduction::Settings::mReleaseTime, ControlInfo(&EffectNoiseReduction::Settings::mReleaseTime,
0, 1.0, 100, wxT("%.2f"), false, 0, 1.0, 100, wxT("%.2f"), false,
wxTRANSLATE("R&elease time (secs):"), wxTRANSLATE("Release time")), XO("R&elease time (secs):"), XO("Release time")),
#endif #endif
ControlInfo(&EffectNoiseReduction::Settings::mFreqSmoothingBands, ControlInfo(&EffectNoiseReduction::Settings::mFreqSmoothingBands,
0, 6, 6, wxT("%d"), true, 0, 6, 6, wxT("%d"), true,
wxTRANSLATE("&Frequency smoothing (bands):"), wxTRANSLATE("Frequency smoothing")), XO("&Frequency smoothing (bands):"), XO("Frequency smoothing")),
#ifdef ADVANCED_SETTINGS #ifdef ADVANCED_SETTINGS
ControlInfo(&EffectNoiseReduction::Settings::mOldSensitivity, ControlInfo(&EffectNoiseReduction::Settings::mOldSensitivity,
-20.0, 20.0, 4000, wxT("%.2f"), false, -20.0, 20.0, 4000, wxT("%.2f"), false,
wxTRANSLATE("Sensiti&vity (dB):"), wxTRANSLATE("Old Sensitivity")), XO("Sensiti&vity (dB):"), XO("Old Sensitivity")),
// add here // add here
#endif #endif
}; };

@ -17,7 +17,7 @@
#include <memory> #include <memory>
#define NOISEREDUCTION_PLUGIN_SYMBOL wxTRANSLATE("Noise Reduction") #define NOISEREDUCTION_PLUGIN_SYMBOL XO("Noise Reduction")
class EffectNoiseReduction: public Effect { class EffectNoiseReduction: public Effect {
public: public:

@ -115,12 +115,12 @@ EffectNoiseRemoval::~EffectNoiseRemoval()
wxString EffectNoiseRemoval::GetSymbol() wxString EffectNoiseRemoval::GetSymbol()
{ {
return wxTRANSLATE("Noise Removal"); return XO("Noise Removal");
} }
wxString EffectNoiseRemoval::GetDescription() wxString EffectNoiseRemoval::GetDescription()
{ {
return wxTRANSLATE("Removes constant background noise such as fans, tape noise, or hums"); return XO("Removes constant background noise such as fans, tape noise, or hums");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -33,10 +33,10 @@
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Level, double, wxTRANSLATE("Level"), 0.0, -145.0, 0.0, 1 ); Param( Level, double, XO("Level"), 0.0, -145.0, 0.0, 1 );
Param( RemoveDC, bool, wxTRANSLATE("RemoveDcOffset"), true, false, true, 1 ); Param( RemoveDC, bool, XO("RemoveDcOffset"), true, false, true, 1 );
Param( ApplyGain, bool, wxTRANSLATE("ApplyGain"), true, false, true, 1 ); Param( ApplyGain, bool, XO("ApplyGain"), true, false, true, 1 );
Param( StereoInd, bool, wxTRANSLATE("StereoIndependent"), false, false, true, 1 ); Param( StereoInd, bool, XO("StereoIndependent"), false, false, true, 1 );
BEGIN_EVENT_TABLE(EffectNormalize, wxEvtHandler) BEGIN_EVENT_TABLE(EffectNormalize, wxEvtHandler)
EVT_CHECKBOX(wxID_ANY, EffectNormalize::OnUpdateUI) EVT_CHECKBOX(wxID_ANY, EffectNormalize::OnUpdateUI)
@ -64,7 +64,7 @@ wxString EffectNormalize::GetSymbol()
wxString EffectNormalize::GetDescription() wxString EffectNormalize::GetDescription()
{ {
return wxTRANSLATE("Sets the peak amplitude of a one or more tracks"); return XO("Sets the peak amplitude of a one or more tracks");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -23,7 +23,7 @@
#include "Effect.h" #include "Effect.h"
#define NORMALIZE_PLUGIN_SYMBOL wxTRANSLATE("Normalize") #define NORMALIZE_PLUGIN_SYMBOL XO("Normalize")
class EffectNormalize : public Effect class EffectNormalize : public Effect
{ {

@ -28,11 +28,10 @@
#include "Paulstretch.h" #include "Paulstretch.h"
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Amount, float, wxTRANSLATE("Stretch Factor"), 10.0, 1.0, FLT_MAX, 1 ); Param( Amount, float, XO("Stretch Factor"), 10.0, 1.0, FLT_MAX, 1 );
Param( Time, float, wxTRANSLATE("Time Resolution"), 0.25f, 0.001f, FLT_MAX, 1 ); Param( Time, float, XO("Time Resolution"), 0.25f, 0.001f, FLT_MAX, 1 );
class PaulStretch class PaulStretch
{ {
@ -95,7 +94,7 @@ wxString EffectPaulstretch::GetSymbol()
wxString EffectPaulstretch::GetDescription() wxString EffectPaulstretch::GetDescription()
{ {
return wxTRANSLATE("Use Paulstretch only for an extreme time-stretch or \"stasis\" effect"); return XO("Use Paulstretch only for an extreme time-stretch or \"stasis\" effect");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -17,7 +17,7 @@
#include "Effect.h" #include "Effect.h"
#define PAULSTRETCH_PLUGIN_SYMBOL wxTRANSLATE("Paulstretch") #define PAULSTRETCH_PLUGIN_SYMBOL XO("Paulstretch")
class EffectPaulstretch : public Effect class EffectPaulstretch : public Effect
{ {

@ -39,13 +39,15 @@ enum
ID_Feedback ID_Feedback
}; };
// Define keys, defaults, minimums, and maximums for the effect parameters
//
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Stages, int, wxTRANSLATE("Stages"), 2, 2, NUM_STAGES, 1 ); Param( Stages, int, XO("Stages"), 2, 2, NUM_STAGES, 1 );
Param( DryWet, int, wxTRANSLATE("DryWet"), 128, 0, 255, 1 ); Param( DryWet, int, XO("DryWet"), 128, 0, 255, 1 );
Param( Freq, double, wxTRANSLATE("Freq"), 0.4, 0.1, 4.0, 10 ); Param( Freq, double, XO("Freq"), 0.4, 0.1, 4.0, 10 );
Param( Phase, double, wxTRANSLATE("Phase"), 0.0, 0.0, 359.0, 1 ); Param( Phase, double, XO("Phase"), 0.0, 0.0, 359.0, 1 );
Param( Depth, int, wxTRANSLATE("Depth"), 100, 0, 255, 1 ); Param( Depth, int, XO("Depth"), 100, 0, 255, 1 );
Param( Feedback, int, wxTRANSLATE("Feedback"), 0, -100, 100, 1 ); Param( Feedback, int, XO("Feedback"), 0, -100, 100, 1 );
// //
#define phaserlfoshape 4.0 #define phaserlfoshape 4.0
@ -95,7 +97,7 @@ wxString EffectPhaser::GetSymbol()
wxString EffectPhaser::GetDescription() wxString EffectPhaser::GetDescription()
{ {
return wxTRANSLATE("Combines phase-shifted signals with the original signal"); return XO("Combines phase-shifted signals with the original signal");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -27,7 +27,7 @@
#define NUM_STAGES 24 #define NUM_STAGES 24
#define PHASER_PLUGIN_SYMBOL wxTRANSLATE("Phaser") #define PHASER_PLUGIN_SYMBOL XO("Phaser")
class EffectPhaser : public Effect class EffectPhaser : public Effect
{ {

@ -50,7 +50,7 @@ wxString EffectRepair::GetSymbol()
wxString EffectRepair::GetDescription() wxString EffectRepair::GetDescription()
{ {
return wxTRANSLATE("Sets the peak amplitude of a one or more tracks"); return XO("Sets the peak amplitude of a one or more tracks");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -15,7 +15,7 @@
#include "Effect.h" #include "Effect.h"
#define REPAIR_PLUGIN_SYMBOL wxTRANSLATE("Repair") #define REPAIR_PLUGIN_SYMBOL XO("Repair")
class WaveTrack; class WaveTrack;

@ -35,6 +35,11 @@
#include "Repeat.h" #include "Repeat.h"
// Define keys, defaults, minimums, and maximums for the effect parameters
//
// Name Type Key Def Min Max Scale
Param( Count, int, XO("Count"), 10, 2, INT_MAX, 1 );
BEGIN_EVENT_TABLE(EffectRepeat, wxEvtHandler) BEGIN_EVENT_TABLE(EffectRepeat, wxEvtHandler)
EVT_TEXT(wxID_ANY, EffectRepeat::OnRepeatTextChange) EVT_TEXT(wxID_ANY, EffectRepeat::OnRepeatTextChange)
END_EVENT_TABLE() END_EVENT_TABLE()
@ -57,7 +62,7 @@ wxString EffectRepeat::GetSymbol()
wxString EffectRepeat::GetDescription() wxString EffectRepeat::GetDescription()
{ {
return wxTRANSLATE("Repeats the selection the specified number of times"); return XO("Repeats the selection the specified number of times");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation
@ -71,23 +76,16 @@ EffectType EffectRepeat::GetType()
bool EffectRepeat::GetAutomationParameters(EffectAutomationParameters & parms) bool EffectRepeat::GetAutomationParameters(EffectAutomationParameters & parms)
{ {
parms.Write(wxT("Count"), repeatCount); parms.Write(KEY_Count, repeatCount);
return true; return true;
} }
bool EffectRepeat::SetAutomationParameters(EffectAutomationParameters & parms) bool EffectRepeat::SetAutomationParameters(EffectAutomationParameters & parms)
{ {
int count; ReadAndVerifyInt(Count);
parms.Read(wxT("Count"), &count, 10); repeatCount = Count;
if (count < 0 || count > 2147483647 / mProjectRate)
{
return false;
}
repeatCount = count;
return true; return true;
} }
@ -174,7 +172,7 @@ void EffectRepeat::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(wxCENTER, false); S.StartHorizontalLay(wxCENTER, false);
{ {
IntegerValidator<int> vldRepeatCount(&repeatCount); IntegerValidator<int> vldRepeatCount(&repeatCount);
vldRepeatCount.SetRange(1, 2147483647 / mProjectRate); vldRepeatCount.SetRange(MIN_Count, 2147483647 / mProjectRate);
mRepeatCount = S.AddTextBox(_("Number of times to repeat:"), wxT(""), 12); mRepeatCount = S.AddTextBox(_("Number of times to repeat:"), wxT(""), 12);
mRepeatCount->SetValidator(vldRepeatCount); mRepeatCount->SetValidator(vldRepeatCount);
} }

@ -20,7 +20,7 @@
#include "Effect.h" #include "Effect.h"
#define REPEAT_PLUGIN_SYMBOL wxTRANSLATE("Repeat") #define REPEAT_PLUGIN_SYMBOL XO("Repeat")
class EffectRepeat : public Effect class EffectRepeat : public Effect
{ {

@ -43,16 +43,16 @@ enum
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( RoomSize, double, wxTRANSLATE("RoomSize"), 75, 0, 100, 1 ); Param( RoomSize, double, XO("RoomSize"), 75, 0, 100, 1 );
Param( PreDelay, double, wxTRANSLATE("Delay"), 10, 0, 200, 1 ); Param( PreDelay, double, XO("Delay"), 10, 0, 200, 1 );
Param( Reverberance, double, wxTRANSLATE("Reverberance"), 50, 0, 100, 1 ); Param( Reverberance, double, XO("Reverberance"), 50, 0, 100, 1 );
Param( HfDamping, double, wxTRANSLATE("HfDamping"), 50, 0, 100, 1 ); Param( HfDamping, double, XO("HfDamping"), 50, 0, 100, 1 );
Param( ToneLow, double, wxTRANSLATE("ToneLow"), 100, 0, 100, 1 ); Param( ToneLow, double, XO("ToneLow"), 100, 0, 100, 1 );
Param( ToneHigh, double, wxTRANSLATE("ToneHigh"), 100, 0, 100, 1 ); Param( ToneHigh, double, XO("ToneHigh"), 100, 0, 100, 1 );
Param( WetGain, double, wxTRANSLATE("WetGain"), -1, -20, 10, 1 ); Param( WetGain, double, XO("WetGain"), -1, -20, 10, 1 );
Param( DryGain, double, wxTRANSLATE("DryGain"), -1, -20, 10, 1 ); Param( DryGain, double, XO("DryGain"), -1, -20, 10, 1 );
Param( StereoWidth, double, wxTRANSLATE("StereoWidth"), 100, 0, 100, 1 ); Param( StereoWidth, double, XO("StereoWidth"), 100, 0, 100, 1 );
Param( WetOnly, bool, wxTRANSLATE("WetOnly"), false, false, true, 1 ); Param( WetOnly, bool, XO("WetOnly"), false, false, true, 1 );
static const struct static const struct
{ {
@ -63,15 +63,15 @@ FactoryPresets[] =
{ {
// Room Pre Hf Tone Tone Wet Dry Stereo Wet // Room Pre Hf Tone Tone Wet Dry Stereo Wet
// Name Size, Delay, Reverb, Damping, Low, High, Gain, Gain, Width, Only // Name Size, Delay, Reverb, Damping, Low, High, Gain, Gain, Width, Only
wxTRANSLATE("Vocal I" ), { 70, 20, 40, 99, 100, 50, -12, 0, 70, false }, XO("Vocal I" ), { 70, 20, 40, 99, 100, 50, -12, 0, 70, false },
wxTRANSLATE("Vocal II"), { 50, 0, 50, 99, 50, 100, -1, -1, 70, false }, XO("Vocal II"), { 50, 0, 50, 99, 50, 100, -1, -1, 70, false },
wxTRANSLATE("Bathroom"), { 16, 8, 80, 0, 0, 100, -6, 0, 100, false }, XO("Bathroom"), { 16, 8, 80, 0, 0, 100, -6, 0, 100, false },
wxTRANSLATE("Small Room Bright"), { 30, 10, 50, 50, 50, 100, -1, -1, 100, false }, XO("Small Room Bright"), { 30, 10, 50, 50, 50, 100, -1, -1, 100, false },
wxTRANSLATE("Small Room Dark"), { 30, 10, 50, 50, 100, 0, -1, -1, 100, false }, XO("Small Room Dark"), { 30, 10, 50, 50, 100, 0, -1, -1, 100, false },
wxTRANSLATE("Medium Room"), { 75, 10, 40, 50, 100, 70, -1, -1, 70, false }, XO("Medium Room"), { 75, 10, 40, 50, 100, 70, -1, -1, 70, false },
wxTRANSLATE("Large Room"), { 85, 10, 40, 50, 100, 80, 0, -6, 90, false }, XO("Large Room"), { 85, 10, 40, 50, 100, 80, 0, -6, 90, false },
wxTRANSLATE("Church Hall"), { 90, 32, 60, 50, 100, 50, 0, -12, 100, false }, XO("Church Hall"), { 90, 32, 60, 50, 100, 50, 0, -12, 100, false },
wxTRANSLATE("Cathedral"), { 90, 16, 90, 50, 100, 0, 0, -20, 100, false }, XO("Cathedral"), { 90, 16, 90, 50, 100, 0, 0, -20, 100, false },
}; };
struct Reverb_priv_t struct Reverb_priv_t
@ -134,7 +134,7 @@ wxString EffectReverb::GetSymbol()
wxString EffectReverb::GetDescription() wxString EffectReverb::GetDescription()
{ {
return wxTRANSLATE("Adds ambience or a \"hall effect\""); return XO("Adds ambience or a \"hall effect\"");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -22,7 +22,7 @@
#include "Effect.h" #include "Effect.h"
#define REVERB_PLUGIN_SYMBOL wxTRANSLATE("Reverb") #define REVERB_PLUGIN_SYMBOL XO("Reverb")
struct Reverb_priv_t; struct Reverb_priv_t;

@ -45,7 +45,7 @@ wxString EffectReverse::GetSymbol()
wxString EffectReverse::GetDescription() wxString EffectReverse::GetDescription()
{ {
return wxTRANSLATE("Reverses the selected audio"); return XO("Reverses the selected audio");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -19,7 +19,7 @@
#include "Effect.h" #include "Effect.h"
#define REVERSE_PLUGIN_SYMBOL wxTRANSLATE("Reverse") #define REVERSE_PLUGIN_SYMBOL XO("Reverse")
class EffectReverse : public Effect class EffectReverse : public Effect
{ {

@ -88,11 +88,11 @@ enum kTypes
static const wxChar *kTypeStrings[] = static const wxChar *kTypeStrings[] =
{ {
/*i18n-hint: Butterworth is the name of the person after whom the filter type is named.*/ /*i18n-hint: Butterworth is the name of the person after whom the filter type is named.*/
wxTRANSLATE("Butterworth"), XO("Butterworth"),
/*i18n-hint: Chebyshev is the name of the person after whom the filter type is named.*/ /*i18n-hint: Chebyshev is the name of the person after whom the filter type is named.*/
wxTRANSLATE("Chebyshev Type I"), XO("Chebyshev Type I"),
/*i18n-hint: Chebyshev is the name of the person after whom the filter type is named.*/ /*i18n-hint: Chebyshev is the name of the person after whom the filter type is named.*/
wxTRANSLATE("Chebyshev Type II") XO("Chebyshev Type II")
}; };
enum kSubTypes enum kSubTypes
@ -104,19 +104,19 @@ enum kSubTypes
static const wxChar *kSubTypeStrings[] = static const wxChar *kSubTypeStrings[] =
{ {
wxTRANSLATE("Lowpass"), XO("Lowpass"),
wxTRANSLATE("Highpass") XO("Highpass")
}; };
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( Type, int, wxTRANSLATE("FilterType"), kButterworth, 0, kNumTypes - 1, 1 ); Param( Type, int, XO("FilterType"), kButterworth, 0, kNumTypes - 1, 1 );
Param( Subtype, int, wxTRANSLATE("FilterSubtype"), kLowPass, 0, kNumSubTypes - 1, 1 ); Param( Subtype, int, XO("FilterSubtype"), kLowPass, 0, kNumSubTypes - 1, 1 );
Param( Order, int, wxTRANSLATE("Order"), 1, 1, 10, 1 ); Param( Order, int, XO("Order"), 1, 1, 10, 1 );
Param( Cutoff, float, wxTRANSLATE("Cutoff"), 1000.0, 1.0, FLT_MAX, 1 ); Param( Cutoff, float, XO("Cutoff"), 1000.0, 1.0, FLT_MAX, 1 );
Param( Passband, float, wxTRANSLATE("PassbandRipple"), 1.0, 0.0, 100.0, 1 ); Param( Passband, float, XO("PassbandRipple"), 1.0, 0.0, 100.0, 1 );
Param( Stopband, float, wxTRANSLATE("StopbandRipple"), 30.0, 0.0, 100.0, 1 ); Param( Stopband, float, XO("StopbandRipple"), 30.0, 0.0, 100.0, 1 );
static const double s_fChebyCoeffs[MAX_Order][MAX_Order + 1] = static const double s_fChebyCoeffs[MAX_Order][MAX_Order + 1] =
{ {
@ -190,7 +190,7 @@ wxString EffectScienFilter::GetSymbol()
wxString EffectScienFilter::GetDescription() wxString EffectScienFilter::GetDescription()
{ {
return wxTRANSLATE("Performs IIR filtering that emulates analog filters"); return XO("Performs IIR filtering that emulates analog filters");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -29,7 +29,7 @@ Vaughan Johnson (Preview)
#include "Effect.h" #include "Effect.h"
#define CLASSICFILTERS_PLUGIN_SYMBOL wxTRANSLATE("Classic Filters") #define CLASSICFILTERS_PLUGIN_SYMBOL XO("Classic Filters")
class EffectScienFilterPanel; class EffectScienFilterPanel;

@ -21,7 +21,6 @@
EffectSilence::EffectSilence() EffectSilence::EffectSilence()
{ {
mDuration = GetDuration();
} }
EffectSilence::~EffectSilence() EffectSilence::~EffectSilence()
@ -37,7 +36,7 @@ wxString EffectSilence::GetSymbol()
wxString EffectSilence::GetDescription() wxString EffectSilence::GetDescription()
{ {
return wxTRANSLATE("Creates audio of zero amplitude"); return XO("Creates audio of zero amplitude");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation
@ -55,22 +54,22 @@ void EffectSilence::PopulateOrExchange(ShuttleGui & S)
{ {
S.StartHorizontalLay(); S.StartHorizontalLay();
{ {
bool isSelection;
double duration = GetDuration(&isSelection);
S.AddPrompt(_("Duration:")); S.AddPrompt(_("Duration:"));
if (S.GetMode() == eIsCreating)
{
mDurationT = new mDurationT = new
NumericTextCtrl(NumericConverter::TIME, NumericTextCtrl(NumericConverter::TIME,
S.GetParent(), S.GetParent(),
wxID_ANY, wxID_ANY,
(mT1 > mT0) ? _("hh:mm:ss + samples") : _("hh:mm:ss + milliseconds"), isSelection ? _("hh:mm:ss + samples") : _("hh:mm:ss + milliseconds"),
mDuration, duration,
mProjectRate, mProjectRate,
wxDefaultPosition, wxDefaultPosition,
wxDefaultSize, wxDefaultSize,
true); true);
mDurationT->SetName(_("Duration")); mDurationT->SetName(_("Duration"));
mDurationT->EnableMenu(); mDurationT->EnableMenu();
}
S.AddWindow(mDurationT, wxALIGN_CENTER | wxALL); S.AddWindow(mDurationT, wxALIGN_CENTER | wxALL);
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
@ -82,14 +81,14 @@ void EffectSilence::PopulateOrExchange(ShuttleGui & S)
bool EffectSilence::TransferDataToWindow() bool EffectSilence::TransferDataToWindow()
{ {
mDurationT->SetValue(mDuration); mDurationT->SetValue(GetDuration());
return true; return true;
} }
bool EffectSilence::TransferDataFromWindow() bool EffectSilence::TransferDataFromWindow()
{ {
mDuration = mDurationT->GetValue(); SetDuration(mDurationT->GetValue());
return true; return true;
} }
@ -98,7 +97,7 @@ bool EffectSilence::GenerateTrack(WaveTrack *tmp,
const WaveTrack & WXUNUSED(track), const WaveTrack & WXUNUSED(track),
int WXUNUSED(ntrack)) int WXUNUSED(ntrack))
{ {
bool bResult = tmp->InsertSilence(0.0, mDuration); bool bResult = tmp->InsertSilence(0.0, GetDuration());
wxASSERT(bResult); wxASSERT(bResult);
return bResult; return bResult;
} }

@ -20,7 +20,7 @@
#include "Generator.h" #include "Generator.h"
#define SILENCE_PLUGIN_SYMBOL wxTRANSLATE("Silence") #define SILENCE_PLUGIN_SYMBOL XO("Silence")
class EffectSilence : public Generator class EffectSilence : public Generator
{ {

@ -36,7 +36,7 @@ wxString EffectStereoToMono::GetSymbol()
wxString EffectStereoToMono::GetDescription() wxString EffectStereoToMono::GetDescription()
{ {
return wxTRANSLATE("Converts stereo tracks to mono"); return XO("Converts stereo tracks to mono");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -15,7 +15,7 @@
#include "Effect.h" #include "Effect.h"
#define STEREOTOMONO_PLUGIN_SYMBOL wxTRANSLATE("Stereo To Mono") #define STEREOTOMONO_PLUGIN_SYMBOL XO("Stereo To Mono")
class EffectStereoToMono : public Effect class EffectStereoToMono : public Effect
{ {

@ -39,12 +39,12 @@ enum
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( RatePercentStart, double, wxTRANSLATE("RatePercentChangeStart"), 0.0, -90.0, 500, 1 ); Param( RatePercentStart, double, XO("RatePercentChangeStart"), 0.0, -90.0, 500, 1 );
Param( RatePercentEnd, double, wxTRANSLATE("RatePercentChangeEnd"), 0.0, -90.0, 500, 1 ); Param( RatePercentEnd, double, XO("RatePercentChangeEnd"), 0.0, -90.0, 500, 1 );
Param( HalfStepsStart, double, wxTRANSLATE("PitchHalfStepsStart"), 0.0, -12.0, 12.0, 1 ); Param( HalfStepsStart, double, XO("PitchHalfStepsStart"), 0.0, -12.0, 12.0, 1 );
Param( HalfStepsEnd, double, wxTRANSLATE("PitchHalfStepsEnd"), 0.0, -12.0, 12.0, 1 ); Param( HalfStepsEnd, double, XO("PitchHalfStepsEnd"), 0.0, -12.0, 12.0, 1 );
Param( PitchPercentStart, double, wxTRANSLATE("PitchPercentChangeStart"), 0.0, -50.0, 100.0, 1 ); Param( PitchPercentStart, double, XO("PitchPercentChangeStart"), 0.0, -50.0, 100.0, 1 );
Param( PitchPercentEnd, double, wxTRANSLATE("PitchPercentChangeEnd"), 0.0, -50.0, 100.0, 1 ); Param( PitchPercentEnd, double, XO("PitchPercentChangeEnd"), 0.0, -50.0, 100.0, 1 );
// //
// EffectTimeScale // EffectTimeScale
@ -84,12 +84,12 @@ wxString EffectTimeScale::GetSymbol()
wxString EffectTimeScale::GetName() wxString EffectTimeScale::GetName()
{ {
return wxTRANSLATE("Sliding Time Scale/Pitch Shift"); return XO("Sliding Time Scale/Pitch Shift");
} }
wxString EffectTimeScale::GetDescription() wxString EffectTimeScale::GetDescription()
{ {
return wxTRANSLATE("Allows continuous changes to the tempo and/or pitch"); return XO("Allows continuous changes to the tempo and/or pitch");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -24,7 +24,7 @@
#include "SBSMSEffect.h" #include "SBSMSEffect.h"
#define TIMESCALE_PLUGIN_SYMBOL wxTRANSLATE("Time Scale") #define TIMESCALE_PLUGIN_SYMBOL XO("Time Scale")
class EffectTimeScale : public EffectSBSMS class EffectTimeScale : public EffectSBSMS
{ {

@ -24,6 +24,7 @@ frequency changes smoothly during the tone.
#include <float.h> #include <float.h>
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/valgen.h>
#include "../Project.h" #include "../Project.h"
#include "../widgets/NumericTextCtrl.h" #include "../widgets/NumericTextCtrl.h"
@ -40,8 +41,8 @@ enum kInterpolations
static const wxString kInterStrings[kNumInterpolations] = static const wxString kInterStrings[kNumInterpolations] =
{ {
wxTRANSLATE("Linear"), XO("Linear"),
wxTRANSLATE("Logarithmic") XO("Logarithmic")
}; };
enum kWaveforms enum kWaveforms
@ -55,23 +56,23 @@ enum kWaveforms
static const wxString kWaveStrings[kNumWaveforms] = static const wxString kWaveStrings[kNumWaveforms] =
{ {
wxTRANSLATE("Sine"), XO("Sine"),
wxTRANSLATE("Square"), XO("Square"),
wxTRANSLATE("Sawtooth"), XO("Sawtooth"),
wxTRANSLATE("Square, no alias") XO("Square, no alias")
}; };
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( StartFreq, double, wxTRANSLATE("StartFreq"), 440.0, 1.0, DBL_MAX, 1 ); Param( StartFreq, double, XO("StartFreq"), 440.0, 1.0, DBL_MAX, 1 );
Param( EndFreq, double, wxTRANSLATE("EndFreq"), 1320.0, 1.0, DBL_MAX, 1 ); Param( EndFreq, double, XO("EndFreq"), 1320.0, 1.0, DBL_MAX, 1 );
Param( StartAmp, double, wxTRANSLATE("StartAmp"), 0.8, 0.0, 1.0, 1 ); Param( StartAmp, double, XO("StartAmp"), 0.8, 0.0, 1.0, 1 );
Param( EndAmp, double, wxTRANSLATE("EndAmp"), 0.1, 0.0, 1.0, 1 ); Param( EndAmp, double, XO("EndAmp"), 0.1, 0.0, 1.0, 1 );
Param( Frequency, double, wxTRANSLATE("Frequency"), 440.0, 1.0, DBL_MAX, 1 ); Param( Frequency, double, XO("Frequency"), 440.0, 1.0, DBL_MAX, 1 );
Param( Amplitude, double, wxTRANSLATE("Amplitude"), 0.8, 0.0, 1.0, 1 ); Param( Amplitude, double, XO("Amplitude"), 0.8, 0.0, 1.0, 1 );
Param( Waveform, int, wxTRANSLATE("Waveform"), 0, 0, kNumWaveforms - 1, 1 ); Param( Waveform, int, XO("Waveform"), 0, 0, kNumWaveforms - 1, 1 );
Param( Interp, int, wxTRANSLATE("Interpolation"), 0, 0, kNumInterpolations - 1, 1 ); Param( Interp, int, XO("Interpolation"), 0, 0, kNumInterpolations - 1, 1 );
// //
// EffectToneGen // EffectToneGen
@ -94,7 +95,6 @@ EffectToneGen::EffectToneGen(bool isChirp)
mAmplitude[0] = DEF_StartAmp; mAmplitude[0] = DEF_StartAmp;
mAmplitude[1] = DEF_EndAmp; mAmplitude[1] = DEF_EndAmp;
mInterpolation = DEF_Interp; mInterpolation = DEF_Interp;
mDuration = GetDuration();
for (int i = 0; i < kNumWaveforms; i++) for (int i = 0; i < kNumWaveforms; i++)
{ {
@ -123,8 +123,8 @@ wxString EffectToneGen::GetSymbol()
wxString EffectToneGen::GetDescription() wxString EffectToneGen::GetDescription()
{ {
return mChirp return mChirp
? wxTRANSLATE("Generates four different types of tone waveform while allowing starting and ending amplitude and frequency") ? XO("Generates four different types of tone waveform while allowing starting and ending amplitude and frequency")
: wxTRANSLATE("Generates four different types of tone waveform"); : XO("Generates four different types of tone waveform");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation
@ -300,7 +300,8 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
S.StartMultiColumn(2, wxCENTER); S.StartMultiColumn(2, wxCENTER);
{ {
S.TieChoice(_("Waveform:"), mWaveform, &mWaveforms); wxChoice *c = S.AddChoice(_("Waveform:"), wxT(""), &mWaveforms);
c->SetValidator(wxGenericValidator(&mWaveform));
if (mChirp) if (mChirp)
{ {
@ -370,6 +371,9 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
S.EndHorizontalLay(); S.EndHorizontalLay();
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
c = S.AddChoice(_("Interpolation:"), wxT(""), &mInterpolations);
c->SetValidator(wxGenericValidator(&mInterpolation));
} }
else else
{ {
@ -378,20 +382,22 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
t = S.AddTextBox(_("Frequency (Hz):"), wxT(""), 12); t = S.AddTextBox(_("Frequency (Hz):"), wxT(""), 12);
t->SetValidator(vldFrequency); t->SetValidator(vldFrequency);
FloatingPointValidator<double> vldAmplitude(6, &mAmplitude[1], NUM_VAL_NO_TRAILING_ZEROES); FloatingPointValidator<double> vldAmplitude(6, &mAmplitude[0], NUM_VAL_NO_TRAILING_ZEROES);
vldAmplitude.SetRange(MIN_Amplitude, MAX_Amplitude); vldAmplitude.SetRange(MIN_Amplitude, MAX_Amplitude);
t = S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 12); t = S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 12);
t->SetValidator(vldAmplitude); t->SetValidator(vldAmplitude);
} }
S.TieChoice(_("Interpolation:"), mInterpolation, &mInterpolations); bool isSelection;
double duration = GetDuration(&isSelection);
S.AddPrompt(_("Duration:")); S.AddPrompt(_("Duration:"));
mToneDurationT = new mToneDurationT = new
NumericTextCtrl(NumericConverter::TIME, NumericTextCtrl(NumericConverter::TIME,
S.GetParent(), S.GetParent(),
wxID_ANY, wxID_ANY,
(mT1 > mT0) ? _("hh:mm:ss + samples") : _("hh:mm:ss + milliseconds"), isSelection ? _("hh:mm:ss + samples") : _("hh:mm:ss + milliseconds"),
mDuration, duration,
mProjectRate, mProjectRate,
wxDefaultPosition, wxDefaultPosition,
wxDefaultSize, wxDefaultSize,
@ -412,7 +418,7 @@ bool EffectToneGen::TransferDataToWindow()
return false; return false;
} }
mToneDurationT->SetValue(mDuration); mToneDurationT->SetValue(GetDuration());
return true; return true;
} }
@ -430,7 +436,7 @@ bool EffectToneGen::TransferDataFromWindow()
mAmplitude[1] = mAmplitude[0]; mAmplitude[1] = mAmplitude[0];
} }
mDuration = mToneDurationT->GetValue(); SetDuration(mToneDurationT->GetValue());
return true; return true;
} }

@ -21,8 +21,8 @@
#include "Effect.h" #include "Effect.h"
#define CHIRP_PLUGIN_SYMBOL wxTRANSLATE("Chirp") #define CHIRP_PLUGIN_SYMBOL XO("Chirp")
#define TONE_PLUGIN_SYMBOL wxTRANSLATE("Tone") #define TONE_PLUGIN_SYMBOL XO("Tone")
class EffectToneGen : public Effect class EffectToneGen : public Effect
{ {

@ -37,8 +37,8 @@ enum kActions
static const wxChar *kActionStrings[kNumActions] = static const wxChar *kActionStrings[kNumActions] =
{ {
wxTRANSLATE("Truncate Detected Silence"), XO("Truncate Detected Silence"),
wxTRANSLATE("Compress Excess Silence") XO("Compress Excess Silence")
}; };
// Define defaults, minimums, and maximums for each parameter // Define defaults, minimums, and maximums for each parameter
@ -50,11 +50,11 @@ static const wxChar *kActionStrings[kNumActions] =
// Define keys, defaults, minimums, and maximums for the effect parameters // Define keys, defaults, minimums, and maximums for the effect parameters
// //
// Name Type Key Def Min Max Scale // Name Type Key Def Min Max Scale
Param( DbIndex, int, wxTRANSLATE("Db"), 0, 0, Enums::NumDbChoices - 1, 1 ); Param( DbIndex, int, XO("Db"), 0, 0, Enums::NumDbChoices - 1, 1 );
Param( ActIndex, int, wxTRANSLATE("Action"), kTruncate, 0, kNumActions - 1, 1 ); Param( ActIndex, int, XO("Action"), kTruncate, 0, kNumActions - 1, 1 );
Param( Minimum, double, wxTRANSLATE("Minimum"), 0.5, 0.001, 10000.0, 1 ); Param( Minimum, double, XO("Minimum"), 0.5, 0.001, 10000.0, 1 );
Param( Truncate, double, wxTRANSLATE("Truncate"), 0.5, 0.0, 10000.0, 1 ); Param( Truncate, double, XO("Truncate"), 0.5, 0.0, 10000.0, 1 );
Param( Compress, double, wxTRANSLATE("Compress"), 50.0, 0.0, 99.9, 1 ); Param( Compress, double, XO("Compress"), 50.0, 0.0, 99.9, 1 );
static const sampleCount DEF_BlendFrameCount = 100; static const sampleCount DEF_BlendFrameCount = 100;
@ -100,7 +100,7 @@ wxString EffectTruncSilence::GetSymbol()
wxString EffectTruncSilence::GetDescription() wxString EffectTruncSilence::GetDescription()
{ {
return wxTRANSLATE("Automatically reduces the length of passages where the volume is below a specified level"); return XO("Automatically reduces the length of passages where the volume is below a specified level");
} }
// EffectIdentInterface implementation // EffectIdentInterface implementation

@ -28,7 +28,7 @@
#include "Effect.h" #include "Effect.h"
#define TRUNCATESILENCE_PLUGIN_SYMBOL wxTRANSLATE("Truncate Silence") #define TRUNCATESILENCE_PLUGIN_SYMBOL XO("Truncate Silence")
// Declaration of RegionList // Declaration of RegionList
struct REGION; struct REGION;

Some files were not shown because too many files have changed in this diff Show More