From 83e355dc657901d2c567ff2cde88ac54f744736d Mon Sep 17 00:00:00 2001
From: James Crook
Date: Sat, 10 Sep 2016 16:59:23 +0100
Subject: [PATCH 1/4] Bug 322 - (Residual) Project numbers renumbered after
closing a project.
Now the project number is the order of creation. Once assigned, project numbers do not change.
---
src/Project.cpp | 19 +++++++------------
src/Project.h | 6 +++++-
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/Project.cpp b/src/Project.cpp
index b70d5a4cc..ecc9a21fc 100644
--- a/src/Project.cpp
+++ b/src/Project.cpp
@@ -199,6 +199,9 @@ const int sbarHjump = 30; //STM: This is how far the thumb jumps when the
#include "AllThemeResources.h"
#endif
+int AudacityProject::mProjectCounter=0;// global counter.
+
+
////////////////////////////////////////////////////////////
/// Custom events
////////////////////////////////////////////////////////////
@@ -888,6 +891,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
// field. Currently there are no such help strings, but it they were introduced, then
// there would need to be an event handler to send them to the appropriate field.
mStatusBar = CreateStatusBar(4);
+ mProjectNo = mProjectCounter++; // Bug 322
wxGetApp().SetMissingAliasedFileWarningShouldShow(true);
@@ -2013,17 +2017,6 @@ void AudacityProject::HandleResize()
UpdateLayout();
}
-// What number is this project?
-int AudacityProject::GetProjectNumber()
-{
- int i;
- for(i=0;imIconized ){
- gAudacityProjects[i]->SetProjectTitle( bShowProjectNumbers ? i : -1 );
+ AudacityProject * p;
+ p = gAudacityProjects[i].get();
+ p->SetProjectTitle( bShowProjectNumbers ? p->GetProjectNumber() : -1 );
}
}
}
diff --git a/src/Project.h b/src/Project.h
index 475d71901..e675f2e30 100644
--- a/src/Project.h
+++ b/src/Project.h
@@ -341,7 +341,7 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame,
static TrackList *GetClipboardTracks();
static void DeleteClipboard();
- int GetProjectNumber();
+ int GetProjectNumber(){ return mProjectNo;};
static int CountUnnamed();
static void RefreshAllTitles(bool bShowProjectNumbers );
// checkActive is a temporary hack that should be removed as soon as we
@@ -522,6 +522,7 @@ public:
void PushState(const wxString &desc, const wxString &shortDesc, UndoPush flags);
void RollbackState();
+
private:
void OnCapture(wxCommandEvent & evt);
@@ -550,6 +551,9 @@ public:
bool mbLoadedFromAup;
std::shared_ptr mDirManager; // MM: DirManager now created dynamically
+ static int mProjectCounter;// global counter.
+ int mProjectNo; // count when this project was created.
+
double mRate;
sampleFormat mDefaultFormat;
From 1c00e18a5d4e5d8c6c48fbefd0fbcb98f94e08ae Mon Sep 17 00:00:00 2001
From: James Crook
Date: Sat, 10 Sep 2016 18:36:15 +0100
Subject: [PATCH 2/4] Bug 322 - (Residual) Deal with iconized windows.
---
src/Project.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/Project.cpp b/src/Project.cpp
index ecc9a21fc..1382b5e02 100644
--- a/src/Project.cpp
+++ b/src/Project.cpp
@@ -2364,6 +2364,10 @@ void AudacityProject::OnMouseEvent(wxMouseEvent & event)
class TitleRestorer{
public:
TitleRestorer(AudacityProject * p ){
+ if( p->IsIconized() )
+ p->Restore();
+ p->Raise(); // May help identifying the window on Mac
+
// Construct this projects name and number.
sProjNumber = "";
sProjName = p->GetName();
From 796b98de8b84255592d0d165ebd10ae86d919b3c Mon Sep 17 00:00:00 2001
From: James Crook
Date: Sat, 10 Sep 2016 20:00:32 +0100
Subject: [PATCH 3/4] Bug 1510 - Moonphase: Crash cancelling Save As...
character replacement dialogue when exporting multiple by tracks
Bug no longer moonphase when exporting stereo. Iterator is iterating through channels, not tracks, so we need to allow for that when we skip whole tracks.
---
src/export/ExportMultiple.cpp | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp
index db29ed1cf..e41ef2be5 100644
--- a/src/export/ExportMultiple.cpp
+++ b/src/export/ExportMultiple.cpp
@@ -886,6 +886,14 @@ int ExportMultiple::ExportMultipleByTrack(bool byName,
continue;
}
+ // Bug 1510 possibly increment iter, before deciding whether to export.
+ // Check for a linked track
+ tr2 = NULL;
+ if (tr->GetLinked()) {
+ tr2 = iter.Next();
+ }
+
+ wxLogDebug( "Get setting %i", count );
/* get the settings to use for the export from the array */
activeSetting = exportSettings[count];
if( activeSetting.destfile.GetName().IsEmpty() ){
@@ -895,15 +903,9 @@ int ExportMultiple::ExportMultipleByTrack(bool byName,
/* Select the track */
tr->SetSelected(true);
-
- // Check for a linked track
- tr2 = NULL;
- if (tr->GetLinked()) {
- tr2 = iter.Next();
- if (tr2) {
- // Select it also
- tr2->SetSelected(true);
- }
+ if (tr2) {
+ // Select it also
+ tr2->SetSelected(true);
}
// Export the data. "channels" are per track.
From 923eefaf90ad593d5283a53cbb20db6b440bf783 Mon Sep 17 00:00:00 2001
From: James Crook
Date: Sat, 10 Sep 2016 21:34:14 +0100
Subject: [PATCH 4/4] Add code from merging.
This brings more of the code from DarkAudacity into Audacity, though not yet enabled. This will make cherry picking later easier.
- Changing colour of html displays now possible, as colour links are visible for substitution. (Can't use css as wxHTML is very limited).
- Export can now be preset to a particular format independent of preferences.
- SnapTo reversion on zoom now a DA controlled option.
- Caching of pinning preference for faster repaint because preferences are slow.
- Record Append now has sensible limit on number of tracks, rather than giving an error, and flipping the meaning of shift is now DA controlled.
---
src/AboutDialog.cpp | 51 +++++++++++++++++----------------
src/HelpText.cpp | 47 +++++++++++++++++++++---------
src/ViewInfo.cpp | 12 ++++++++
src/export/Export.cpp | 8 ++++--
src/export/Export.h | 3 +-
src/prefs/TracksPrefs.cpp | 10 ++++++-
src/prefs/TracksPrefs.h | 1 +
src/toolbars/ControlToolBar.cpp | 24 ++++++++++++++--
8 files changed, 110 insertions(+), 46 deletions(-)
diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp
index 7b63e60e5..dfb8e9fd1 100644
--- a/src/AboutDialog.cpp
+++ b/src/AboutDialog.cpp
@@ -46,6 +46,8 @@ hold information about one contributor to Audacity.
#include "../images/AudacityLogoWithName.xpm"
+extern wxString FormatHtmlText( const wxString & Text );
+
void AboutDialog::CreateCreditsList()
{
// The Audacity Team: developers and support
@@ -173,23 +175,23 @@ void AboutDialog::CreateCreditsList()
// Libraries
- AddCredit(wxT("expat"), roleLibrary);
- AddCredit(wxT("FLAC"), roleLibrary);
- AddCredit(wxT("iAVC"), roleLibrary);
- AddCredit(wxT("LAME"), roleLibrary);
- AddCredit(wxT("libmad"), roleLibrary);
- AddCredit(wxT("libsndfile"), roleLibrary);
- AddCredit(wxT("libsoxr"), roleLibrary);
- AddCredit(wxT("lv2 (") + _("incorporating") + wxT(" lilv, msinttypes, serd, sord and sratom)"), roleLibrary);
- AddCredit(wxT("Nyquist"), roleLibrary);
- AddCredit(wxT("Ogg Vorbis"), roleLibrary);
- AddCredit(wxT("PortAudio"), roleLibrary);
- AddCredit(wxT("portsmf"), roleLibrary);
- AddCredit(wxT("sbsms"), roleLibrary);
- AddCredit(wxT("SoundTouch"), roleLibrary);
- AddCredit(wxT("TwoLAME"), roleLibrary);
- AddCredit(wxT("Vamp"), roleLibrary);
- AddCredit(wxT("wxWidgets"), roleLibrary);
+ AddCredit(wxT("[[http://www.jclark.com/xml/expat.html|expat]]"), roleLibrary);
+ AddCredit(wxT("[[http://xiph.org/flac/|FLAC]]"), roleLibrary);
+ AddCredit(wxT("iAVC"), roleLibrary);
+ AddCredit(wxT("[[http://lame.sourceforge.net/|LAME]]"), roleLibrary);
+ AddCredit(wxT("[[http://www.underbit.com/products/mad/|libmad]]"), roleLibrary);
+ AddCredit(wxT("[[http://www.mega-nerd.com/libsndfile/|libsndfile]]"), roleLibrary);
+ AddCredit(wxT("[[http://sourceforge.net/p/soxr/wiki/Home/|libsoxr]]"), roleLibrary);
+ AddCredit(wxT("[[http://lv2plug.in/|lv2]] (") + _("incorporating") + wxT(" lilv, msinttypes, serd, sord and sratom)"), roleLibrary);
+ AddCredit(wxT("[[https://www.cs.cmu.edu/~music/nyquist/|Nyquist]]"), roleLibrary);
+ AddCredit(wxT("[[http://vorbis.com/|Ogg Vorbis]]"), roleLibrary);
+ AddCredit(wxT("[[http://www.portaudio.com/|PortAudio]]"), roleLibrary);
+ AddCredit(wxT("[[http://sourceforge.net/apps/trac/portmedia/wiki/portsmf/|portsmf]]"), roleLibrary);
+ AddCredit(wxT("[[http://sbsms.sourceforge.net/|sbsms]]"), roleLibrary);
+ AddCredit(wxT("[[http://www.surina.net/soundtouch/|SoundTouch]]"), roleLibrary);
+ AddCredit(wxT("[[http://www.twolame.org/|TwoLAME]]"), roleLibrary);
+ AddCredit(wxT("[[http://www.vamp-plugins.org/|Vamp]]"), roleLibrary);
+ AddCredit(wxT("[[http://wxwidgets.org/|wxWidgets]]"), roleLibrary);
// Thanks
@@ -296,11 +298,8 @@ visit our forum.");
}
wxString localeStr = wxLocale::GetSystemEncodingName();
- wxString creditStr =
- wxT("") +
- wxT("") +
+ wxString creditStr = FormatHtmlText(
+ wxString( wxT("")) +
wxT("Audacity ") + wxString(AUDACITY_VERSION_STRING) + wxT("
") +
_("Free, open source, cross-platform software for recording and editing sounds.") +
wxT(" http://audacityteam.org/") +
@@ -332,7 +331,7 @@ visit our forum.");
wxT("
") + _("Audacity® software is copyright")+
wxT("© 1999-2016 Audacity Team.
") +
_("The name Audacity® is a registered trademark of Dominic Mazzoni.") +
- wxT("
");
+ wxT(""));
this->SetBackgroundColour(theTheme.Colour( clrAboutBoxBackground ));
@@ -605,6 +604,8 @@ void AboutDialog::PopulateInformationPage( ShuttleGui & S )
// end of table
informationStr += wxT("\n");
+ informationStr = FormatHtmlText( informationStr );
+
html->SetPage(informationStr); // push the page into the html renderer
S.Prop(2).AddWindow( html, wxEXPAND ); // make it fill the page
// I think the 2 here goes with the StartVerticalLay() call above?
@@ -628,7 +629,7 @@ void AboutDialog::PopulateLicensePage( ShuttleGui & S )
// better proportionally spaced.
//
// The GPL is not to be translated....
- wxString PageText=
+ wxString PageText= FormatHtmlText(
wxT(" GNU GENERAL PUBLIC LICENSE\n")
wxT(" Version 2, June 1991\n")
wxT("")
@@ -910,7 +911,7 @@ wxT("OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\n
wxT("TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\n")
wxT("YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\n")
wxT("PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n")
-wxT("POSSIBILITY OF SUCH DAMAGES.\n");
+wxT("POSSIBILITY OF SUCH DAMAGES.\n"));
html->SetPage( PageText );
diff --git a/src/HelpText.cpp b/src/HelpText.cpp
index 2d3adc205..af2603193 100644
--- a/src/HelpText.cpp
+++ b/src/HelpText.cpp
@@ -62,11 +62,10 @@ static wxString FileLink( const wxString &Key, const wxString& Text )
wxT("");
}
-static wxString HttpLink( const wxString &Key, const wxString& Text )
+static wxString TypedLink( const wxString &Key, const wxString& Text )
{
return wxString(wxT("")) +
wxT("") +
Text +
@@ -101,7 +100,15 @@ static wxString LinkExpand( const wxString & Text )
}
else if( Key.StartsWith( wxT("http:") ))
{
- Replacement = HttpLink( Key.Mid( 5 ), LinkText );
+ Replacement = TypedLink( Key, LinkText );
+ }
+ else if( Key.StartsWith( wxT("mailto:") ))
+ {
+ Replacement = TypedLink( Key, LinkText );
+ }
+ else if( Key.StartsWith( wxT("*URL*") ))
+ {
+ Replacement = TypedLink( Key, LinkText );
}
else
{
@@ -189,9 +196,9 @@ static wxString HelpTextBuiltIn( const wxString & Key )
wxT("Audacity ") + AUDACITY_VERSION_STRING + wxT("
") +
_("How to get help") + wxT("
") +
_("These are our support methods:") + wxT("- ") +
- _(" [[file:quick_help.html|Quick Help]] - if not installed locally, view online") + wxT("
- ") +
- _(" [[file:index.html|Manual]] - if not installed locally, view online") + wxT("
- ") +
- _(" Forum - ask your question directly, online.") + wxT("
") + wxT("") +
+ _(" [[file:quick_help.html|Quick Help]] - if not installed locally, [[http://manual.audacityteam.org/quick_help.html|view online]]") + wxT("") +
+ _(" [[file:index.html|Manual]] - if not installed locally, [[http://manual.audacityteam.org/|view online]]") + wxT("") +
+ _(" [[http://forum.audacityteam.org/|Forum]] - ask your question directly, online.") + wxT("
") + wxT("") +
_("More: Visit our [[http://wiki.audacityteam.org/index.php|Wiki]] for tips, tricks, extra tutorials and effects plug-ins.") + wxT("
")
);
}
@@ -201,12 +208,12 @@ static wxString HelpTextBuiltIn( const wxString & Key )
wxString(wxT(""))+
_("Audacity can import unprotected files in many other formats (such as M4A and WMA, \
compressed WAV files from portable recorders and audio from video files) if you download and install \
-the optional \
-FFmpeg library to your computer.") + wxT("
") +
+the optional [[http://manual.audacityteam.org/man/faq_opening_and_saving_files.html#foreign| \
+FFmpeg library]] to your computer.") + wxT("
") +
_("You can also read our help on importing \
-MIDI files \
-and tracks from \
-audio CDs.") + wxT("
")
+[[http://manual.audacityteam.org/man/faq_opening_and_saving_files.html#midi|MIDI files]] \
+and tracks from [[http://manual.audacityteam.org/man/faq_opening_and_saving_files.html#fromcd| \
+audio CDs]].") + wxT("
")
);
}
@@ -217,9 +224,9 @@ audio CDs.") + wxT("")
{
// *URL* will be replaced by whatever URL we are looking for.
return WrapText(_("The Manual does not appear to be installed. \
-Please view the Manual online or \
- \
-download the Manual.
\
+Please [[*URL*|view the Manual online]] or \
+[[http://manual.audacityteam.org/man/unzipping_the_manual.html| \
+download the Manual]].
\
To always view the Manual online, change \"Location of Manual\" in \
Interface Preferences to \"From Internet\".")
);
@@ -245,3 +252,15 @@ wxString HelpText( const wxString & Key )
// Perhaps useful for debugging - we'll return key that we didn't find.
return WrapText( Key );
}
+
+wxString FormatHtmlText( const wxString & Text ){
+
+ wxString localeStr = wxLocale::GetSystemEncodingName();
+
+ return
+ wxT("") +
+ WrapText( LinkExpand( Text ))+
+ wxT("");
+}
\ No newline at end of file
diff --git a/src/ViewInfo.cpp b/src/ViewInfo.cpp
index 34d747df0..9fa5422d3 100644
--- a/src/ViewInfo.cpp
+++ b/src/ViewInfo.cpp
@@ -89,6 +89,18 @@ bool ZoomInfo::ZoomOutAvailable() const
void ZoomInfo::SetZoom(double pixelsPerSecond)
{
zoom = std::max(gMinZoom, std::min(gMaxZoom, pixelsPerSecond));
+#ifdef EXPERIMENTAL_DA
+ // Disable snapping if user zooms in a long way.
+ // Helps stop users be trapped in snap-to.
+ // The level chosen is in sample viewing range with samples
+ // still quite close together.
+ if( zoom > (gMaxZoom * 0.06 ))
+ {
+ AudacityProject * project = GetActiveProject();
+ if( project )
+ project->OnSnapToOff();
+ }
+#endif
}
void ZoomInfo::ZoomBy(double multiplier)
diff --git a/src/export/Export.cpp b/src/export/Export.cpp
index 49bf5c51c..aacb7c1f2 100644
--- a/src/export/Export.cpp
+++ b/src/export/Export.cpp
@@ -265,6 +265,7 @@ Exporter::Exporter()
{
mMixerSpec = NULL;
mBook = NULL;
+ mFormatName = "";
SetFileDialogTitle( _("Export Audio") );
@@ -488,7 +489,9 @@ bool Exporter::GetFilename()
mFormat = -1;
wxString maskString;
- wxString defaultFormat = gPrefs->Read(wxT("/Export/Format"),
+ wxString defaultFormat = mFormatName;
+ if( defaultFormat.IsEmpty() )
+ defaultFormat = gPrefs->Read(wxT("/Export/Format"),
wxT("WAV"));
mFilterIndex = 0;
@@ -678,7 +681,8 @@ bool Exporter::CheckFilename()
if (!mProject->GetDirManager()->EnsureSafeFilename(mFilename))
return false;
- gPrefs->Write(wxT("/Export/Format"), mPlugins[mFormat]->GetFormat(mSubFormat));
+ if( mFormatName.IsEmpty() )
+ gPrefs->Write(wxT("/Export/Format"), mPlugins[mFormat]->GetFormat(mSubFormat));
gPrefs->Write(wxT("/Export/Path"), mFilename.GetPath());
gPrefs->Flush();
diff --git a/src/export/Export.h b/src/export/Export.h
index c861d0948..138a49d45 100644
--- a/src/export/Export.h
+++ b/src/export/Export.h
@@ -144,6 +144,7 @@ public:
virtual ~Exporter();
void SetFileDialogTitle( const wxString & DialogTitle );
+ void SetDefaultFormat( const wxString & Format ){ mFormatName = Format;};
void RegisterPlugin(movable_ptr &&plugin);
bool Process(AudacityProject *project, bool selectedOnly,
@@ -173,7 +174,7 @@ public:
wxFileName GetAutoExportFileName();
private:
-
+ wxString mFormatName;
bool ExamineTracks();
bool GetFilename();
bool CheckFilename();
diff --git a/src/prefs/TracksPrefs.cpp b/src/prefs/TracksPrefs.cpp
index f8f4af333..031366d6c 100644
--- a/src/prefs/TracksPrefs.cpp
+++ b/src/prefs/TracksPrefs.cpp
@@ -30,6 +30,7 @@
#include "../Experimental.h"
+int TracksPrefs::iPreferencePinned = -1;
namespace {
const wxChar *PinnedHeadPreferenceKey()
@@ -179,11 +180,18 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S)
bool TracksPrefs::GetPinnedHeadPreference()
{
- return gPrefs->ReadBool(PinnedHeadPreferenceKey(), PinnedHeadPreferenceDefault());
+ // JKC: Cache this setting as it is read many times during drawing, and otherwise causes screen flicker.
+ // Correct solution would be to re-write wxFileConfig to be efficient.
+ if( iPreferencePinned >= 0 )
+ return iPreferencePinned == 1;
+ bool bResult = gPrefs->ReadBool(PinnedHeadPreferenceKey(), PinnedHeadPreferenceDefault());
+ iPreferencePinned = bResult ? 1: 0;
+ return bResult;
}
void TracksPrefs::SetPinnedHeadPreference(bool value, bool flush)
{
+ iPreferencePinned = value ? 1 :0;
gPrefs->Write(PinnedHeadPreferenceKey(), value);
if(flush)
gPrefs->Flush();
diff --git a/src/prefs/TracksPrefs.h b/src/prefs/TracksPrefs.h
index fa08863a6..7a2b46ab3 100644
--- a/src/prefs/TracksPrefs.h
+++ b/src/prefs/TracksPrefs.h
@@ -38,6 +38,7 @@ class TracksPrefs final : public PrefsPanel
void Populate();
void PopulateOrExchange(ShuttleGui & S);
+ static int iPreferencePinned;
wxArrayString mSoloCodes;
wxArrayString mSoloChoices;
wxArrayInt mViewCodes;
diff --git a/src/toolbars/ControlToolBar.cpp b/src/toolbars/ControlToolBar.cpp
index 9d072b52a..853622785 100644
--- a/src/toolbars/ControlToolBar.cpp
+++ b/src/toolbars/ControlToolBar.cpp
@@ -223,8 +223,13 @@ void ControlToolBar::RegenerateTooltips()
break;
case ID_RECORD_BUTTON:
commands.push_back(wxT("Record"));
+#ifndef EXPERIMENTAL_DA
commands.push_back(_("Append Record"));
commands.push_back(wxT("RecordAppend"));
+#else
+ commands.push_back(_("Record Below"));
+ commands.push_back(wxT("RecordBelow"));
+#endif
break;
case ID_PAUSE_BUTTON:
commands.push_back(wxT("Pause"));
@@ -875,8 +880,14 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
if (p) {
TrackList *trackList = p->GetTracks();
TrackListIterator it(trackList);
+
+ bool shifted = mRecord->WasShiftDown();
+#ifdef EXPERIMENTAL_DA
+ shifted = !shifted;
+#endif
if(it.First() == NULL)
- mRecord->SetShift(false);
+ shifted = false;
+
double t0 = p->GetSel0();
double t1 = p->GetSel1();
if (t1 == t0)
@@ -908,8 +919,9 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
int recordingChannels = 0;
TrackList tracksCopy{};
bool tracksCopied = false;
- bool shifted = mRecord->WasShiftDown();
+
if (shifted) {
+ recordingChannels = gPrefs->Read(wxT("/AudioIO/RecordChannels"), 2);
bool sel = false;
double allt0 = t0;
@@ -965,6 +977,10 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
wxUnusedVar(bResult);
}
newRecordingTracks.push_back(wt);
+ // Don't record more channels than configured recording pref.
+ if( (int)newRecordingTracks.size() >= recordingChannels ){
+ break;
+ }
}
}
@@ -973,6 +989,8 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
else {
bool recordingNameCustom, useTrackNumber, useDateStamp, useTimeStamp;
wxString defaultTrackName, defaultRecordingTrackName;
+
+ // Count the tracks.
int numTracks = 0;
for (Track *tt = it.First(); tt; tt = it.Next()) {
@@ -980,7 +998,7 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
numTracks++;
}
numTracks++;
-
+
recordingChannels = gPrefs->Read(wxT("/AudioIO/RecordChannels"), 2);
gPrefs->Read(wxT("/GUI/TrackNames/RecordingNameCustom"), &recordingNameCustom, false);