") +
- wxT("Audacity ") + wxString(AUDACITY_VERSION_STRING) + wxT("
")+
- _("free, open source, cross-platform software for recording and editing sounds
") +
+ wxString creditStr =
+ wxT("") +
+ wxT("") +
+ wxT("Audacity ") + wxString(AUDACITY_VERSION_STRING) + wxT("
")+
+ _("free, open source, cross-platform software for recording and editing sounds
") +
wxT("http://audacity.sourceforge.net/") +
wxT("
") + par1Str +
wxT("
") + par2Str +
- wxT("
") + _("Credits") + wxT("
") +
+ wxT("") + _("Credits") + wxT("
") +
wxT("") + translatorCredits +
wxT("
") + wxString::Format(_("Audacity Developers")) + wxT("
") +
@@ -266,7 +266,7 @@ visit our forum.");
wxT("
") + _("Emeritus Developers") + wxT("
") +
GetCreditsByRole(roleEmeritusDeveloper) +
-
+
wxT("
") + _(" Emeritus Team Members") + wxT("
") +
GetCreditsByRole(roleEmeritusSupport) +
@@ -275,13 +275,13 @@ visit our forum.");
wxT("
") + _("Audacity is based on code from the following projects:") + wxT("
") +
GetCreditsByRole(roleLibrary) +
-
+
wxT("
") + _("Special thanks:") + wxT("
") +
GetCreditsByRole(roleThanks) +
-
+
wxT("
") + _("Audacity® software is copyright")+
wxT("© 1999-2014 Audacity Team.
") +
- _("The name Audacity® is a registered trademark of Dominic Mazzoni.") +
+ _("The name Audacity® is a registered trademark of Dominic Mazzoni.") +
wxT("
");
@@ -305,19 +305,19 @@ visit our forum.");
wxBitmap RescaledBitmap( RescaledImage );
icon =
- new wxStaticBitmap(S.GetParent(), -1,
+ new wxStaticBitmap(S.GetParent(), -1,
//*logo, //v
//v theTheme.Bitmap(bmpAudacityLogo), wxPoint(93, 10), wxSize(215, 190));
- //v theTheme.Bitmap(bmpAudacityLogoWithName),
+ //v theTheme.Bitmap(bmpAudacityLogoWithName),
RescaledBitmap,
- wxDefaultPosition,
+ wxDefaultPosition,
wxSize(int(LOGOWITHNAME_WIDTH*fScale), int(LOGOWITHNAME_HEIGHT*fScale)));
delete logo;
S.Prop(0).AddWindow( icon );
HtmlWindow *html = new LinkingHtmlWindow(S.GetParent(), -1,
wxDefaultPosition,
- wxSize(ABOUT_DIALOG_WIDTH, 359),
+ wxSize(ABOUT_DIALOG_WIDTH, 359),
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
html->SetFocus();
html->SetPage(creditStr);
@@ -329,7 +329,7 @@ visit our forum.");
S.EndNotebookPage();
}
-/** \brief: Fills out the "Information" tab of the preferences dialogue
+/** \brief: Fills out the "Information" tab of the preferences dialogue
* Provides as much information as possible about build-time options and
* the libraries used, to try and make Linux support easier. Basically anything
* about the build we might wish to know should be visible here */
@@ -339,19 +339,19 @@ void AboutDialog::PopulateInformationPage( ShuttleGui & S )
S.StartNotebookPage( _("Build Information") ); // start the tab
S.StartVerticalLay(2); // create the window
HtmlWindow *html = new HtmlWindow(S.GetParent(), -1, wxDefaultPosition,
- wxSize(ABOUT_DIALOG_WIDTH, 264),
+ wxSize(ABOUT_DIALOG_WIDTH, 264),
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
// create a html pane in it to put the content in.
wxString enabled = _("Enabled");
wxString disabled = _("Disabled");
wxString blank = wxT("");
-
+
/* this builds up the list of information to go in the window in the string
* informationStr */
informationStr = wxT("");
informationStr += _("Build Information");
informationStr += wxT("
\n");
- // top level heading
+ // top level heading
informationStr += wxT("");
informationStr += _("File Format Support");
informationStr += wxT("
\n");
@@ -368,7 +368,7 @@ void AboutDialog::PopulateInformationPage( ShuttleGui & S )
AddBuildinfoRow(&informationStr, wxT("libmad"), _("MP3 Importing"), disabled);
#endif
- /* i18n-hint: Ogg is the container format. Vorbis is the compression codec.
+ /* i18n-hint: Ogg is the container format. Vorbis is the compression codec.
* Both are proper nouns and shouldn't be translated */
#ifdef USE_LIBVORBIS
AddBuildinfoRow(&informationStr, wxT("libvorbis"),
@@ -385,7 +385,7 @@ void AboutDialog::PopulateInformationPage( ShuttleGui & S )
AddBuildinfoRow(&informationStr, wxT("libid3tag"), _("ID3 tag support"),
disabled);
#endif
-
+
/* i18n-hint: FLAC stands for Free Lossless Audio Codec, but is effectively
* a proper noun and so shouldn't be translated */
# if USE_LIBFLAC
@@ -543,7 +543,7 @@ void AboutDialog::PopulateLicensePage( ShuttleGui & S )
S.StartVerticalLay(1);
HtmlWindow *html = new HtmlWindow(S.GetParent(), -1,
wxDefaultPosition,
- wxSize(ABOUT_DIALOG_WIDTH, 264),
+ wxSize(ABOUT_DIALOG_WIDTH, 264),
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
// I tried using
here to get a monospaced font,
@@ -855,7 +855,7 @@ void AboutDialog::AddCredit(const wxString& description, Role role)
wxString AboutDialog::GetCreditsByRole(AboutDialog::Role role)
{
wxString s;
-
+
for (AboutDialogCreditItemsList::compatibility_iterator p=creditItems.GetFirst(); p; p = p->GetNext())
{
AboutDialogCreditItem* item = p->GetData();
@@ -865,7 +865,7 @@ wxString AboutDialog::GetCreditsByRole(AboutDialog::Role role)
s += wxT("
");
}
}
-
+
// Strip last
, if any
if (s.Right(4) == wxT("
"))
s = s.Left(s.Length() - 4);
diff --git a/src/AboutDialog.h b/src/AboutDialog.h
index 6eaee0217..c9ab1169c 100644
--- a/src/AboutDialog.h
+++ b/src/AboutDialog.h
@@ -39,7 +39,7 @@ class AboutDialog:public wxDialog {
wxBitmap *logo; //v
DECLARE_EVENT_TABLE()
-
+
private:
enum Role {
roleTeamDeveloper,
@@ -50,7 +50,7 @@ class AboutDialog:public wxDialog {
roleLibrary,
roleThanks
};
-
+
AboutDialogCreditItemsList creditItems;
void PopulateAudacityPage( ShuttleGui & S );
void PopulateLicensePage( ShuttleGui & S );
diff --git a/src/AllThemeResources.h b/src/AllThemeResources.h
index 6abef3b4c..7681a04ac 100644
--- a/src/AllThemeResources.h
+++ b/src/AllThemeResources.h
@@ -19,22 +19,22 @@ and grids used by Audacity.
This will be split up into separate include files to reduce the amount
of recompilation on a change.
-Meantime, do NOT delete any of these declarations, even if they're
+Meantime, do NOT delete any of these declarations, even if they're
unused, as they're all offset by prior declarations.
To add an image, you give its size and name like so:
\code
DEFINE_IMAGE( bmpPause, wxImage( 16, 16 ), wxT("Pause"));
-\endcode
+\endcode
-If you do this and run the program the image will be black to start
-with, but you can go into ThemePrefs and load it (load components)
-from there. Audacity will look for a file called "Pause.png".
+If you do this and run the program the image will be black to start
+with, but you can go into ThemePrefs and load it (load components)
+from there. Audacity will look for a file called "Pause.png".
- Now save into ImageCache.
- From here on you can get the image by loading ImageCache.
- - To burn it into the program defaults, use the
+ - To burn it into the program defaults, use the
'Output Sourcery' button.
\see \ref Themability in DOxygen documentation for more details.
@@ -209,7 +209,7 @@ from there. Audacity will look for a file called "Pause.png".
#define LOGOWITHNAME_WIDTH 506
#define LOGOWITHNAME_HEIGHT 200
- DEFINE_IMAGE( bmpAudacityLogo, wxImage( 215, 190 ), wxT("AudacityLogo"));
+ DEFINE_IMAGE( bmpAudacityLogo, wxImage( 215, 190 ), wxT("AudacityLogo"));
DEFINE_IMAGE( bmpAudacityLogo48x48, wxImage( 48, 48 ), wxT("AudacityLogo48x48"));
DEFINE_IMAGE( bmpSyncLockSelTile, wxImage(20, 22), wxT("SyncLockSelTile"));
@@ -222,7 +222,7 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_COLOUR( clrSample, wxColour( 50, 50, 200), wxT("Sample"));
DEFINE_COLOUR( clrSelSample, wxColour( 50, 50, 200), wxT("SelSample"));
DEFINE_COLOUR( clrDragSample, wxColour( 0, 0, 0), wxT("DragSample"));
-
+
DEFINE_COLOUR( clrMuteSample, wxColour(136, 136, 144), wxT("MuteSample"));
DEFINE_COLOUR( clrRms, wxColour(100, 100, 220), wxT("Rms"));
DEFINE_COLOUR( clrMuteRms, wxColour(136, 136, 144), wxT("MuteRms"));
@@ -234,7 +234,7 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_COLOUR( clrSample, wxColour( 63, 77, 155), wxT("Sample"));
DEFINE_COLOUR( clrSelSample, wxColour( 50, 50, 200), wxT("SelSample"));
DEFINE_COLOUR( clrDragSample, wxColour( 0, 100, 0), wxT("DragSample"));
-
+
DEFINE_COLOUR( clrMuteSample, wxColour(136, 136, 144), wxT("MuteSample"));
DEFINE_COLOUR( clrRms, wxColour(107, 154, 247), wxT("Rms"));
DEFINE_COLOUR( clrMuteRms, wxColour(136, 136, 144), wxT("MuteRms"));
@@ -246,21 +246,21 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_COLOUR( clrTrackPanelText, wxColour(153, 153, 153), wxT("TrackPanelText"));
DEFINE_COLOUR( clrLabelTrackText, wxColour( 0, 0, 0), wxT("LabelTrackText"));
-
+
DEFINE_COLOUR( clrMeterPeak, wxColour(102, 102, 255), wxT("MeterPeak"));
DEFINE_COLOUR( clrMeterDisabledPen, wxColour(192, 192, 192), wxT("MeterDisabledPen"));
DEFINE_COLOUR( clrMeterDisabledBrush, wxColour(160, 160, 160), wxT("MeterDisabledBrush"));
- DEFINE_COLOUR( clrMeterInputPen, wxColour(204, 70, 70), wxT("MeterInputPen") );
- DEFINE_COLOUR( clrMeterInputBrush, wxColour(204, 70, 70), wxT("MeterInputBrush") );
- DEFINE_COLOUR( clrMeterInputRMSBrush, wxColour(255, 102, 102), wxT("MeterInputRMSBrush") );
+ DEFINE_COLOUR( clrMeterInputPen, wxColour(204, 70, 70), wxT("MeterInputPen") );
+ DEFINE_COLOUR( clrMeterInputBrush, wxColour(204, 70, 70), wxT("MeterInputBrush") );
+ DEFINE_COLOUR( clrMeterInputRMSBrush, wxColour(255, 102, 102), wxT("MeterInputRMSBrush") );
DEFINE_COLOUR( clrMeterInputClipBrush, wxColour(255, 53, 53), wxT("MeterInputClipBrush") );
- DEFINE_COLOUR( clrMeterInputLightPen, wxColour(255, 153, 153), wxT("MeterInputLightPen") );
- DEFINE_COLOUR( clrMeterInputDarkPen, wxColour(153, 61, 61), wxT("MeterInputDarkPen") );
-
- DEFINE_COLOUR( clrMeterOutputPen, wxColour(70, 204, 70), wxT("MeterOutputPen") );
- DEFINE_COLOUR( clrMeterOutputBrush, wxColour(70, 204, 70), wxT("MeterOutputBrush") );
- DEFINE_COLOUR( clrMeterOutputRMSBrush, wxColour(102, 255, 102), wxT("MeterOutputRMSBrush") );
+ DEFINE_COLOUR( clrMeterInputLightPen, wxColour(255, 153, 153), wxT("MeterInputLightPen") );
+ DEFINE_COLOUR( clrMeterInputDarkPen, wxColour(153, 61, 61), wxT("MeterInputDarkPen") );
+
+ DEFINE_COLOUR( clrMeterOutputPen, wxColour(70, 204, 70), wxT("MeterOutputPen") );
+ DEFINE_COLOUR( clrMeterOutputBrush, wxColour(70, 204, 70), wxT("MeterOutputBrush") );
+ DEFINE_COLOUR( clrMeterOutputRMSBrush, wxColour(102, 255, 102), wxT("MeterOutputRMSBrush") );
DEFINE_COLOUR( clrMeterOutputClipBrush, wxColour(255, 53, 53), wxT("MeterOutputClipBrush") );
DEFINE_COLOUR( clrMeterOutputLightPen, wxColour(153, 255, 153), wxT("MeterOutputLightPen") );
DEFINE_COLOUR( clrMeterOutputDarkPen, wxColour(61, 164, 61), wxT("MeterOutputDarkPen") );
@@ -276,20 +276,20 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_COLOUR( clrMuteButtonActive, wxColour( 160, 170, 210), wxT("MuteButtonActive") );
DEFINE_COLOUR( clrMuteButtonVetoed, wxColour( 180, 180, 185), wxT("MuteButtonVetoed") );
-
+
DEFINE_COLOUR( clrCursorPen, wxColour( 0, 0, 0), wxT("CursorPen") );
DEFINE_COLOUR( clrRecordingPen, wxColour( 176, 0, 28), wxT("RecordingPen") );
DEFINE_COLOUR( clrPlaybackPen, wxColour( 36, 96, 46), wxT("PlaybackPen") );
DEFINE_COLOUR( clrRecordingBrush, wxColour( 190,129,129), wxT("RecordingBrush") );
DEFINE_COLOUR( clrPlaybackBrush, wxColour( 28,171, 51), wxT("PlaybackBrush") );
-
+
DEFINE_COLOUR( clrRulerRecordingBrush, wxColour( 196,196,196), wxT("RulerRecordingBrush") );
DEFINE_COLOUR( clrRulerRecordingPen, wxColour( 128,128,128), wxT("RulerRecordingPen") );
DEFINE_COLOUR( clrRulerPlaybackBrush, wxColour( 190,129,129), wxT("RulerPlaybackBrush") );
DEFINE_COLOUR( clrRulerPlaybackPen, wxColour( 176, 0, 28), wxT("RulerPlaybackPen") );
- DEFINE_COLOUR( clrTimeFont, wxColour( 0, 0,180), wxT("TimeFont") );
- DEFINE_COLOUR( clrTimeBack, wxColour( 160,160,160), wxT("TimeBack") );
+ DEFINE_COLOUR( clrTimeFont, wxColour( 0, 0,180), wxT("TimeFont") );
+ DEFINE_COLOUR( clrTimeBack, wxColour( 160,160,160), wxT("TimeBack") );
DEFINE_COLOUR( clrTimeFontFocus, wxColour( 0, 0, 0), wxT("TimeFontFocus") );
DEFINE_COLOUR( clrTimeBackFocus, wxColour( 242,242,255), wxT("TimeBackFocus") );
@@ -330,10 +330,10 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_COLOUR( clrProgressNotYet, wxColour(255, 255, 255,220), wxT("ProgressNotYet"));
DEFINE_COLOUR( clrSyncLockSel, wxColour(192, 192, 192), wxT("SyncLockSel"));
- // Vaughan, 2010-09-20: clrTrackInfoSyncLockSel is unused so this is cruft, but
+ // Vaughan, 2010-09-20: clrTrackInfoSyncLockSel is unused so this is cruft, but
// do NOT delete it as it's in the theme image, so offsets subsequent colors.
DEFINE_COLOUR( clrTrackInfoSyncLockSel, wxColour( 64, 64, 64), wxT("TrackInfoSyncLockSel"));
-
+
DEFINE_COLOUR( clrSelTranslucent, wxColour(104, 104, 148, 127), wxT("SelTranslucent"));
// This is for waveform drawing, selected outside of clips
DEFINE_COLOUR( clrBlankSelected, wxColour(170, 170, 192), wxT("BlankSelected"));
diff --git a/src/Audacity.h b/src/Audacity.h
index cf76b08e6..4f1955602 100644
--- a/src/Audacity.h
+++ b/src/Audacity.h
@@ -23,7 +23,7 @@
#ifndef __AUDACITY_H__
#define __AUDACITY_H__
-// We only do alpha builds and release versions.
+// We only do alpha builds and release versions.
// Most of the time we're in development, so IS_ALPHA should be defined
// to 1.
#define IS_ALPHA 1
@@ -35,7 +35,7 @@
#define AUDACITY_MODLEVEL 0
#if IS_ALPHA
- #define AUDACITY_SUFFIX wxT("-alpha-") __TDATE__
+ #define AUDACITY_SUFFIX wxT("-alpha-") __TDATE__
#else
#define AUDACITY_SUFFIX wxT("") // for a stable release
#endif
@@ -70,8 +70,8 @@ void QuitAudacity(bool bForce);
void QuitAudacity();
// Please try to support unlimited path length instead of using PLATFORM_MAX_PATH!
-// Define one constant for maximum path value, so we don't have to do
-// platform-specific conditionals everywhere we want to check it.
+// Define one constant for maximum path value, so we don't have to do
+// platform-specific conditionals everywhere we want to check it.
#define PLATFORM_MAX_PATH 260 // Play it safe for default, with same value as Windows' MAX_PATH.
#ifdef __WXMAC__
@@ -122,7 +122,7 @@ void QuitAudacity();
/* The GCC-elf implementation */
#ifdef HAVE_VISIBILITY // this is provided by the configure script, is only
// enabled for suitable GCC versions
-/* The incantation is a bit weird here because it uses ELF symbol stuff. If we
+/* The incantation is a bit weird here because it uses ELF symbol stuff. If we
* make a symbol "default" it makes it visible (for import or export). Making it
* "hidden" means it is invisible outside the shared object. */
#ifndef AUDACITY_DLL_API
@@ -154,11 +154,11 @@ void QuitAudacity();
// For compilers that support precompilation, includes "wx/wx.h".
// Mainly for MSVC developers.
//
-// This precompilation is only done for non-unicode debug builds.
+// This precompilation is only done for non-unicode debug builds.
// The rationale is that this is where there is the big time saving
// because that's what you build whilst debugging.
// Whilst disabling precompilation for other builds will ensure
-// that missing headers that would affect other platforms do get
+// that missing headers that would affect other platforms do get
// seen by MSVC developers too.
#ifndef UNICODE
diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp
index c4c77b99f..39f00afe5 100644
--- a/src/AudacityApp.cpp
+++ b/src/AudacityApp.cpp
@@ -9,7 +9,7 @@
******************************************************************//**
\class AudacityApp
-\brief AudacityApp is the 'main' class for Audacity
+\brief AudacityApp is the 'main' class for Audacity
It handles initialization and termination by subclassing wxApp.
@@ -232,7 +232,7 @@ static bool gInited = false;
bool gIsQuitting = false;
void QuitAudacity(bool bForce)
-{
+{
if (gIsQuitting)
return;
@@ -285,14 +285,14 @@ void QuitAudacity(bool bForce)
CloseScoreAlignDialog();
#endif
CloseScreenshotTools();
-
+
//release ODManager Threads
ODManager::Quit();
//print out profile if we have one by deleting it
//temporarilly commented out till it is added to all projects
//delete Profiler::Instance();
-
+
//delete the static lock for audacity projects
AudacityProject::DeleteAllProjectsDeleteLock();
@@ -306,7 +306,7 @@ void QuitAudacity(bool bForce)
}
void QuitAudacity()
-{
+{
QuitAudacity(false);
}
@@ -397,8 +397,8 @@ void SaveWindowSize()
// Most of this was taken from nsNativeAppSupportUnix.cpp from Mozilla.
///////////////////////////////////////////////////////////////////////////////
-// TODO: May need updating. Is this code too obsolete (relying on Gnome2 so's) to be
-// worth keeping anymore?
+// TODO: May need updating. Is this code too obsolete (relying on Gnome2 so's) to be
+// worth keeping anymore?
// CB suggests we use libSM directly ref:
// http://www.x.org/archive/X11R7.7/doc/libSM/SMlib.html#The_Save_Yourself_Callback
@@ -599,7 +599,7 @@ public:
wxString cmd(data);
- // We queue a command event to the project responsible for
+ // We queue a command event to the project responsible for
// opening the file since it can be a long process and we
// only have 5 seconds to return the Execute message to the
// client.
@@ -696,7 +696,7 @@ void AudacityApp::MacNewFile()
// This method should only be used on the Mac platform
// when no project windows are open.
-
+
if (gAudacityProjects.GetCount() == 0) {
CreateNewAudacityProject();
}
@@ -727,7 +727,7 @@ BEGIN_EVENT_TABLE(AudacityApp, wxApp)
EVT_MENU(wxID_PREFERENCES, AudacityApp::OnMenuPreferences)
EVT_MENU(wxID_EXIT, AudacityApp::OnMenuExit)
#endif
- // Recent file event handlers.
+ // Recent file event handlers.
EVT_MENU(ID_RECENT_CLEAR, AudacityApp::OnMRUClear)
EVT_MENU_RANGE(ID_RECENT_FIRST, ID_RECENT_LAST, AudacityApp::OnMRUFile)
@@ -735,32 +735,32 @@ BEGIN_EVENT_TABLE(AudacityApp, wxApp)
EVT_APP_COMMAND(wxID_ANY, AudacityApp::OnReceiveCommand)
END_EVENT_TABLE()
-// backend for OnMRUFile
+// backend for OnMRUFile
// TODO: Would be nice to make this handle not opening a file with more panache.
// - Inform the user if DefaultOpenPath not set.
// - Switch focus to correct instance of project window, if already open.
bool AudacityApp::MRUOpen(wxString fullPathStr) {
// Most of the checks below are copied from AudacityProject::OpenFiles.
// - some rationalisation might be possible.
-
+
AudacityProject *proj = GetActiveProject();
-
- if (!fullPathStr.IsEmpty())
- {
- // verify that the file exists
- if (wxFile::Exists(fullPathStr))
+
+ if (!fullPathStr.IsEmpty())
+ {
+ // verify that the file exists
+ if (wxFile::Exists(fullPathStr))
{
- if (!gPrefs->Write(wxT("/DefaultOpenPath"), wxPathOnly(fullPathStr)) ||
+ if (!gPrefs->Write(wxT("/DefaultOpenPath"), wxPathOnly(fullPathStr)) ||
!gPrefs->Flush())
return false;
-
+
// Make sure it isn't already open.
- // Test here even though AudacityProject::OpenFile() also now checks, because
- // that method does not return the bad result.
+ // Test here even though AudacityProject::OpenFile() also now checks, because
+ // that method does not return the bad result.
// That itself may be a FIXME.
if (AudacityProject::IsAlreadyOpen(fullPathStr))
return false;
-
+
// DMM: If the project is dirty, that means it's been touched at
// all, and it's not safe to open a new project directly in its
// place. Only if the project is brand-new clean and the user
@@ -781,7 +781,7 @@ bool AudacityApp::MRUOpen(wxString fullPathStr) {
}
else {
// File doesn't exist - remove file from history
- wxMessageBox(wxString::Format(_("%s could not be found.\n\nIt has been removed from the list of recent files."),
+ wxMessageBox(wxString::Format(_("%s could not be found.\n\nIt has been removed from the list of recent files."),
fullPathStr.c_str()));
return(false);
}
@@ -794,18 +794,18 @@ void AudacityApp::OnMRUClear(wxCommandEvent& WXUNUSED(event))
mRecentFiles->Clear();
}
-//vvv Basically, anything from Recent Files is treated as a .aup, until proven otherwise,
-// then it tries to Import(). Very questionable handling, imo.
+//vvv Basically, anything from Recent Files is treated as a .aup, until proven otherwise,
+// then it tries to Import(). Very questionable handling, imo.
// Better, for example, to check the file type early on.
void AudacityApp::OnMRUFile(wxCommandEvent& event) {
int n = event.GetId() - ID_RECENT_FIRST;
wxString fullPathStr = mRecentFiles->GetHistoryFile(n);
- // Try to open only if not already open.
- // Test IsAlreadyOpen() here even though AudacityProject::MRUOpen() also now checks,
+ // Try to open only if not already open.
+ // Test IsAlreadyOpen() here even though AudacityProject::MRUOpen() also now checks,
// because we don't want to RemoveFileFromHistory() just because it already exists,
// and AudacityApp::OnMacOpenFile() calls MRUOpen() directly.
- // that method does not return the bad result.
+ // that method does not return the bad result.
if (!AudacityProject::IsAlreadyOpen(fullPathStr) && !MRUOpen(fullPathStr))
mRecentFiles->RemoveFileFromHistory(n);
}
@@ -813,7 +813,7 @@ void AudacityApp::OnMRUFile(wxCommandEvent& event) {
void AudacityApp::OnTimer(wxTimerEvent& WXUNUSED(event))
{
#if defined(__WXMAC__)
- // Filenames are queued when Audacity receives the a few of the
+ // Filenames are queued when Audacity receives the a few of the
// AppleEvent messages (via wxWidgets). So, open any that are
// in the queue and clean the queue.
if (ofqueue.GetCount()) {
@@ -833,7 +833,7 @@ void AudacityApp::OnTimer(wxTimerEvent& WXUNUSED(event))
}
}
#endif
-
+
// Check if a warning for missing aliased files should be displayed
if (ShouldShowMissingAliasedFileWarning()) {
// find which project owns the blockfile
@@ -862,7 +862,7 @@ void AudacityApp::OnTimer(wxTimerEvent& WXUNUSED(event))
if (offendingProject) {
offendingProject->Iconize(false);
offendingProject->Raise();
-
+
wxString errorMessage = wxString::Format(_(
"One or more external audio files could not be found.\n\
It is possible they were moved, deleted, or the drive they \
@@ -874,7 +874,7 @@ There may be additional missing files.\n\
Choose File > Check Dependencies to view a list of \
locations of the missing files."), missingFileName.c_str());
- // if an old dialog exists, raise it if it is
+ // if an old dialog exists, raise it if it is
if (offendingProject->GetMissingAliasFileDialog()) {
offendingProject->GetMissingAliasFileDialog()->Raise();
} else {
@@ -965,7 +965,7 @@ void AudacityApp::InitLang( const wxString & lang )
// catalogs are search in LIFO order, so add wxstd first.
mLocale->AddCatalog(wxT("wxstd"));
-// AUDACITY_NAME is legitimately used on some *nix configurations.
+// AUDACITY_NAME is legitimately used on some *nix configurations.
#ifdef AUDACITY_NAME
mLocale->AddCatalog(wxT(AUDACITY_NAME));
#else
@@ -998,7 +998,7 @@ int AudacityApp::FilterEvent(wxEvent & event)
if (event.GetEventType() == wxEVT_ACTIVATE)
{
wxActivateEvent & e = (wxActivateEvent &) event;
-
+
if (e.GetEventObject() && e.GetActive() && e.GetEventObject()->IsKindOf(CLASSINFO(wxDialog)))
{
((wxWindow *)e.GetEventObject())->SetFocus();
@@ -1065,7 +1065,7 @@ bool AudacityApp::OnInit()
InitPreferences();
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) && !defined(__CYGWIN__)
- this->AssociateFileTypes();
+ this->AssociateFileTypes();
#endif
// TODO - read the number of files to store in history from preferences
@@ -1080,7 +1080,7 @@ bool AudacityApp::OnInit()
theTheme.EnsureInitialised();
// AColor depends on theTheme.
- AColor::Init();
+ AColor::Init();
/* Search path (for plug-ins, translations etc) is (in this order):
* The AUDACITY_PATH environment variable
@@ -1090,7 +1090,7 @@ bool AudacityApp::OnInit()
#ifdef __WXGTK__
/* On Unix systems, the default temp dir is in /var/tmp. */
defaultTempDir.Printf(wxT("/var/tmp/audacity-%s"), wxGetUserId().c_str());
-
+
wxString pathVar = wxGetenv(wxT("AUDACITY_PATH"));
if (pathVar != wxT(""))
AddMultiPathsToPathList(pathVar, audacityPathList);
@@ -1134,8 +1134,8 @@ bool AudacityApp::OnInit()
wxString progPath = wxPathOnly(argv[0]);
AddUniquePathToPathList(progPath, audacityPathList);
AddUniquePathToPathList(progPath+wxT("\\Languages"), audacityPathList);
-
- defaultTempDir.Printf(wxT("%s\\audacity_temp"),
+
+ defaultTempDir.Printf(wxT("%s\\audacity_temp"),
tmpDirLoc.c_str());
#endif //__WXWSW__
@@ -1152,7 +1152,7 @@ bool AudacityApp::OnInit()
AddUniquePathToPathList(progPath+wxT("/../"), audacityPathList);
AddUniquePathToPathList(progPath+wxT("/../Resources"), audacityPathList);
- defaultTempDir.Printf(wxT("%s/audacity-%s"),
+ defaultTempDir.Printf(wxT("%s/audacity-%s"),
tmpDirLoc.c_str(),
wxGetUserId().c_str());
#endif //__WXMAC__
@@ -1248,14 +1248,14 @@ bool AudacityApp::OnInit()
}
delete temporarywindow;
-
+
if( project->mShowSplashScreen )
project->OnHelpWelcome();
// JKC 10-Sep-2007: Enable monitoring from the start.
// (recommended by lprod.org).
- // Monitoring stops again after any
- // PLAY or RECORD completes.
+ // Monitoring stops again after any
+ // PLAY or RECORD completes.
// So we also call StartMonitoring when STOP is called.
project->MayStartMonitoring();
@@ -1343,12 +1343,12 @@ bool AudacityApp::OnInit()
} // if (argc>1)
#else //__CYGWIN__
-
+
// Cygwin command line parser (by Dave Fancella)
if (argc > 1 && !didRecoverAnything) {
int optionstart = 1;
bool startAtOffset = false;
-
+
// Scan command line arguments looking for trouble
for (int option = 1; option < argc; option++) {
if (!argv[option])
@@ -1360,14 +1360,14 @@ bool AudacityApp::OnInit()
optionstart = option + 1;
}
}
-
+
for (int option = optionstart; option < argc; option++) {
if (!argv[option])
continue;
bool handled = false;
bool openThisFile = false;
wxString fileToOpen;
-
+
if (!wxString(wxT("-help")).CmpNoCase(argv[option])) {
PrintCommandLineHelp(); // print the help message out
exit(0);
@@ -1397,10 +1397,10 @@ bool AudacityApp::OnInit()
wxPrintf(_("Unknown command line option: %s\n"), argv[option]);
exit(0);
}
-
+
if(handled)
fileToOpen.Clear();
-
+
if (!handled)
fileToOpen = fileToOpen + wxT(" ") + argv[option];
if(wxString(argv[option]).Lower().Contains(wxT(".aup")))
@@ -1422,7 +1422,7 @@ bool AudacityApp::OnInit()
#endif // __CYGWIN__ (Cygwin command-line parser)
gInited = true;
-
+
ModuleManager::Dispatch(AppInitialized);
mWindowRectAlreadySaved = FALSE;
@@ -1588,7 +1588,7 @@ bool AudacityApp::CreateSingleInstanceChecker(wxString dir)
}
#endif
// There is another copy of Audacity running. Force quit.
-
+
wxString prompt =
_("The system has detected that another copy of Audacity is running.\n") +
runningTwoCopiesStr +
@@ -1820,7 +1820,7 @@ int AudacityApp::OnExit()
// where it's possible to have a menu bar but no windows open.
// It doesn't hurt any other platforms, though.
-// ...That is, as long as you check to see if no windows are open
+// ...That is, as long as you check to see if no windows are open
// before executing the stuff.
// To fix this, check to see how many project windows are open,
// and skip the event unless none are open (which should only happen
@@ -1830,7 +1830,7 @@ void AudacityApp::OnMenuAbout(wxCommandEvent & event)
{
// This function shadows a similar function
// in Menus.cpp, but should only be used on the Mac platform
- // when no project windows are open. This check assures that
+ // when no project windows are open. This check assures that
// this happens, and enable the same code to be present on
// all platforms.
if(gAudacityProjects.GetCount() == 0) {
@@ -1845,10 +1845,10 @@ void AudacityApp::OnMenuNew(wxCommandEvent & event)
{
// This function shadows a similar function
// in Menus.cpp, but should only be used on the Mac platform
- // when no project windows are open. This check assures that
+ // when no project windows are open. This check assures that
// this happens, and enable the same code to be present on
// all platforms.
-
+
if(gAudacityProjects.GetCount() == 0)
CreateNewAudacityProject();
else
@@ -1860,7 +1860,7 @@ void AudacityApp::OnMenuOpen(wxCommandEvent & event)
{
// This function shadows a similar function
// in Menus.cpp, but should only be used on the Mac platform
- // when no project windows are open. This check assures that
+ // when no project windows are open. This check assures that
// this happens, and enable the same code to be present on
// all platforms.
@@ -1877,7 +1877,7 @@ void AudacityApp::OnMenuPreferences(wxCommandEvent & event)
{
// This function shadows a similar function
// in Menus.cpp, but should only be used on the Mac platform
- // when no project windows are open. This check assures that
+ // when no project windows are open. This check assures that
// this happens, and enable the same code to be present on
// all platforms.
@@ -1887,33 +1887,33 @@ void AudacityApp::OnMenuPreferences(wxCommandEvent & event)
}
else
event.Skip();
-
+
}
void AudacityApp::OnMenuExit(wxCommandEvent & event)
{
// This function shadows a similar function
// in Menus.cpp, but should only be used on the Mac platform
- // when no project windows are open. This check assures that
+ // when no project windows are open. This check assures that
// this happens, and enable the same code to be present on
// all platforms.
// LL: Removed "if" to allow closing based on final project count.
// if(gAudacityProjects.GetCount() == 0)
QuitAudacity();
-
+
// LL: Veto quit if projects are still open. This can happen
// if the user selected Cancel in a Save dialog.
event.Skip(gAudacityProjects.GetCount() == 0);
-
+
}
//BG: On Windows, associate the aup file type with Audacity
-/* We do this in the Windows installer now,
- to avoid issues where user doesn't have admin privileges, but
+/* We do this in the Windows installer now,
+ to avoid issues where user doesn't have admin privileges, but
in case that didn't work, allow the user to decide at startup.
- //v Should encapsulate this & allow access from Prefs, too,
+ //v Should encapsulate this & allow access from Prefs, too,
// if people want to manually change associations.
*/
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) && !defined(__CYGWIN__)
@@ -1927,18 +1927,18 @@ void AudacityApp::AssociateFileTypes()
associateFileTypes.SetName(wxT("HKCU\\Software\\Classes\\.AUP"));
bKeyExists = associateFileTypes.Exists();
}
- if (!bKeyExists) {
- // File types are not currently associated.
+ if (!bKeyExists) {
+ // File types are not currently associated.
// Check pref in case user has already decided against it.
bool bWantAssociateFiles = true;
- if (!gPrefs->Read(wxT("/WantAssociateFiles"), &bWantAssociateFiles) ||
+ if (!gPrefs->Read(wxT("/WantAssociateFiles"), &bWantAssociateFiles) ||
bWantAssociateFiles) {
- // Either there's no pref or user does want associations
+ // Either there's no pref or user does want associations
// and they got stepped on, so ask.
- int wantAssoc =
+ int wantAssoc =
wxMessageBox(
- _("Audacity project (.AUP) files are not currently \nassociated with Audacity. \n\nAssociate them, so they open on double-click?"),
- _("Audacity Project Files"),
+ _("Audacity project (.AUP) files are not currently \nassociated with Audacity. \n\nAssociate them, so they open on double-click?"),
+ _("Audacity Project Files"),
wxYES_NO | wxICON_QUESTION);
if (wantAssoc == wxYES) {
gPrefs->Write(wxT("/WantAssociateFiles"), true);
@@ -1952,7 +1952,7 @@ void AudacityApp::AssociateFileTypes()
// Not at HKEY_CLASSES_USER. Try HKEY_CURRENT_ROOT.
root_key = wxT("HKCR\\");
associateFileTypes.SetName(root_key + wxT(".AUP"));
- if (!associateFileTypes.Create(true)) {
+ if (!associateFileTypes.Create(true)) {
// Actually, can't create keys. Empty root_key to flag failure.
root_key.Empty();
}
@@ -1984,7 +1984,7 @@ void AudacityApp::AssociateFileTypes()
if(associateFileTypes.Exists()) {
tmpRegAudPath = wxString(associateFileTypes).Lower();
}
- if (!associateFileTypes.Exists() ||
+ if (!associateFileTypes.Exists() ||
(tmpRegAudPath.Find(wxT("audacity.exe")) >= 0)) {
associateFileTypes.Create(true);
associateFileTypes = (wxString)argv[0] + (wxString)wxT(" \"%1\"");
diff --git a/src/AudacityApp.h b/src/AudacityApp.h
index ae769c9c3..6c945489a 100644
--- a/src/AudacityApp.h
+++ b/src/AudacityApp.h
@@ -54,12 +54,12 @@ DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_CAPTURE_KEY, -1);
// These flags represent the majority of the states that affect
// whether or not items in menus are enabled or disabled.
-enum
+enum
{
AlwaysEnabledFlag = 0x00000000,
AudioIONotBusyFlag = 0x00000001,
- TimeSelectedFlag = 0x00000002, // This is equivalent to check if there is a valid selection, so it's used for Zoom to Selection too
+ TimeSelectedFlag = 0x00000002, // This is equivalent to check if there is a valid selection, so it's used for Zoom to Selection too
TracksSelectedFlag = 0x00000004,
TracksExistFlag = 0x00000008,
LabelTracksExistFlag = 0x00000010,
@@ -144,11 +144,11 @@ class AudacityApp:public wxApp {
/** \brief Changes the behavior of missing aliased blockfiles warnings
*/
void SetMissingAliasedFileWarningShouldShow(bool b);
-
+
/** \brief Returns true if the user should be notified of missing alias warnings
*/
bool ShouldShowMissingAliasedFileWarning();
-
+
#ifdef __WXMAC__
// In response to Apple Events
virtual void MacOpenFile(const wxString &fileName) ;
@@ -161,7 +161,7 @@ class AudacityApp:public wxApp {
#endif
/** \brief A list of directories that should be searched for Audacity files
- * (plug-ins, help files, etc.).
+ * (plug-ins, help files, etc.).
*
* On Unix this will include the directory Audacity was installed into,
* plus the current user's .audacity-data/Plug-Ins directory. Additional
@@ -207,10 +207,10 @@ class AudacityApp:public wxApp {
wxSingleInstanceChecker *mChecker;
wxTimer *mTimer;
-
+
bool m_aliasMissingWarningShouldShow;
BlockFile *m_LastMissingBlockFile;
-
+
ODLock m_LastMissingBlockFileLock;
void InitCommandHandler();
diff --git a/src/AudacityHeaders.h b/src/AudacityHeaders.h
index ca1132480..2219e93cc 100644
--- a/src/AudacityHeaders.h
+++ b/src/AudacityHeaders.h
@@ -76,7 +76,7 @@
//#ifdef __WXMSW__
// Enable this to diagnose memory leaks too!
-// #include // redefines the new() operator
+// #include // redefines the new() operator
//#endif
#if __WXMSW__
diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp
index 0564b5c54..291e85297 100644
--- a/src/AudioIO.cpp
+++ b/src/AudioIO.cpp
@@ -23,7 +23,7 @@
Great care and attention to detail are necessary for understanding and
modifying this system. The code in this file is run from three
different thread contexts: the UI thread, the disk thread (which
- this file creates and maintains; in the code, this is called the
+ this file creates and maintains; in the code, this is called the
Audio Thread), and the PortAudio callback thread.
To highlight this deliniation, the file is divided into three parts
based on what thread context each function is intended to run in.
@@ -32,7 +32,7 @@
If EXPERIMENTAL_MIDI_PLAYBACK is defined, this class also manages
MIDI playback. The reason for putting MIDI here rather than in, say,
class MidiIO, is that there is no high-level synchronization and
- transport architecture, so Audio and MIDI must be coupled in order
+ transport architecture, so Audio and MIDI must be coupled in order
to start/stop/pause and synchronize them.
\par MIDI With Audio
@@ -51,12 +51,12 @@
actually sends samples to the output device. The relatively low
latency to the output device allows Audacity to stop audio output
quickly. We want the same behavior for MIDI, but there is not
- periodic callback from PortMidi (because MIDI is asynchronous), so
+ periodic callback from PortMidi (because MIDI is asynchronous), so
this function is performed by the MidiThread class.
\par
When Audio is running, MIDI is synchronized to Audio. Globals are set
- in the Audio callback (audacityAudioCallback) for use by a time
+ in the Audio callback (audacityAudioCallback) for use by a time
function that reports milliseconds to PortMidi. (Details below.)
\par MIDI Without Audio
@@ -65,7 +65,7 @@
\par Implementation Notes and Details for MIDI
When opening devices, successAudio and successMidi indicate errors
- if false, so normally both are true. Use playbackChannels,
+ if false, so normally both are true. Use playbackChannels,
captureChannels and mMidiPlaybackTracks.IsEmpty() to determine if
Audio or MIDI is actually in use.
@@ -73,32 +73,32 @@
Normally, the current time during playback is given by the variable
mTime. mTime normally advances by frames / samplerate each time an
audio buffer is output by the audio callback. However, Audacity has
- a speed control that can perform continuously variable time stretching
+ a speed control that can perform continuously variable time stretching
on audio. This is achieved in two places: the playback "mixer" that
- generates the samples for output processes the audio according to
+ generates the samples for output processes the audio according to
the speed control. In a separate algorithm, the audio callback updates
mTime by (frames / samplerate) * factor, where factor reflects the
speed at mTime. This effectively integrates speed to get position.
-
+
\par Midi Time
- MIDI is not warped according to the speed control. This might be
- something that should be changed. (Editorial note: Wouldn't it
- make more sense to display audio at the correct time and allow
+ MIDI is not warped according to the speed control. This might be
+ something that should be changed. (Editorial note: Wouldn't it
+ make more sense to display audio at the correct time and allow
users to stretch audio the way they can stretch MIDI?) For now,
MIDI plays at 1 second per second, so it requires an unwarped clock.
In fact, MIDI time synchronization requires a millisecond clock that
does not pause. Note that mTime will stop progress when the Pause
- button is pressed, even though audio samples (zeros) continue to
+ button is pressed, even though audio samples (zeros) continue to
be output.
- \par
+ \par
Therefore, we define the following interface for MIDI timing:
\li \c AudioTime() is the time based on all samples written so far, including zeros output during pauses. AudioTime() is based on the start location mT0, not zero.
\li \c PauseTime() is the amount of time spent paused, based on a count of zero samples output.
\li \c MidiTime() is an estimate in milliseconds of the current audio output time + 1s. In other words, what audacity track time corresponds to the audio (including pause insertions) at the output?
\par AudioTime() and PauseTime() computation
- AudioTime() is simply mT0 + mNumFrames / mRate.
+ AudioTime() is simply mT0 + mNumFrames / mRate.
mNumFrames is incremented in each audio callback. Similarly, PauseTime()
is mNumPauseFrames / mRate. mNumPauseFrames is also incremented in
each audio callback when a pause is in effect.
@@ -107,10 +107,10 @@
MidiTime() is computed based on information from PortAudio's callback,
which estimates the system time at which the current audio buffer will
be output. Consider the (unimplemented) function RealToTrack() that
- maps real time to track time. If outputTime is PortAudio's time
+ maps real time to track time. If outputTime is PortAudio's time
estimate for the most recent output buffer, then \n
RealToTrack(outputTime) = AudioTime() - PauseTime() - bufferDuration \n
- We want to know RealToTrack of the current time, so we use this
+ We want to know RealToTrack of the current time, so we use this
approximation for small d: \n
RealToTrack(t + d) = RealToTrack(t) + d \n
Letting t = outputTime and d = (systemTime - outputTime), we can
@@ -121,19 +121,19 @@
time at startup, so add 1 to both sides:
MidiTime() in seconds = RealToTrack(systemTime) + PauseTime() + 1 = \n
AudioTime() - bufferduration + (systemTime - outputTime) + 1
-
+
\par
- The difference AudioTime() - PauseTime() is the time "cursor" for
- MIDI. When the speed control is used, MIDI and Audio will become
- unsynchronized. In particular, MIDI will not be synchronized with
+ The difference AudioTime() - PauseTime() is the time "cursor" for
+ MIDI. When the speed control is used, MIDI and Audio will become
+ unsynchronized. In particular, MIDI will not be synchronized with
the visual cursor, which moves with scaled time reported in mTime.
-
+
\par Midi Synchronization
The goal of MIDI playback is to deliver MIDI messages synchronized to
audio (assuming no speed variation for now). If a midi event has time
tmidi, then the timestamp for that message should be \n
timestamp (in seconds) = tmidi + PauseTime() + 1.0 - latency.\n
- (This is actually off by 1ms; see "PortMidi Latency Parameter" below for
+ (This is actually off by 1ms; see "PortMidi Latency Parameter" below for
more detail.)
Notice the extra 1.0, added because MidiTime() is offset by 1s to avoid
starting at a negative value. Also notice that we subtract latency.
@@ -145,31 +145,31 @@
is synchronized to audio output. So the only thing we need to do is
output Midi messages shortly before they will be played with the correct
timestamp. We will take "shortly before" to mean "at about the same time
- as corresponding audio". Based on this, output the event when
+ as corresponding audio". Based on this, output the event when
AudioTime() - PauseTime() > mtime - latency,
- adjusting the event time by adding PauseTime() + 1 - latency.
- This gives at least mAudioOutputLatency for
+ adjusting the event time by adding PauseTime() + 1 - latency.
+ This gives at least mAudioOutputLatency for
the MIDI output to be generated (we want to generate MIDI output before
- the actual output time because events generated early are accurately timed
- according to their timestamp). However, the MIDI thread sleeps for
- MIDI_SLEEP in its polling loop, so the worst case is really
- mAudioOutputLatency + MIDI_SLEEP. In case the audio output latency is
- very low, we will output events when
+ the actual output time because events generated early are accurately timed
+ according to their timestamp). However, the MIDI thread sleeps for
+ MIDI_SLEEP in its polling loop, so the worst case is really
+ mAudioOutputLatency + MIDI_SLEEP. In case the audio output latency is
+ very low, we will output events when
AudioTime() + MIDI_SLEEP - PauseTime() > mtime - latency.
\par Interaction between MIDI, Audio, and Pause
When Pause is used, PauseTime() will increase at the same rate as
- AudioTime(), and no more events will be output. Because of the
- time advance of mAudioOutputLatency + MIDI_SLEEP + latency and the
+ AudioTime(), and no more events will be output. Because of the
+ time advance of mAudioOutputLatency + MIDI_SLEEP + latency and the
fact that
- AudioTime() advances stepwise by mAudioBufferDuration, some extra MIDI
+ AudioTime() advances stepwise by mAudioBufferDuration, some extra MIDI
might be output, but the same is true of audio: something like
mAudioOutputLatency audio samples will be in the output buffer
- (with up to mAudioBufferDuration additional samples, depending on
+ (with up to mAudioBufferDuration additional samples, depending on
when the Pause takes effect). When playback is resumed, there will
be a slight delay corresponding to the extra data previously sent.
Again, the same is true of audio. Audio and MIDI will not pause and
- resume at exactly the same times, but their pause and resume times
+ resume at exactly the same times, but their pause and resume times
will be within the low tens of milliseconds, and the streams will
be synchronized in any case. I.e. if audio pauses 10ms earlier than
MIDI, it will resume 10ms earlier as well.
@@ -193,7 +193,7 @@
\par Midi Without Audio Playback
When there is no audio playback, MIDI runs according to its own clock.
- The midi timestamp clock starts at approximately the same time as
+ The midi timestamp clock starts at approximately the same time as
audio recording (if any). A timestamp of 0 corresponds to mT0, the
starting time in the Midi track(s). Thus the timestamp for an event
at time tmidi should be: \n
@@ -204,8 +204,8 @@
\par Midi Output Without Audio Playback
Midi events should be written before their timestamp expires. Since
the loop that checks for events to write pauses for MIDI_SLEEP, the
- events should be written at least MIDI_SLEEP early, and due to
- other delays and computation, we want some extra time, so let's
+ events should be written at least MIDI_SLEEP early, and due to
+ other delays and computation, we want some extra time, so let's
allow 2*MIDI_SLEEP. Therefore, the write time should be when:\n
tmidi - mT0 + PauseTime() - latency - 0.001 - 2 * MIDI_SLEEP < Pt_Time()\n,
which can be rearranged to:\n
@@ -216,14 +216,14 @@
\par The code for Midi Without Audio was developed by simply trying
to play Midi alone and fixing everything that did not work. The
- "normal" AudioIO execution was full of assumptions about audio, so
+ "normal" AudioIO execution was full of assumptions about audio, so
there is no systematic design for running without audio, merely a
- number of "patches" to make it work. The expression
+ number of "patches" to make it work. The expression
"mNumPlaybackChannels > 0" is used to detect whether audio playback
is active, and "mNumFrames > 0" is used to indicate that playback
- of either Midi or Audio has actually started. (mNumFrames is
+ of either Midi or Audio has actually started. (mNumFrames is
normally incremented by the audio callback, but if there is no
- audio playback or recording, it is set to 1 at the end of
+ audio playback or recording, it is set to 1 at the end of
initialization.
\par NoteTrack PlayLooped
@@ -231,17 +231,17 @@
For NoteTracks, we interpret this to mean that any note-on or control
change in the range mT0 <= t < mT1 is sent (notes that start before
mT0 are not played even if they extend beyond mT0). Then, all notes
- are turned off. Events in the range mT0 <= t < mT1 are then repeated,
- offset by (mT1 - mT0), etc. We do NOT go back to the beginning and
- play all control changes (update events) up to mT0, nor do we "undo"
- any state changes between mT0 and mT1.
+ are turned off. Events in the range mT0 <= t < mT1 are then repeated,
+ offset by (mT1 - mT0), etc. We do NOT go back to the beginning and
+ play all control changes (update events) up to mT0, nor do we "undo"
+ any state changes between mT0 and mT1.
\par NoteTrack PlayLooped Implementation
The mIterator object (an Alg_iterator) returns NULL when there are
- no more events scheduled before mT1. At mT1, we want to output
+ no more events scheduled before mT1. At mT1, we want to output
all notes off messages, but the FillMidiBuffers() loop will exit
if mNextEvent is NULL, so we create a "fake" mNextEvent for this
- special "event" of sending all notes off. After that, we destroy
+ special "event" of sending all notes off. After that, we destroy
the iterator and use PrepareMidiIterator() to set up a new one.
At each iteration, time must advance by (mT1 - mT0), so the
accumulated time is held in mMidiLoopOffset.
@@ -258,7 +258,7 @@
\class AudioThread
\brief Defined different on Mac and other platforms (on Mac it does not
-use wxWidgets wxThread), this class sits in a thread loop reading and
+use wxWidgets wxThread), this class sits in a thread loop reading and
writing audio.
*//*******************************************************************/
@@ -577,7 +577,7 @@ AudioIO::AudioIO()
PmError pmErr = Pm_Initialize();
if (pmErr != pmNoError) {
- wxString errStr =
+ wxString errStr =
_("There was an error initializing the midi i/o layer.\n");
errStr += _("You will not be able to play midi.\n\n");
wxString pmErrStr = LAT1CTOWX(Pm_GetErrorText(pmErr));
@@ -632,8 +632,8 @@ AudioIO::~AudioIO()
(Kill is the not-graceful way.) */
wxTheApp->Yield();
mThread->Delete();
-
- if(mSilentBuf)
+
+ if(mSilentBuf)
DeleteSamples(mSilentBuf);
delete mThread;
@@ -743,9 +743,9 @@ wxArrayString AudioIO::GetInputSourceNames()
void AudioIO::HandleDeviceChange()
{
// This should not happen, but it would screw things up if it did.
- // Vaughan, 2010-10-08: But it *did* happen, due to a bug, and nobody
+ // Vaughan, 2010-10-08: But it *did* happen, due to a bug, and nobody
// caught it because this method just returned. Added wxASSERT().
- wxASSERT(!IsStreamActive());
+ wxASSERT(!IsStreamActive());
if (IsStreamActive())
return;
@@ -813,10 +813,10 @@ void AudioIO::HandleDeviceChange()
playbackParameters.suggestedLatency =
Pa_GetDeviceInfo(playDeviceNum)->defaultLowOutputLatency;
else
- playbackParameters.suggestedLatency = DEFAULT_LATENCY_CORRECTION/1000.0;
+ playbackParameters.suggestedLatency = DEFAULT_LATENCY_CORRECTION/1000.0;
PaStreamParameters captureParameters;
-
+
captureParameters.device = recDeviceNum;
captureParameters.sampleFormat = paFloat32;;
captureParameters.hostApiSpecificStreamInfo = NULL;
@@ -825,7 +825,7 @@ void AudioIO::HandleDeviceChange()
captureParameters.suggestedLatency =
Pa_GetDeviceInfo(recDeviceNum)->defaultLowInputLatency;
else
- captureParameters.suggestedLatency = DEFAULT_LATENCY_CORRECTION/1000.0;
+ captureParameters.suggestedLatency = DEFAULT_LATENCY_CORRECTION/1000.0;
// try opening for record and playback
error = Pa_OpenStream(&stream,
@@ -833,7 +833,7 @@ void AudioIO::HandleDeviceChange()
highestSampleRate, paFramesPerBufferUnspecified,
paClipOff | paDitherOff,
audacityAudioCallback, NULL);
-
+
if (!error) {
// Try portmixer for this stream
mPortMixer = Px_OpenMixer(stream, 0);
@@ -867,7 +867,7 @@ void AudioIO::HandleDeviceChange()
highestSampleRate, paFramesPerBufferUnspecified,
paClipOff | paDitherOff,
audacityAudioCallback, NULL);
-
+
if (!error) {
mPortMixer = Px_OpenMixer(stream, 0);
if (!mPortMixer) {
@@ -922,7 +922,7 @@ void AudioIO::HandleDeviceChange()
Px_SetInputVolume(mPortMixer, inputVol);
Pa_CloseStream(stream);
-
+
#if 0
printf("PortMixer: Output: %s Input: %s\n",
@@ -966,11 +966,11 @@ bool AudioIO::StartPortAudioStream(double sampleRate,
// advertise the chosen I/O sample rate to the UI
mListener->OnAudioIORate((int)mRate);
}
-
+
// Special case: Our 24-bit sample format is different from PortAudio's
// 3-byte packed format. So just make PortAudio return float samples,
// since we need float values anyway to apply the gain.
- // ANSWER-ME: So we *never* actually handle 24-bit?! This causes mCapture to be set to floatSample below.
+ // ANSWER-ME: So we *never* actually handle 24-bit?! This causes mCapture to be set to floatSample below.
if (captureFormat == int24Sample)
captureFormat = floatSample;
@@ -979,7 +979,7 @@ bool AudioIO::StartPortAudioStream(double sampleRate,
PaStreamParameters *playbackParameters = NULL;
PaStreamParameters *captureParameters = NULL;
-
+
double latencyDuration = DEFAULT_LATENCY_DURATION;
gPrefs->Read(wxT("/AudioIO/LatencyDuration"), &latencyDuration);
@@ -989,16 +989,16 @@ bool AudioIO::StartPortAudioStream(double sampleRate,
// this sets the device index to whatever is "right" based on preferences,
// then defaults
playbackParameters->device = getPlayDevIndex();
-
+
const PaDeviceInfo *playbackDeviceInfo;
playbackDeviceInfo = Pa_GetDeviceInfo( playbackParameters->device );
-
+
if( playbackDeviceInfo == NULL )
{
delete playbackParameters;
return false;
}
-
+
// regardless of source formats, we always mix to float
playbackParameters->sampleFormat = paFloat32;
playbackParameters->hostApiSpecificStreamInfo = NULL;
@@ -1014,7 +1014,7 @@ bool AudioIO::StartPortAudioStream(double sampleRate,
if( numCaptureChannels > 0)
{
mCaptureFormat = captureFormat;
-
+
captureParameters = new PaStreamParameters;
const PaDeviceInfo *captureDeviceInfo;
// retrieve the index of the device set in the prefs, or a sensible
@@ -1043,7 +1043,7 @@ bool AudioIO::StartPortAudioStream(double sampleRate,
captureParameters->suggestedLatency = latencyDuration/1000.0;
}
#ifdef EXPERIMENTAL_MIDI_OUT
- if (numPlaybackChannels == 0 && numCaptureChannels == 0)
+ if (numPlaybackChannels == 0 && numCaptureChannels == 0)
return true;
#endif
@@ -1150,7 +1150,7 @@ int AudioIO::StartStream(WaveTrackArray playbackTracks,
if (mPortStreamV19) {
StopStream();
while(mPortStreamV19)
- wxMilliSleep( 50 );
+ wxMilliSleep( 50 );
}
gPrefs->Read(wxT("/AudioIO/SWPlaythrough"), &mSoftwarePlaythrough, false);
@@ -1234,7 +1234,7 @@ int AudioIO::StartStream(WaveTrackArray playbackTracks,
// track wouldn't get the benefit of all 24 bits the card is capable
// of.
captureFormat = mCaptureTracks[0]->GetSampleFormat();
-
+
// Tell project that we are about to start recording
if (mListener)
mListener->OnAudioIOStartRecording();
@@ -1247,7 +1247,7 @@ int AudioIO::StartStream(WaveTrackArray playbackTracks,
#ifdef EXPERIMENTAL_MIDI_OUT
// TODO: it may be that midi out will not work unless audio in or out is
- // active -- this would be a bug and may require a change in the
+ // active -- this would be a bug and may require a change in the
// logic here.
bool successMidi = true;
@@ -1268,7 +1268,7 @@ int AudioIO::StartStream(WaveTrackArray playbackTracks,
//
// The (audio) stream has been opened successfully (assuming we tried
- // to open it). We now proceed to
+ // to open it). We now proceed to
// allocate the memory structures the stream will need.
//
@@ -1283,7 +1283,7 @@ int AudioIO::StartStream(WaveTrackArray playbackTracks,
// a ring buffer of five seconds
sampleCount playbackBufferSize =
(sampleCount)(mRate * mPlaybackRingBufferSecs + 0.5f);
- sampleCount playbackMixBufferSize =
+ sampleCount playbackMixBufferSize =
(sampleCount)(mRate * mMaxPlaybackSecsToCopy + 0.5f);
// In the extraordinarily rare case that we can't even afford 100 samples, just give up.
@@ -1492,7 +1492,7 @@ void AudioIO::PrepareMidiIterator(bool send, double offset)
// Start MIDI from current cursor position
mSendMidiState = true;
- while (mNextEvent &&
+ while (mNextEvent &&
mNextEventTime < mT0 + offset) {
if (send) OutputEvent();
GetNextEvent();
@@ -1500,23 +1500,23 @@ void AudioIO::PrepareMidiIterator(bool send, double offset)
mSendMidiState = false;
}
-bool AudioIO::StartPortMidiStream()
+bool AudioIO::StartPortMidiStream()
{
- int i;
+ int i;
int nTracks = mMidiPlaybackTracks.GetCount();
// Only start MIDI stream if there is an open track
if (nTracks == 0)
return false;
mMidiLatency = 1; // arbitrary, but small
- //printf("StartPortMidiStream: mT0 %g mTime %g\n",
+ //printf("StartPortMidiStream: mT0 %g mTime %g\n",
// gAudioIO->mT0, gAudioIO->mTime);
/* get midi playback device */
PmDeviceID playbackDevice = Pm_GetDefaultOutputDeviceID();
- wxString playbackDeviceName = gPrefs->Read(wxT("/MidiIO/PlaybackDevice"),
+ wxString playbackDeviceName = gPrefs->Read(wxT("/MidiIO/PlaybackDevice"),
wxT(""));
- mSynthLatency = gPrefs->Read(wxT("/MidiIO/SynthLatency"),
+ mSynthLatency = gPrefs->Read(wxT("/MidiIO/SynthLatency"),
DEFAULT_SYNTH_LATENCY);
if (wxStrcmp(playbackDeviceName, wxT("")) != 0) {
for (i = 0; i < Pm_CountDevices(); i++) {
@@ -1533,12 +1533,12 @@ bool AudioIO::StartPortMidiStream()
} // (else playback device has Pm_GetDefaultOuputDeviceID())
/* open output device */
- mLastPmError = Pm_OpenOutput(&mMidiStream,
- playbackDevice,
+ mLastPmError = Pm_OpenOutput(&mMidiStream,
+ playbackDevice,
NULL,
- 0,
+ 0,
&::MidiTime,
- NULL,
+ NULL,
mMidiLatency);
if (mLastPmError == pmNoError) {
mMidiStreamActive = true;
@@ -1555,7 +1555,7 @@ bool AudioIO::StartPortMidiStream()
// start midi output flowing (pending first audio callback)
mMidiThreadFillBuffersLoopRunning = true;
}
- return (mLastPmError == pmNoError);
+ return (mLastPmError == pmNoError);
}
#endif
@@ -1579,16 +1579,16 @@ void AudioIO::SetMeters(Meter *inputMeter, Meter *outputMeter)
void AudioIO::StopStream()
{
- if( mPortStreamV19 == NULL
+ if( mPortStreamV19 == NULL
#ifdef EXPERIMENTAL_MIDI_OUT
- && mMidiStream == NULL
+ && mMidiStream == NULL
#endif
)
return;
- if( Pa_IsStreamStopped( mPortStreamV19 )
+ if( Pa_IsStreamStopped( mPortStreamV19 )
#ifdef EXPERIMENTAL_MIDI_OUT
- && !mMidiStreamActive
+ && !mMidiStreamActive
#endif
)
return;
@@ -1671,7 +1671,7 @@ void AudioIO::StopStream()
// if output in progress, send all off, etc.
AllNotesOff();
// AllNotesOff() should be sufficient to stop everything, but
- // in Linux, if you Pm_Close() immediately, it looks like
+ // in Linux, if you Pm_Close() immediately, it looks like
// messages are dropped. ALSA then seems to send All Sound Off
// and Reset All Controllers messages, but not all synthesizers
// respond to these messages. This is probably a bug in PortMidi
@@ -1719,7 +1719,7 @@ void AudioIO::StopStream()
// Everything is taken care of. Now, just free all the resources
// we allocated in StartStream()
//
-
+
if( mPlaybackTracks.GetCount() > 0 )
{
for( unsigned int i = 0; i < mPlaybackTracks.GetCount(); i++ )
@@ -1727,7 +1727,7 @@ void AudioIO::StopStream()
delete mPlaybackBuffers[i];
delete mPlaybackMixers[i];
}
-
+
delete[] mPlaybackBuffers;
delete[] mPlaybackMixers;
}
@@ -1746,7 +1746,7 @@ void AudioIO::StopStream()
//
double latencyCorrection = DEFAULT_LATENCY_CORRECTION;
gPrefs->Read(wxT("/AudioIO/LatencyCorrection"), &latencyCorrection);
-
+
double recordingOffset =
mLastRecordingOffset + latencyCorrection / 1000.0;
@@ -1754,7 +1754,7 @@ void AudioIO::StopStream()
{
delete mCaptureBuffers[i];
delete mResample[i];
-
+
WaveTrack* track = mCaptureTracks[i];
track->Flush();
@@ -1799,7 +1799,7 @@ void AudioIO::StopStream()
}
}
}
-
+
delete[] mCaptureBuffers;
delete[] mResample;
}
@@ -1817,7 +1817,7 @@ void AudioIO::StopStream()
if (mListener && mNumCaptureChannels > 0)
mListener->OnAudioIOStopRecording();
-
+
//
// Only set token to 0 after we're totally finished with everything
//
@@ -1892,7 +1892,7 @@ double AudioIO::NormalizeStreamTime(double absoluteTime) const
if (absoluteTime > mT1)
absoluteTime = mT1;
-
+
if (mCutPreviewGapLen > 0)
{
// msmeyer: We're in cut preview mode, so if we are on the right
@@ -1933,7 +1933,7 @@ wxArrayLong AudioIO::GetSupportedPlaybackRates(int devIndex, double rate)
int i;
devInfo = Pa_GetDeviceInfo(devIndex);
-
+
if (!devInfo)
{
wxLogDebug(wxT("GetSupportedPlaybackRates() Could not get device info!"));
@@ -1952,7 +1952,7 @@ wxArrayLong AudioIO::GetSupportedPlaybackRates(int devIndex, double rate)
pars.sampleFormat = paFloat32;
pars.suggestedLatency = devInfo->defaultHighOutputLatency;
pars.hostApiSpecificStreamInfo = NULL;
-
+
for (i = 0; i < NumRatesToTry; i++)
{
// LLL: Remove when a proper method of determining actual supported
@@ -2018,7 +2018,7 @@ wxArrayLong AudioIO::GetSupportedCaptureRates(int devIndex, double rate)
pars.sampleFormat = paFloat32;
pars.suggestedLatency = latencyDuration / 1000.0;
pars.hostApiSpecificStreamInfo = NULL;
-
+
for (i = 0; i < NumRatesToTry; i++)
{
// LLL: Remove when a proper method of determining actual supported
@@ -2051,7 +2051,7 @@ wxArrayLong AudioIO::GetSupportedSampleRates(int playDevice, int recDevice, doub
}
// Check if we can use the cached rates
- if (mCachedPlaybackIndex != -1 && mCachedCaptureIndex != -1 &&
+ if (mCachedPlaybackIndex != -1 && mCachedCaptureIndex != -1 &&
playDevice == mCachedPlaybackIndex &&
recDevice == mCachedCaptureIndex &&
(rate == 0.0 || mCachedSampleRates.Index(rate) != wxNOT_FOUND))
@@ -2080,7 +2080,7 @@ wxArrayLong AudioIO::GetSupportedSampleRates(int playDevice, int recDevice, doub
return result;
}
-/** \todo: should this take into account PortAudio's value for
+/** \todo: should this take into account PortAudio's value for
* PaDeviceInfo::defaultSampleRate? In principal this should let us work out
* which rates are "real" and which resampled in the drivers, and so prefer
* the real rates. */
@@ -2126,14 +2126,14 @@ double AudioIO::GetBestRate(bool capturing, bool playing, double sampleRate)
else if (playing && !capturing) {
rates = GetSupportedPlaybackRates(-1, sampleRate);
}
- else { // we assume capturing and playing - the alternative would be a
+ else { // we assume capturing and playing - the alternative would be a
// bit odd
rates = GetSupportedSampleRates(-1, -1, sampleRate);
}
/* rem rates is the array of hardware-supported sample rates (in the current
* configuration), sampleRate is the Project Rate (desired sample rate) */
long rate = (long)sampleRate;
-
+
if (rates.Index(rate) != wxNOT_FOUND) {
wxLogDebug(wxT("GetBestRate() Returning %.0ld Hz"), rate);
retval = rate;
@@ -2177,7 +2177,7 @@ finished:
mCachedBestRateIn = sampleRate;
mCachedBestRateOut = retval;
return retval;
-}
+}
//////////////////////////////////////////////////////////////////////
@@ -2239,25 +2239,25 @@ MidiThread::ExitCode MidiThread::Entry()
gAudioIO->FillMidiBuffers();
// test for end
- double realTime = gAudioIO->mT0 + gAudioIO->MidiTime() * 0.001 -
+ double realTime = gAudioIO->mT0 + gAudioIO->MidiTime() * 0.001 -
gAudioIO->PauseTime();
if (gAudioIO->mNumPlaybackChannels != 0) {
realTime -= 1; // with audio, MidiTime() runs ahead 1s
}
- // The TrackPanel::OnTimer() method updates the time position
- // indicator every 200ms, so it tends to not advance the
+ // The TrackPanel::OnTimer() method updates the time position
+ // indicator every 200ms, so it tends to not advance the
// indicator to the end of the selection (mT1) but instead stop
// up to 200ms before the end. At this point, output is shut
// down and the indicator is removed, but for a brief time, the
// indicator is clearly stopped before reaching mT1. To avoid
// this, we do not set mMidiOutputComplete until we are actually
// 0.22s beyond mT1 (even though we stop playing at mT1. This
- // gives OnTimer() time to wake up and draw the final time
+ // gives OnTimer() time to wake up and draw the final time
// position at mT1 before shutting down the stream.
- double timeAtSpeed = (realTime - gAudioIO->mT0) *
+ double timeAtSpeed = (realTime - gAudioIO->mT0) *
gAudioIO->mMidiPlaySpeed + gAudioIO->mT0;
- gAudioIO->mMidiOutputComplete =
+ gAudioIO->mMidiOutputComplete =
(!gAudioIO->mPlayLooped && timeAtSpeed >= gAudioIO->mT1 + 0.220);
// !gAudioIO->mNextEvent);
}
@@ -2453,7 +2453,7 @@ wxString AudioIO::GetDeviceInfo()
}
const PaDeviceInfo* info;
-
+
for (j = 0; j < cnt; j++) {
s << wxT("==============================") << e;
@@ -2510,7 +2510,7 @@ wxString AudioIO::GetDeviceInfo()
s << wxT("Selected playback device: ") << playDeviceNum << wxT(" - ") << playDevice << e;
}else{
s << wxT("No playback device found.") << e;
- }
+ }
wxArrayLong supportedSampleRates;
@@ -2538,7 +2538,7 @@ wxString AudioIO::GetDeviceInfo()
int error;
PaStream *stream;
-
+
PaStreamParameters playbackParameters;
playbackParameters.device = playDeviceNum;
@@ -2550,11 +2550,11 @@ wxString AudioIO::GetDeviceInfo()
Pa_GetDeviceInfo(playDeviceNum)->defaultLowOutputLatency;
}
else{
- playbackParameters.suggestedLatency = DEFAULT_LATENCY_CORRECTION/1000.0;
+ playbackParameters.suggestedLatency = DEFAULT_LATENCY_CORRECTION/1000.0;
}
PaStreamParameters captureParameters;
-
+
captureParameters.device = recDeviceNum;
captureParameters.sampleFormat = paFloat32;;
captureParameters.hostApiSpecificStreamInfo = NULL;
@@ -2563,7 +2563,7 @@ wxString AudioIO::GetDeviceInfo()
captureParameters.suggestedLatency =
Pa_GetDeviceInfo(recDeviceNum)->defaultLowInputLatency;
}else{
- captureParameters.suggestedLatency = DEFAULT_LATENCY_CORRECTION/1000.0;
+ captureParameters.suggestedLatency = DEFAULT_LATENCY_CORRECTION/1000.0;
}
error = Pa_OpenStream(&stream,
@@ -2643,13 +2643,13 @@ wxString AudioIO::GetDeviceInfo()
Px_GetInputVolume(PortMixer) > 0.3)
EmulateMixerInputVol = true;
Px_SetInputVolume(PortMixer, MixerInputVol);
-
+
Pa_CloseStream(stream);
-
+
s << wxT("==============================") << e;
s << wxT("Capture volume is ") << (EmulateMixerInputVol? wxT("emulated"): wxT("native")) << e;
s << wxT("Playback volume is ") << (EmulateMixerOutputVol? wxT("emulated"): wxT("native")) << e;
-
+
Px_CloseMixer(PortMixer);
} //end of massive if statement if a valid sample rate has been found
@@ -2714,7 +2714,7 @@ void AudioIO::FillBuffers()
{
mWarpedTime += deltat;
}
-
+
secsAvail -= deltat;
for( i = 0; i < mPlaybackTracks.GetCount(); i++ )
@@ -2741,7 +2741,7 @@ void AudioIO::FillBuffers()
if(mLastSilentBufSize < lrint(deltat * mRate))
{
//delete old if necessary
- if(mSilentBuf)
+ if(mSilentBuf)
DeleteSamples(mSilentBuf);
mLastSilentBufSize=lrint(deltat * mRate);
mSilentBuf = NewSamples(mLastSilentBufSize, floatSample);
@@ -2780,7 +2780,7 @@ void AudioIO::FillBuffers()
// The WaveTracks have their own buffering for efficiency.
XMLStringWriter blockFileLog;
int numChannels = mCaptureTracks.GetCount();
-
+
for( i = 0; (int)i < numChannels; i++ )
{
int avail = commonlyAvail;
@@ -2792,7 +2792,7 @@ void AudioIO::FillBuffers()
{
samplePtr temp = NewSamples(avail, trackFormat);
mCaptureBuffers[i]->Get (temp, trackFormat, avail);
- mCaptureTracks[i]-> Append(temp, trackFormat, avail, 1,
+ mCaptureTracks[i]-> Append(temp, trackFormat, avail, 1,
&appendLog);
DeleteSamples(temp);
}
@@ -2808,7 +2808,7 @@ void AudioIO::FillBuffers()
*/
size = mResample[i]->Process(mFactor, (float *)temp1, avail, !IsStreamActive(),
&size, (float *)temp2, size);
- mCaptureTracks[i]-> Append(temp2, floatSample, size, 1,
+ mCaptureTracks[i]-> Append(temp2, floatSample, size, 1,
&appendLog);
DeleteSamples(temp1);
DeleteSamples(temp2);
@@ -2823,7 +2823,7 @@ void AudioIO::FillBuffers()
blockFileLog.EndTag(wxT("recordingrecovery"));
}
}
-
+
if (mListener && !blockFileLog.IsEmpty())
mListener->OnAudioIONewBlockFiles(blockFileLog);
}
@@ -2851,7 +2851,7 @@ void AudioIO::OutputEvent()
int data2 = -1;
// 0.0005 is for rounding
double eventTime = (mNextEventTime - mT0) / mMidiPlaySpeed + mT0;
- double time = eventTime + PauseTime() + 0.0005 -
+ double time = eventTime + PauseTime() + 0.0005 -
((mMidiLatency + mSynthLatency) * 0.001);
if (mNumPlaybackChannels > 0) { // is there audio playback?
@@ -2859,7 +2859,7 @@ void AudioIO::OutputEvent()
} else {
time -= mT0; // Midi is not synced to audio
}
- // state changes have to go out without delay because the
+ // state changes have to go out without delay because the
// midi stream time gets reset when playback starts, and
// we don't want to leave any control changes scheduled for later
if (time < 0 || mSendMidiState) time = 0;
@@ -2882,25 +2882,25 @@ void AudioIO::OutputEvent()
// if mNextEvent's channel is visible, play it, visibility can
// be updated while playing. Be careful: if we have a note-off,
// then we must not pay attention to the channel selection
- // or mute/solo buttons because we must turn the note off
+ // or mute/solo buttons because we must turn the note off
// even if the user changed something after the note began
// Note that because multiple tracks can output to the same
// MIDI channels, it is not a good idea to send "All Notes Off"
// when the user presses the mute button. We have no easy way
// to know what notes are sounding on any given muted track, so
// we'll just wait for the note-off events to happen.
- // Also note that note-offs are only sent when we call
+ // Also note that note-offs are only sent when we call
// mIterator->request_note_off(), so notes that are not played
// will note generate random note-offs. There is the interesting
// case that if the playback is paused, all-notes-off WILL be sent
// and if playback resumes, the pending note-off events WILL also
// be sent (but if that is a problem, there would also be a problem
// in the non-pause case.
- if (((mNextEventTrack->GetVisibleChannels() & (1 << channel)) &&
+ if (((mNextEventTrack->GetVisibleChannels() & (1 << channel)) &&
// only play if note is not muted:
- !((mHasSolo || mNextEventTrack->GetMute()) &&
+ !((mHasSolo || mNextEventTrack->GetMute()) &&
!mNextEventTrack->GetSolo())) ||
- (mNextEvent->is_note() && !mNextIsNoteOn)) {
+ (mNextEvent->is_note() && !mNextIsNoteOn)) {
// Note event
if (mNextEvent->is_note() && !mSendMidiState) {
// Pitch and velocity
@@ -2921,7 +2921,7 @@ void AudioIO::OutputEvent()
// by comparing attribute pointers instead of string compares
Alg_update_ptr update = (Alg_update_ptr) mNextEvent;
const char *name = update->get_attribute();
-
+
if (!strcmp(name, "programi")) {
// Instrument change
data1 = update->parameter.i;
@@ -2962,12 +2962,12 @@ void AudioIO::OutputEvent()
}
}
if (command != -1) {
- Pm_WriteShort(mMidiStream, timestamp,
- Pm_Message((int) (command + channel),
+ Pm_WriteShort(mMidiStream, timestamp,
+ Pm_Message((int) (command + channel),
(long) data1, (long) data2));
- /* printf("Pm_WriteShort %lx (%p) @ %d, advance %d\n",
- Pm_Message((int) (command + channel),
- (long) data1, (long) data2),
+ /* printf("Pm_WriteShort %lx (%p) @ %d, advance %d\n",
+ Pm_Message((int) (command + channel),
+ (long) data1, (long) data2),
mNextEvent, timestamp, timestamp - Pt_Time()); */
}
}
@@ -2986,7 +2986,7 @@ void AudioIO::GetNextEvent()
(void **) &mNextEventTrack,
&nextOffset, mT1 + mMidiLoopOffset);
if (mNextEvent) {
- mNextEventTime = (mNextIsNoteOn ? mNextEvent->time :
+ mNextEventTime = (mNextIsNoteOn ? mNextEvent->time :
mNextEvent->get_end_time()) + nextOffset;;
} else { // terminate playback at mT1
mNextEvent = &gAllNotesOff;
@@ -3048,14 +3048,14 @@ void AudioIO::FillMidiBuffers()
// atomically now that we have the final value:
mTime = trackTime;
}
- // advance time so that midi messages are written a little early,
+ // advance time so that midi messages are written a little early,
// timestamps will insure accurate output timing. This is an "extra"
// MIDI_SLEEP interval; another is added below to compensate for the
// fact that we need to output messages that will become due while
// we are sleeping.
time += MIDI_SLEEP * 0.001;
}
- while (mNextEvent &&
+ while (mNextEvent &&
(mNextEventTime - mT0) / mMidiPlaySpeed + mT0 < time +
((MIDI_SLEEP + mSynthLatency) * 0.001)) {
OutputEvent();
@@ -3066,7 +3066,7 @@ void AudioIO::FillMidiBuffers()
double AudioIO::PauseTime()
{
if (mNumPlaybackChannels > 0) {
- return mNumPauseFrames / mRate;
+ return mNumPauseFrames / mRate;
} else {
return mPauseTime * 0.001;
}
@@ -3080,8 +3080,8 @@ PmTimestamp AudioIO::MidiTime()
// PaUtil_GetTime(), mAudioCallbackOutputTime, PaUtil_GetTime() - mAudioCallbackOutputTime);
// note: the extra 0.0005 is for rounding. Round down by casting to
// unsigned long, then convert to PmTimeStamp (currently signed)
- return (PmTimestamp) ((unsigned long) (1000 * (AudioTime() + 1.0005 -
- mAudioFramesPerBuffer / mRate +
+ return (PmTimestamp) ((unsigned long) (1000 * (AudioTime() + 1.0005 -
+ mAudioFramesPerBuffer / mRate +
PaUtil_GetTime() - mAudioCallbackOutputTime)));
} else {
return Pt_Time();
@@ -3106,7 +3106,7 @@ void AudioIO::AILAInitialize() {
gPrefs->Read(wxT("/AudioIO/AnalysisTime"), &mAILAAnalysisTime, AILA_DEF_ANALYSIS_TIME);
gPrefs->Read(wxT("/AudioIO/NumberAnalysis"), &mAILATotalAnalysis, AILA_DEF_NUMBER_ANALYSIS);
mAILAGoalDelta /= 100.0;
- mAILAGoalPoint /= 100.0;
+ mAILAGoalPoint /= 100.0;
mAILAAnalysisTime /= 1000.0;
mAILAMax = 0.0;
mAILALastStartTime = max(0.0, mT0);
@@ -3142,9 +3142,9 @@ void AudioIO::AILAProcess(double maxPeak) {
mAILAClipped = true;
printf("clipped");
}
-
+
mAILAMax = max(mAILAMax, maxPeak);
-
+
if ((mAILATotalAnalysis == 0 || mAILAAnalysisCounter < mAILATotalAnalysis) && mTime - mAILALastStartTime >= mAILAAnalysisTime) {
putchar('\n');
mAILAMax = mInputMeter->ToLinearIfDB(mAILAMax);
@@ -3184,7 +3184,7 @@ void AudioIO::AILAProcess(double maxPeak) {
}
else if ( mAILAMax < mAILAGoalPoint - mAILAGoalDelta ) {
//if too low
- printf("too low:\n");
+ printf("too low:\n");
if (iv >= UPPER_BOUND || iv + 0.005 > mAILATopLevel) { //condition for too low volumes and/or variable volumes that cause mAILATopLevel to decrease too much
//we can't improve it more
if (mAILATotalAnalysis != 0) {
@@ -3219,9 +3219,9 @@ void AudioIO::AILAProcess(double maxPeak) {
mAILAAnalysisEndTime = Pa_GetStreamTime(mPortStreamV19) - mAILAAbsolutStartTime;
mAILAMax = 0;
printf("\tA decision was made @ %f\n", mAILAAnalysisEndTime);
- mAILAClipped = false;
+ mAILAClipped = false;
mAILALastStartTime = mTime;
-
+
if (changetype == 0)
mAILAChangeFactor *= 0.8; //time factor
else if (mAILALastChangeType == changetype)
@@ -3383,12 +3383,12 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
//
// Mix and copy to PortAudio's output buffer
//
-
+
if( outputBuffer && (numPlaybackChannels > 0) )
{
bool cut = false;
bool linkFlag = false;
-
+
float *outputFloats = (float *)outputBuffer;
for( i = 0; i < framesPerBuffer*numPlaybackChannels; i++)
outputFloats[i] = 0.0;
@@ -3422,7 +3422,7 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
else if (gAudioIO->mTime > gAudioIO->mT1)
gAudioIO->mTime = gAudioIO->mT1;
gAudioIO->mSeek = 0.0;
-
+
// Reset mixer positions and flush buffers for all tracks
if(gAudioIO->mTimeTrack)
gAudioIO->mWarpedTime = gAudioIO->mTimeTrack->ComputeWarpedLength(gAudioIO->mT0, gAudioIO->mTime);
@@ -3443,7 +3443,7 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
// Reenable the audio thread
gAudioIO->mAudioThreadFillBuffersLoopRunning = true;
-
+
return paContinue;
}
@@ -3456,27 +3456,27 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
for( t = 0; t < numMidiPlaybackTracks; t++ )
if( gAudioIO->mMidiPlaybackTracks[t]->GetSolo() )
numSolo++;
-#endif
+#endif
for( t = 0; t < numPlaybackTracks; t++)
{
WaveTrack *vt = gAudioIO->mPlaybackTracks[t];
-
+
if (linkFlag)
linkFlag = false;
else {
cut = false;
-
+
// Cut if somebody else is soloing
if (numSolo>0 && !vt->GetSolo())
cut = true;
-
+
// Cut if we're muted (unless we're soloing)
if (vt->GetMute() && !vt->GetSolo())
cut = true;
-
+
linkFlag = vt->GetLinked();
}
-
+
#define ORIGINAL_DO_NOT_PLAY_ALL_MUTED_TRACKS_TO_END
#ifdef ORIGINAL_DO_NOT_PLAY_ALL_MUTED_TRACKS_TO_END
// this is original code prior to r10680 -RBD
@@ -3503,9 +3503,9 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
unsigned int len;
if (cut)
{
- len = (unsigned int)
+ len = (unsigned int)
gAudioIO->mPlaybackBuffers[t]->Discard(framesPerBuffer);
- } else
+ } else
{
len = (unsigned int)
gAudioIO->mPlaybackBuffers[t]->Get((samplePtr)tempFloats,
@@ -3538,19 +3538,19 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
for (i = 0; i < len; ++i)
outputMeterFloats[numPlaybackChannels*i] +=
gain*tempFloats[i];
-
+
if (gAudioIO->mEmulateMixerOutputVol)
gain *= gAudioIO->mMixerOutputVol;
-
+
for(i=0; iGetChannel() == Track::RightChannel ||
vt->GetChannel() == Track::MonoChannel)
{
float gain = vt->GetChannelGain(1);
-
+
// Output volume emulation (as above)
if (outputMeterFloats != outputFloats)
for (i = 0; i < len; ++i)
@@ -3559,12 +3559,12 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
if (gAudioIO->mEmulateMixerOutputVol)
gain *= gAudioIO->mMixerOutputVol;
-
+
for(i=0; i 0) )
{
unsigned int len = framesPerBuffer;
@@ -3604,7 +3604,7 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
if (avail < len)
len = avail;
}
-
+
if (len < framesPerBuffer)
{
gAudioIO->mLostSamples += (framesPerBuffer - len);
@@ -3613,7 +3613,7 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
if (len > 0) {
for( t = 0; t < numCaptureChannels; t++) {
-
+
// dmazzoni:
// Un-interleave. Ugly special-case code required because the
// capture channels could be in three different sample formats;
@@ -3647,7 +3647,7 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
}
} break;
} // switch
-
+
gAudioIO->mCaptureBuffers[t]->Put((samplePtr)tempBuffer,
gAudioIO->mCaptureFormat,
len);
@@ -3684,15 +3684,15 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
// 08/27/2006: too inconsistent for now...just leave it a zero.
//
// 04/16/2008: Looks like si->inputLatency comes back with something useful though.
- // This rearranged logic uses si->inputLatency, but if PortAudio fixes inputBufferAdcTime,
- // this code won't have to be modified to use it.
+ // This rearranged logic uses si->inputLatency, but if PortAudio fixes inputBufferAdcTime,
+ // this code won't have to be modified to use it.
// Also avoids setting mLastRecordingOffset except when simultaneously playing and recording.
//
if (numCaptureChannels > 0 && numPlaybackChannels > 0) // simultaneously playing and recording
{
if (timeInfo->inputBufferAdcTime > 0)
gAudioIO->mLastRecordingOffset = timeInfo->inputBufferAdcTime - timeInfo->outputBufferDacTime;
- else if (gAudioIO->mLastRecordingOffset == 0.0)
+ else if (gAudioIO->mLastRecordingOffset == 0.0)
{
const PaStreamInfo* si = Pa_GetStreamInfo( gAudioIO->mPortStreamV19 );
gAudioIO->mLastRecordingOffset = -si->inputLatency;
@@ -3703,12 +3703,12 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
else {
// No tracks to play, but we should clear the output, and
// possibly do software playthrough...
-
+
if( outputBuffer && (numPlaybackChannels > 0) ) {
float *outputFloats = (float *)outputBuffer;
for( i = 0; i < framesPerBuffer*numPlaybackChannels; i++)
outputFloats[i] = 0.0;
-
+
if (inputBuffer && gAudioIO->mSoftwarePlaythrough) {
DoSoftwarePlaythrough(inputBuffer, gAudioIO->mCaptureFormat,
numCaptureChannels,
@@ -3725,15 +3725,15 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
}
/* Send data to playback VU meter if applicable */
- if (gAudioIO->mOutputMeter &&
+ if (gAudioIO->mOutputMeter &&
!gAudioIO->mOutputMeter->IsMeterDisabled() &&
outputMeterFloats) {
- // Get here if playback meter is live
+ // Get here if playback meter is live
/* It's critical that we don't update the meters while StopStream is
* trying to stop PortAudio, otherwise it can lead to a freeze. We use
* two variables to synchronize:
* mUpdatingMeters tells StopStream when the callback is about to enter
- * the code where it might update the meters, and
+ * the code where it might update the meters, and
* mUpdateMeters is how the rest of the code tells the callback when it
* is allowed to actually do the updating.
* Note that mUpdatingMeters must be set first to avoid a race condition.
@@ -3744,15 +3744,15 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
framesPerBuffer,
outputMeterFloats);
- //v Vaughan, 2011-02-25: Moved this update back to TrackPanel::OnTimer()
+ //v Vaughan, 2011-02-25: Moved this update back to TrackPanel::OnTimer()
// as it helps with playback issues reported by Bill and noted on Bug 258.
- // The problem there occurs if Software Playthrough is on.
- // Could conditionally do the update here if Software Playthrough is off,
- // and in TrackPanel::OnTimer() if Software Playthrough is on, but not now.
+ // The problem there occurs if Software Playthrough is on.
+ // Could conditionally do the update here if Software Playthrough is off,
+ // and in TrackPanel::OnTimer() if Software Playthrough is on, but not now.
//AudacityProject* pProj = GetActiveProject();
//MixerBoard* pMixerBoard = pProj->GetMixerBoard();
//if (pMixerBoard)
- // pMixerBoard->UpdateMeters(gAudioIO->GetStreamTime(),
+ // pMixerBoard->UpdateMeters(gAudioIO->GetStreamTime(),
// (pProj->mLastPlayMode == loopedPlay));
}
gAudioIO->mUpdatingMeters = false;
diff --git a/src/AudioIO.h b/src/AudioIO.h
index 8c2d8bb07..bfb73ac8e 100644
--- a/src/AudioIO.h
+++ b/src/AudioIO.h
@@ -57,7 +57,7 @@ class AUDACITY_DLL_API AudioIOListener {
public:
AudioIOListener() {}
virtual ~AudioIOListener() {}
-
+
virtual void OnAudioIORate(int rate) = 0;
virtual void OnAudioIOStartRecording() = 0;
virtual void OnAudioIOStopRecording() = 0;
@@ -87,11 +87,11 @@ class AUDACITY_DLL_API AudioIO {
AudioIOListener* GetListener() { return mListener; }
void SetListener(AudioIOListener* listener);
-
+
/** \brief Start up Portaudio for capture and recording as needed for
* input monitoring and software playthrough only
*
- * This uses the Default project sample format, current sample rate, and
+ * This uses the Default project sample format, current sample rate, and
* selected number of input channels to open the recording device and start
* reading input data. If software playthrough is enabled, it also opens
* the output device in stereo to play the data through */
@@ -124,7 +124,7 @@ class AUDACITY_DLL_API AudioIO {
/** \brief Move the playback / recording position of the current stream
* by the specified amount from where it is now */
void SeekStream(double seconds) { mSeek = seconds; };
-
+
/** \brief Returns true if audio i/o is busy starting, stopping, playing,
* or recording.
*
@@ -142,7 +142,7 @@ class AUDACITY_DLL_API AudioIO {
#ifdef EXPERIMENTAL_MIDI_OUT
/** \brief Compute the current PortMidi timestamp time.
- *
+ *
* This is used by PortMidi to synchronize midi time to audio samples
*/
PmTimestamp MidiTime();
@@ -152,14 +152,14 @@ class AUDACITY_DLL_API AudioIO {
// We do the same for Midi, but it seems wasteful for at least two
// threads to be frequently polling to update status. This could be
// eliminated (also with a reduction in code I think) by updating mHasSolo
- // each time a solo button is activated or deactivated. For now, I'm
+ // each time a solo button is activated or deactivated. For now, I'm
// going to do this polling in the FillMidiBuffer routine to localize
// changes for midi to the midi code, but I'm declaring the variable
// here so possibly in the future, Audio code can use it too. -RBD
private:
bool mHasSolo; // is any playback solo button pressed?
public:
- bool SetHasSolo(bool hasSolo);
+ bool SetHasSolo(bool hasSolo);
bool GetHasSolo() { return mHasSolo; }
void SetMidiPlaySpeed(double s) { mMidiPlaySpeed = s * 0.01; }
#endif
@@ -171,7 +171,7 @@ class AUDACITY_DLL_API AudioIO {
* recorded, and it's safe to flush to disk. */
bool IsAudioTokenActive(int token);
- /** \brief Returns true if we're monitoring input (but not recording or
+ /** \brief Returns true if we're monitoring input (but not recording or
* playing actual audio) */
bool IsMonitoring();
@@ -183,7 +183,7 @@ class AUDACITY_DLL_API AudioIO {
/* Mixer services are always available. If no stream is running, these
* methods use whatever device is specified by the preferences. If a
* stream *is* running, naturally they manipulate the mixer associated
- * with that stream. If no mixer is available, output is emulated and
+ * with that stream. If no mixer is available, output is emulated and
* input is stuck at 1.0f (a gain is applied to output samples).
*/
void SetMixer(int inputSource);
@@ -209,11 +209,11 @@ class AUDACITY_DLL_API AudioIO {
/** \brief Get the list of inputs to the current mixer device
*
- * Returns an array of strings giving the names of the inputs to the
+ * Returns an array of strings giving the names of the inputs to the
* soundcard mixer (driven by PortMixer) */
wxArrayString GetInputSourceNames();
- /** \brief update state after changing what audio devices are selected
+ /** \brief update state after changing what audio devices are selected
*
* Called when the devices stored in the preferences are changed to update
* the audio mixer capabilities
@@ -223,10 +223,10 @@ class AUDACITY_DLL_API AudioIO {
* GetSupported*Rate functions considerably */
void HandleDeviceChange();
- /** \brief Set the current VU meters - this should be done once after
+ /** \brief Set the current VU meters - this should be done once after
* each call to StartStream currently */
void SetMeters(Meter *inputMeter, Meter *outputMeter);
-
+
/** \brief Get a list of sample rates the output (playback) device
* supports.
*
@@ -380,7 +380,7 @@ private:
/** \brief Get the number of audio samples ready in all of the recording
* buffers.
*
- * Returns the smallest of the number of samples available for storage in
+ * Returns the smallest of the number of samples available for storage in
* the recording buffers (i.e. the number of samples that can be read from
* all record buffers without underflow). */
int GetCommonlyAvailCapture();
@@ -539,7 +539,7 @@ private:
bool mEmulateMixerOutputVol;
/** @brief Can we control the hardware input level?
*
- * This flag is set to true if using portmixer to control the
+ * This flag is set to true if using portmixer to control the
* input volume seems to be working (and so we offer the user the control),
* and to false (locking the control out) otherwise. This avoids stupid
* scaled clipping problems when trying to do software emulated input volume
@@ -550,10 +550,10 @@ private:
bool mPlayLooped;
double mCutPreviewGapStart;
double mCutPreviewGapLen;
-
+
samplePtr mSilentBuf;
sampleCount mLastSilentBufSize;
-
+
AudioIOListener* mListener;
friend class AudioThread;
diff --git a/src/AutoRecovery.cpp b/src/AutoRecovery.cpp
index 2d97ee6c7..727097d0f 100644
--- a/src/AutoRecovery.cpp
+++ b/src/AutoRecovery.cpp
@@ -9,7 +9,7 @@
*******************************************************************//**
\class AutoRecoveryDialog
-\brief The AutoRecoveryDialog prompts the user whether to
+\brief The AutoRecoveryDialog prompts the user whether to
recover previous Audacity projects that were closed incorrectly.
*//********************************************************************/
@@ -41,7 +41,7 @@ public:
private:
void PopulateList();
void PopulateOrExchange(ShuttleGui & S);
-
+
void OnQuitAudacity(wxCommandEvent &evt);
void OnRecoverNone(wxCommandEvent &evt);
void OnRecoverAll(wxCommandEvent &evt);
@@ -75,7 +75,7 @@ void AutoRecoveryDialog::PopulateOrExchange(ShuttleGui& S)
S.AddVariableText(_("Some projects were not saved properly the last time Audacity was run.\nFortunately, the following projects can automatically be recovered:"), false);
S.StartStatic(_("Recoverable projects"));
- {
+ {
mFileList = S.Id(ID_FILE_LIST).AddListControlReportMode();
/*i18n-hint: (noun). It's the name of the project to recover.*/
mFileList->InsertColumn(0, _("Name"));
@@ -105,17 +105,17 @@ void AutoRecoveryDialog::PopulateOrExchange(ShuttleGui& S)
void AutoRecoveryDialog::PopulateList()
{
mFileList->DeleteAllItems();
-
+
wxDir dir(FileNames::AutoSaveDir());
if (!dir.IsOpened())
return;
-
+
wxString filename;
int i = 0;
for (bool c = dir.GetFirst(&filename, wxT("*.autosave"), wxDIR_FILES);
c; c = dir.GetNext(&filename))
mFileList->InsertItem(i++, wxFileName(filename).GetName());
-
+
mFileList->SetColumnWidth(0, wxLIST_AUTOSIZE);
}
@@ -150,10 +150,10 @@ static bool HaveFilesToRecover()
_("Error"), wxICON_STOP);
return false;
}
-
+
wxString filename;
bool c = dir.GetFirst(&filename, wxT("*.autosave"), wxDIR_FILES);
-
+
return c;
}
@@ -174,7 +174,7 @@ static bool RemoveAllAutoSaveFiles()
return false;
}
}
-
+
return true;
}
@@ -187,11 +187,11 @@ static bool RecoverAllProjects(AudacityProject** pproj)
_("Error"), wxICON_STOP);
return false;
}
-
+
// Open a project window for each auto save file
wxString filename;
AudacityProject* proj = NULL;
-
+
wxArrayString files;
wxDir::GetAllFiles(FileNames::AutoSaveDir(), &files,
wxT("*.autosave"), wxDIR_FILES);
@@ -214,7 +214,7 @@ static bool RecoverAllProjects(AudacityProject** pproj)
// is created.
proj->OpenFile(files[i], false);
}
-
+
return true;
}
@@ -227,12 +227,12 @@ bool ShowAutoRecoveryDialogIfNeeded(AudacityProject** pproj,
{
AutoRecoveryDialog dlg(*pproj);
int ret = dlg.ShowModal();
-
+
switch (ret)
{
case ID_RECOVER_NONE:
return RemoveAllAutoSaveFiles();
-
+
case ID_RECOVER_ALL:
if (didRecoverAnything)
*didRecoverAnything = true;
@@ -284,7 +284,7 @@ bool RecordingRecoveryHandler::HandleXMLTag(const wxChar *tag,
WaveTrack* track = tracks.Item(index);
WaveClip* clip = track->GetLastOrCreateClip();
Sequence* seq = clip->GetSequence();
-
+
// Load the blockfile from the XML
BlockFile* blockFile = NULL;
DirManager* dirManager = mProject->GetDirManager();
@@ -312,7 +312,7 @@ bool RecordingRecoveryHandler::HandleXMLTag(const wxChar *tag,
if (!value)
break;
-
+
const wxString strValue = value;
//this channels value does not correspond to WaveTrack::Left/Right/Mono, but which channel of the recording device
//it came from, and thus we can't use XMLValueChecker::IsValidChannel on it. Rather we compare to the next attribute value.
@@ -324,17 +324,17 @@ bool RecordingRecoveryHandler::HandleXMLTag(const wxChar *tag,
}
else if (wxStrcmp(attr, wxT("numchannels")) == 0)
{
- if (!XMLValueChecker::IsGoodInt(strValue) || !strValue.ToLong(&nValue) ||
+ if (!XMLValueChecker::IsGoodInt(strValue) || !strValue.ToLong(&nValue) ||
(nValue < 1))
return false;
if(mChannel >= nValue )
- return false;
+ return false;
mNumChannels = nValue;
}
-
+
}
}
-
+
return true;
}
@@ -342,6 +342,6 @@ XMLTagHandler* RecordingRecoveryHandler::HandleXMLChild(const wxChar *tag)
{
if (wxStrcmp(tag, wxT("simpleblockfile")) == 0)
return this; // HandleXMLTag also handles
-
+
return NULL;
}
diff --git a/src/AutoRecovery.h b/src/AutoRecovery.h
index deac73861..ffed7cfac 100644
--- a/src/AutoRecovery.h
+++ b/src/AutoRecovery.h
@@ -26,9 +26,9 @@
// Returns: True, if the start of Audacity should continue as normal
// False if Audacity should be quit immediately
//
-// The didRecoverAnything param is strictly for a return value.
+// The didRecoverAnything param is strictly for a return value.
// Any value passed in is ignored.
-//
+//
bool ShowAutoRecoveryDialogIfNeeded(AudacityProject** pproj,
bool *didRecoverAnything);
@@ -41,7 +41,7 @@ public:
RecordingRecoveryHandler(AudacityProject* proj);
virtual bool HandleXMLTag(const wxChar *tag, const wxChar **attrs);
virtual XMLTagHandler *HandleXMLChild(const wxChar *tag);
-
+
// This class only knows reading tags
virtual void WriteXML(XMLWriter & WXUNUSED(xmlFile)) { wxASSERT(false); }
diff --git a/src/BatchCommandDialog.cpp b/src/BatchCommandDialog.cpp
index 50b59461a..d88cb9a5d 100644
--- a/src/BatchCommandDialog.cpp
+++ b/src/BatchCommandDialog.cpp
@@ -12,7 +12,7 @@
\class BatchCommandDialog
\brief Provides a list of configurable commands for use with BatchCommands
-Provides a list of commands, mostly effects, which can be chained
+Provides a list of commands, mostly effects, which can be chained
together in a simple linear sequence. Can configure parameters on each
selected command.
diff --git a/src/BatchCommands.cpp b/src/BatchCommands.cpp
index 3bdfb7b5a..85450a82d 100644
--- a/src/BatchCommands.cpp
+++ b/src/BatchCommands.cpp
@@ -48,7 +48,7 @@ See also BatchCommandDialog and BatchProcessDialog.
// - Specials (which we deal with specially here)
enum eCommandType { CtEffect, CtMenu, CtSpecial };
-// TIDY-ME: Not currently translated,
+// TIDY-ME: Not currently translated,
// but there are issues to address if we do.
// CLEANSPEECH remnant
static wxString SpecialCommands[] = {
@@ -134,7 +134,7 @@ bool BatchCommands::ReadChain(const wxString & chain)
// Parse and clean
wxString cmd = tf[i].Left(splitAt).Strip(wxString::both);
wxString parm = tf[i].Mid(splitAt + 1).Strip(wxString::trailing);
-
+
// Backward compatibility for old Chain scripts
// Please comment the version of audacity these are introduced in, so
// that old ones can easily be removed once users have had a chance to
@@ -250,7 +250,7 @@ bool BatchCommands::RenameChain(const wxString & oldchain, const wxString & newc
void BatchCommands::SetWavToMp3Chain() // a function per default chain? This is flawed design! MJS
{
ResetChain();
-
+
AddToChain( wxT("Normalize") );
AddToChain( wxT("ExportMP3") );
}
@@ -275,7 +275,7 @@ wxArrayString BatchCommands::GetAllCommands()
commands.Add( SpecialCommands[i] );
}
// end CLEANSPEECH remnant
-
+
int additionalEffects=ADVANCED_EFFECT;
effects = EffectManager::Get().GetEffects(PROCESS_EFFECT | BUILTIN_EFFECT | PLUGIN_EFFECT | additionalEffects);
@@ -419,7 +419,7 @@ bool BatchCommands::WriteMp3File( const wxString Name, int bitrate )
// commands take a selection as their parameter.
//
// If you find yourself adding lots of existing commands from the menus here, STOP
-// and think again.
+// and think again.
// ======= IMPORTANT ========
// CLEANSPEECH remnant
bool BatchCommands::ApplySpecialCommand(int WXUNUSED(iCommand), const wxString command,const wxString params)
@@ -446,7 +446,7 @@ bool BatchCommands::ApplySpecialCommand(int WXUNUSED(iCommand), const wxString c
extension = wxT(".flac");
else extension = wxT(".mp3");
- if (mFileName.IsEmpty()) {
+ if (mFileName.IsEmpty()) {
filename = project->BuildCleanFileName(project->GetFileName(), extension);
}
else {
@@ -508,7 +508,7 @@ bool BatchCommands::ApplySpecialCommand(int WXUNUSED(iCommand), const wxString c
wxMessageBox(_("FLAC support is not included in this build of Audacity"));
return false;
#endif
- }
+ }
wxMessageBox(wxString::Format(_("Command %s not implemented yet"),command.c_str()));
return false;
}
@@ -542,7 +542,7 @@ bool BatchCommands::ApplyEffectCommand( Effect * f, const wxString command, co
AudacityProject *project = GetActiveProject();
//FIXME: for later versions may want to not select-all in batch mode.
- //IF nothing selected, THEN select everything
+ //IF nothing selected, THEN select everything
// (most effects require that you have something selected).
project->SelectAllIfNone();
@@ -562,7 +562,7 @@ bool BatchCommands::ApplyCommand(const wxString command, const wxString params)
return ApplySpecialCommand( i, command, params );
}
// end CLEANSPEECH remnant
-
+
// Test for an effect.
Effect * f = EffectManager::Get().GetEffectByIdentifier( command );
if( f!=NULL )
diff --git a/src/BatchCommands.h b/src/BatchCommands.h
index 3ccd98b19..c88b20899 100644
--- a/src/BatchCommands.h
+++ b/src/BatchCommands.h
@@ -44,7 +44,7 @@ class BatchCommands {
static bool SetCurrentParametersFor( Effect * f, const wxString command, const wxString params);
static wxArrayString GetAllCommands();
- // These commands do depend on the command list.
+ // These commands do depend on the command list.
void ResetChain();
bool ReadChain(const wxString & chain);
diff --git a/src/BatchProcessDialog.cpp b/src/BatchProcessDialog.cpp
index b2071604c..d87805da0 100644
--- a/src/BatchProcessDialog.cpp
+++ b/src/BatchProcessDialog.cpp
@@ -90,7 +90,7 @@ void BatchProcessDialog::PopulateOrExchange(ShuttleGui &S)
{
S.StartVerticalLay(true);
{
- /*i18n-hint: A chain is a sequence of commands that can be applied
+ /*i18n-hint: A chain is a sequence of commands that can be applied
* to one or more audio files.*/
S.StartStatic(_("&Select Chain"), true);
{
@@ -205,7 +205,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
wxString path = gPrefs->Read(wxT("/DefaultOpenPath"), ::wxGetCwd());
wxString prompt = _("Select file(s) for batch processing...");
-
+
FormatList l;
wxString filter;
wxString all;
@@ -387,9 +387,9 @@ BEGIN_EVENT_TABLE(EditChainsDialog, wxDialog)
END_EVENT_TABLE()
enum {
- BlankColumn,
- ItemNumberColumn,
- ActionColumn,
+ BlankColumn,
+ ItemNumberColumn,
+ ActionColumn,
ParamsColumn,
};
@@ -457,12 +457,12 @@ void EditChainsDialog::PopulateOrExchange(ShuttleGui & S)
// JKC: Experimenting with an alternative way to get multiline
// translated strings to work correctly without very long lines.
// My appologies Alexandre if this way didn't work either.
- //
+ //
// With this method:
// 1) it compiles fine under windows unicode and normal mode.
// 2) xgettext source code has handling for the trailing '\'
//
- // It remains to see if linux and mac can cope and if xgettext
+ // It remains to see if linux and mac can cope and if xgettext
// actually does do fine with strings presented like this.
// If it doesn't work out, revert to all-on-one-line.
S.SetStyle(wxSUNKEN_BORDER | wxLC_REPORT | wxLC_HRULES | wxLC_SINGLE_SEL |
@@ -485,7 +485,7 @@ void EditChainsDialog::PopulateOrExchange(ShuttleGui & S)
wxLC_SINGLE_SEL);
mList = S.Id(CommandsListID).AddListControlReportMode();
- //An empty first column is a workaround - under Win98 the first column
+ //An empty first column is a workaround - under Win98 the first column
//can't be right aligned.
mList->InsertColumn(BlankColumn, wxT(""), wxLIST_FORMAT_LEFT);
/* i18n-hint: This is the number of the command in the list */
@@ -663,7 +663,7 @@ void EditChainsDialog::FitColumns()
mList->SetColumnWidth(1, wxLIST_AUTOSIZE_USEHEADER);
mList->SetColumnWidth(2, wxLIST_AUTOSIZE_USEHEADER);
mList->SetColumnWidth(3, wxLIST_AUTOSIZE);
-#endif
+#endif
int bestfit = mList->GetColumnWidth(3);
int clientsize = mList->GetClientSize().GetWidth();
@@ -703,7 +703,7 @@ void EditChainsDialog::OnChainsEndEdit(wxListEvent &event)
PopulateChains();
}
-///
+///
void EditChainsDialog::OnAdd(wxCommandEvent & WXUNUSED(event))
{
while (true) {
diff --git a/src/Benchmark.cpp b/src/Benchmark.cpp
index 71a4745ff..af4d25631 100644
--- a/src/Benchmark.cpp
+++ b/src/Benchmark.cpp
@@ -9,7 +9,7 @@
*******************************************************************//**
\class BenchmarkDialog
-\brief BenchmarkDialog is used for measuring performance and accuracy
+\brief BenchmarkDialog is used for measuring performance and accuracy
of the BlockFile system.
*//*******************************************************************/
@@ -46,9 +46,9 @@ class BenchmarkDialog: public wxDialog
public:
// constructors and destructors
BenchmarkDialog( wxWindow *parent );
-
+
void MakeBenchmarkDialog();
-
+
private:
// WDR: handler declarations
void OnRun( wxCommandEvent &event );
@@ -72,7 +72,7 @@ private:
bool mEditDetail;
wxTextCtrl *mText;
-
+
private:
DECLARE_EVENT_TABLE()
};
@@ -153,7 +153,7 @@ void BenchmarkDialog::MakeBenchmarkDialog()
{
ShuttleGui S(this, eIsCreating);
wxControl *item;
-
+
// Strings don't need to be translated because this class doesn't
// ever get used in a stable release.
@@ -293,7 +293,7 @@ void BenchmarkDialog::FlushPrint()
void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
{
TransferDataFromWindow();
-
+
if (!Validate())
return;
@@ -353,7 +353,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
}
// The chunks are the pieces we move around in the test.
- // They are (and are supposed to be) a different size to
+ // They are (and are supposed to be) a different size to
// the blocks that make the blockfiles. That way we get to
// do some testing of when edit chunks cross blockfile boundaries.
Printf(wxT("Using %d chunks of %d samples each, for a total of ")
@@ -511,7 +511,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
elapsed = timer.Time();
Printf(wxT("Time to check all data (2): %ld ms\n"), elapsed);
-
+
Printf(wxT("At 44100 Hz, 16-bits per sample, the estimated number of\n")
wxT("simultaneous tracks that could be played at once: %.1f\n"),
(nChunks*chunkSize/44100.0)/(elapsed/1000.0));
diff --git a/src/BlockFile.cpp b/src/BlockFile.cpp
index 790d6ebc3..ed94a1a58 100644
--- a/src/BlockFile.cpp
+++ b/src/BlockFile.cpp
@@ -36,8 +36,8 @@ counts.
*//****************************************************************//**
\class SummaryInfo
-\brief Works with BlockFile to hold info about max and min and RMS
-over multiple samples, which in turn allows rapid drawing when zoomed
+\brief Works with BlockFile to hold info about max and min and RMS
+over multiple samples, which in turn allows rapid drawing when zoomed
out.
*//*******************************************************************/
@@ -367,7 +367,7 @@ void BlockFile::FixSummary(void *data)
for(i=0; i mSummaryInfo.frames64K)
len = mSummaryInfo.frames64K - start;
- CopySamples(summary + mSummaryInfo.offset64K +
+ CopySamples(summary + mSummaryInfo.offset64K +
(start * mSummaryInfo.bytesPerFrame),
mSummaryInfo.format,
(samplePtr)buffer, floatSample, len*mSummaryInfo.fields);
@@ -538,9 +538,9 @@ AliasBlockFile::AliasBlockFile(wxFileName baseFileName,
}
AliasBlockFile::AliasBlockFile(wxFileName existingSummaryFileName,
- wxFileName aliasedFileName,
+ wxFileName aliasedFileName,
sampleCount aliasStart,
- sampleCount aliasLen,
+ sampleCount aliasLen,
int aliasChannel,
float min, float max, float rms):
BlockFile(existingSummaryFileName, aliasLen),
@@ -616,7 +616,7 @@ bool AliasBlockFile::ReadSummary(void *data)
mSilentLog=TRUE;
return true;
- }else mSilentLog=FALSE; // worked properly, any future error is new
+ }else mSilentLog=FALSE; // worked properly, any future error is new
if(silence) delete silence;
diff --git a/src/BlockFile.h b/src/BlockFile.h
index f24b57623..b8254cc43 100644
--- a/src/BlockFile.h
+++ b/src/BlockFile.h
@@ -56,7 +56,7 @@ class BlockFile {
sampleCount start, sampleCount len) = 0;
// Other Properties
-
+
// Write cache to disk, if it has any
virtual bool GetNeedWriteCacheToDisk() { return false; }
virtual void WriteCacheToDisk() { /* no cache by default */ }
@@ -96,16 +96,16 @@ class BlockFile {
/// Returns TRUE if this block references another disk file
virtual bool IsAlias() { return false; }
-
+
/// Returns TRUE if this block's complete summary has been computed and is ready (for OD)
virtual bool IsSummaryAvailable(){return true;}
/// Returns TRUE if this block's complete data is ready to be accessed by Read()
virtual bool IsDataAvailable(){return true;}
-
- /// Returns TRUE if the summary has not yet been written, but is actively being computed and written to disk
+
+ /// Returns TRUE if the summary has not yet been written, but is actively being computed and written to disk
virtual bool IsSummaryBeingComputed(){return false;}
-
+
/// Create a new BlockFile identical to this, using the given filename
virtual BlockFile *Copy(wxFileName newFileName) = 0;
@@ -125,7 +125,7 @@ class BlockFile {
///when the project closes, it locks the blockfiles.
///Override this in case it needs special treatment
virtual void CloseLock(){Lock();}
-
+
/// Prevents a read on other threads. The basic blockfile runs on only one thread, so does nothing.
virtual void LockRead(){}
/// Allows reading on other threads.
diff --git a/src/CrossFade.h b/src/CrossFade.h
index 0b45abefe..99adc4a60 100644
--- a/src/CrossFade.h
+++ b/src/CrossFade.h
@@ -5,15 +5,15 @@
CrossFade.h
(c) 2005 The Audacity Team
- Licensed under the GPL version 2.0
+ Licensed under the GPL version 2.0
**********************************************************************/
#ifndef __AUDACITY_CROSSFADE__
#define __AUDACITY_CROSSFADE__
-/// This defines a crossfader class that
+/// This defines a crossfader class that
/// accepts a list of WaveClips and can do a mini-mixing
-/// to produce the desired crossfading
+/// to produce the desired crossfading
#include "SampleFormat.h"
#include "Resample.h"
@@ -39,18 +39,18 @@ class CrossFader
void SetMixCrossFade(){mType = FT_MIX;};
void SetTriangularCrossFade(){mType = FT_TRIANGULAR;};
void SetExponentialCrossFade(){mType = FT_EXPONENTIAL;};
-
+
void AddClip( WaveClip * clip);
void ClearClips();
//Produces samples according to crossfading rules.
- bool GetSamples(samplePtr buffer, sampleFormat format,
+ bool GetSamples(samplePtr buffer, sampleFormat format,
sampleCount start, sampleCount len);
-
+
protected:
WaveClipList mClips;
private:
-
+
bool CrossFadeMix(samplePtr buffer, sampleFormat format, sampleCount start, sampleCount len);
FadeType mType;
diff --git a/src/Dependencies.cpp b/src/Dependencies.cpp
index 78af5f481..e412f41a7 100644
--- a/src/Dependencies.cpp
+++ b/src/Dependencies.cpp
@@ -3,7 +3,7 @@
Audacity: A Digital Audio Editor
Audacity(R) is copyright (c) 1999-2008 Audacity Team.
License: GPL v2. See License.txt.
-
+
Dependencies.cpp
Dominic Mazzoni
@@ -12,7 +12,7 @@
LRN
Michael Chinen
Vaughan Johnson
-
+
The primary function provided in this source file is
ShowDependencyDialogIfNeeded. It checks a project to see if
any of its WaveTracks contain AliasBlockFiles; if so it
@@ -39,8 +39,8 @@
#include "Track.h"
// Note, this #include must occur here, not up with the others!
-// It must be between the WX_DECLARE_OBJARRAY and WX_DEFINE_OBJARRAY.
-#include
+// It must be between the WX_DECLARE_OBJARRAY and WX_DEFINE_OBJARRAY.
+#include
WX_DEFINE_OBJARRAY( AliasedFileArray );
@@ -120,38 +120,38 @@ void FindDependencies(AudacityProject *project,
int i;
for (i = 0; i < (int)blocks.GetCount(); i++) {
BlockFile *f = blocks[i]->f;
- if (f->IsAlias() && (blockFileHash.count(f) == 0))
+ if (f->IsAlias() && (blockFileHash.count(f) == 0))
{
// f is an alias block we have not yet counted.
blockFileHash[f] = true; // Don't count the same blockfile twice.
AliasBlockFile *aliasBlockFile = (AliasBlockFile *)f;
wxFileName fileName = aliasBlockFile->GetAliasedFileName();
- // In DirManager::ProjectFSCK(), if the user has chosen to
- // "Replace missing audio with silence", the code there puts in an empty wxFileName.
+ // In DirManager::ProjectFSCK(), if the user has chosen to
+ // "Replace missing audio with silence", the code there puts in an empty wxFileName.
// Don't count those in dependencies.
if (!fileName.IsOk())
continue;
-
+
wxString fileNameStr = fileName.GetFullPath();
int blockBytes = (SAMPLE_SIZE(format) *
aliasBlockFile->GetLength());
if (aliasedFileHash.count(fileNameStr) > 0)
- // Already put this AliasBlockFile in aliasedFileHash.
+ // Already put this AliasBlockFile in aliasedFileHash.
// Update block count.
aliasedFileHash[fileNameStr]->mByteCount += blockBytes;
- else
+ else
{
- // Haven't counted this AliasBlockFile yet.
+ // Haven't counted this AliasBlockFile yet.
// Add to return array and internal hash.
- outAliasedFiles->Add(AliasedFile(fileName,
- blockBytes,
+ outAliasedFiles->Add(AliasedFile(fileName,
+ blockBytes,
fileName.FileExists()));
aliasedFileHash[fileNameStr] =
&((*outAliasedFiles)[outAliasedFiles->GetCount()-1]);
}
}
- }
+ }
}
// Given a project and a list of aliased files that should no
@@ -162,12 +162,12 @@ static void RemoveDependencies(AudacityProject *project,
{
DirManager *dirManager = project->GetDirManager();
- ProgressDialog *progress =
+ ProgressDialog *progress =
new ProgressDialog(_("Removing Dependencies"),
_("Copying audio data into project..."));
int updateResult = eProgressSuccess;
- // Hash aliasedFiles based on their full paths and
+ // Hash aliasedFiles based on their full paths and
// count total number of bytes to process.
AliasedFileHash aliasedFileHash;
wxLongLong totalBytesToProcess = 0;
@@ -177,16 +177,16 @@ static void RemoveDependencies(AudacityProject *project,
wxString fileNameStr = aliasedFiles->Item(i).mFileName.GetFullPath();
aliasedFileHash[fileNameStr] = &aliasedFiles->Item(i);
}
-
+
BlockArray blocks;
GetAllSeqBlocks(project, &blocks);
const sampleFormat format = project->GetDefaultFormat();
- ReplacedBlockFileHash blockFileHash;
+ ReplacedBlockFileHash blockFileHash;
wxLongLong completedBytes = 0;
for (i = 0; i < blocks.GetCount(); i++) {
BlockFile *f = blocks[i]->f;
- if (f->IsAlias() && (blockFileHash.count(f) == 0))
+ if (f->IsAlias() && (blockFileHash.count(f) == 0))
{
// f is an alias block we have not yet processed.
AliasBlockFile *aliasBlockFile = (AliasBlockFile *)f;
@@ -260,8 +260,8 @@ private:
void OnYes(wxCommandEvent &evt);
void SaveFutureActionChoice();
-
-
+
+
AudacityProject *mProject;
AliasedFileArray *mAliasedFiles;
bool mIsSaving;
@@ -273,7 +273,7 @@ private:
wxButton *mCopySelectedFilesButton;
wxButton *mCopyAllFilesButton;
wxChoice *mFutureActionChoice;
-
+
public:
DECLARE_EVENT_TABLE()
};
@@ -301,19 +301,19 @@ DependencyDialog::DependencyDialog(wxWindow *parent,
bool isSaving)
: wxDialog(parent, id, _("Project Depends on Other Audio Files"),
wxDefaultPosition, wxDefaultSize,
- (isSaving ?
+ (isSaving ?
(wxDEFAULT_DIALOG_STYLE & ~wxCLOSE_BOX) : // no close box when saving
- wxDEFAULT_DIALOG_STYLE) |
- wxRESIZE_BORDER),
+ wxDEFAULT_DIALOG_STYLE) |
+ wxRESIZE_BORDER),
mProject(project),
mAliasedFiles(aliasedFiles),
mIsSaving(isSaving),
- mHasMissingFiles(false),
- mHasNonMissingFiles(false),
+ mHasMissingFiles(false),
+ mHasNonMissingFiles(false),
mMessageStaticText(NULL),
mFileListCtrl(NULL),
mCopySelectedFilesButton(NULL),
- mCopyAllFilesButton(NULL),
+ mCopyAllFilesButton(NULL),
mFutureActionChoice(NULL)
{
ShuttleGui S(this, eIsCreating);
@@ -322,11 +322,11 @@ DependencyDialog::DependencyDialog(wxWindow *parent,
const wxString kStdMsg =
_("Copying these files into your project will remove this dependency.\
-\nThis is safer, but needs more disk space.");
+\nThis is safer, but needs more disk space.");
const wxString kExtraMsgForMissingFiles =
_("\n\nFiles shown as MISSING have been moved or deleted and cannot be copied.\
-\nRestore them to their original location to be able to copy into project.");
+\nRestore them to their original location to be able to copy into project.");
void DependencyDialog::PopulateOrExchange(ShuttleGui& S)
{
@@ -336,7 +336,7 @@ void DependencyDialog::PopulateOrExchange(ShuttleGui& S)
mMessageStaticText = S.AddVariableText(kStdMsg, false);
S.StartStatic(_("Project Dependencies"));
- {
+ {
mFileListCtrl = S.Id(FileListID).AddListControlReportMode();
mFileListCtrl->InsertColumn(0, _("Audio File"));
mFileListCtrl->SetColumnWidth(0, 220);
@@ -344,13 +344,13 @@ void DependencyDialog::PopulateOrExchange(ShuttleGui& S)
mFileListCtrl->SetColumnWidth(1, 120);
PopulateList();
- mCopySelectedFilesButton =
+ mCopySelectedFilesButton =
S.Id(CopySelectedFilesButtonID).AddButton(
- _("Copy Selected Files"),
+ _("Copy Selected Files"),
wxALIGN_LEFT);
mCopySelectedFilesButton->Enable(
mFileListCtrl->GetSelectedItemCount() > 0);
- mCopySelectedFilesButton->SetDefault();
+ mCopySelectedFilesButton->SetDefault();
mCopySelectedFilesButton->SetFocus();
}
S.EndStatic();
@@ -364,26 +364,26 @@ void DependencyDialog::PopulateOrExchange(ShuttleGui& S)
else
S.Id(wxID_NO).AddButton(_("Do Not Copy"));
- mCopyAllFilesButton =
+ mCopyAllFilesButton =
S.Id(wxID_YES).AddButton(_("Copy All Files (Safer)"));
- // Enabling mCopyAllFilesButton is also done in PopulateList,
+ // Enabling mCopyAllFilesButton is also done in PopulateList,
// but at its call above, mCopyAllFilesButton does not yet exist.
mCopyAllFilesButton->Enable(!mHasMissingFiles);
}
S.EndHorizontalLay();
-
+
if (mIsSaving)
{
S.StartHorizontalLay(wxALIGN_LEFT);
{
wxArrayString choices;
- /*i18n-hint: One of the choices of what you want Audacity to do when
+ /*i18n-hint: One of the choices of what you want Audacity to do when
* Audacity finds a project depends on another file.*/
choices.Add(_("Ask me"));
choices.Add(_("Always copy all files (safest)"));
choices.Add(_("Never copy any files"));
- mFutureActionChoice =
+ mFutureActionChoice =
S.Id(FutureActionChoiceID).AddChoice(
_("Whenever a project depends on other files:"),
_("Ask me"), &choices);
@@ -419,7 +419,7 @@ void DependencyDialog::PopulateList()
mHasNonMissingFiles = true;
mFileListCtrl->SetItemState(i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
}
- else
+ else
{
mFileListCtrl->InsertItem(i, _("MISSING ") + fileName.GetFullPath());
mHasMissingFiles = true;
@@ -429,7 +429,7 @@ void DependencyDialog::PopulateList()
mFileListCtrl->SetItem(i, 1, Internat::FormatSize(byteCount));
mFileListCtrl->SetItemData(i, long(bOriginalExists));
}
-
+
wxString msg = kStdMsg;
if (mHasMissingFiles)
msg += kExtraMsgForMissingFiles;
@@ -446,10 +446,10 @@ void DependencyDialog::OnList(wxListEvent &evt)
wxString itemStr = evt.GetText();
if (evt.GetData() == 0)
- // This list item is one of mAliasedFiles for which
+ // This list item is one of mAliasedFiles for which
// the original is missing, i.e., moved or deleted.
- // wxListCtrl does not provide for items that are not
- // allowed to be selected, so always deselect these items.
+ // wxListCtrl does not provide for items that are not
+ // allowed to be selected, so always deselect these items.
mFileListCtrl->SetItemState(evt.GetIndex(), 0, wxLIST_STATE_SELECTED); // Deselect.
mCopySelectedFilesButton->Enable(
@@ -461,10 +461,10 @@ void DependencyDialog::OnSize(wxSizeEvent &evt)
int fileListCtrlWidth, fileListCtrlHeight;
mFileListCtrl->GetSize(&fileListCtrlWidth, &fileListCtrlHeight);
- // File path is column 0. File size is column 1.
- // File size column is always 120 px wide.
+ // File path is column 0. File size is column 1.
+ // File size column is always 120 px wide.
// Also subtract 8 from file path column width for borders.
- mFileListCtrl->SetColumnWidth(0, fileListCtrlWidth - 120 - 8);
+ mFileListCtrl->SetColumnWidth(0, fileListCtrlWidth - 120 - 8);
mFileListCtrl->SetColumnWidth(1, 120);
wxDialog::OnSize(evt);
}
@@ -492,7 +492,7 @@ void DependencyDialog::OnCopySelectedFiles(wxCommandEvent & WXUNUSED(event))
aliasedFilesToDelete.Add(mAliasedFiles->Item(i));
mAliasedFiles->RemoveAt(i);
}
- }
+ }
RemoveDependencies(mProject, &aliasedFilesToDelete);
PopulateList();
@@ -514,7 +514,7 @@ void DependencyDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
if (ret != wxYES)
return;
}
-
+
EndModal(wxID_CANCEL);
}
@@ -522,7 +522,7 @@ void DependencyDialog::SaveFutureActionChoice()
{
if (mFutureActionChoice)
{
- wxString savePref;
+ wxString savePref;
int sel = mFutureActionChoice->GetSelection();
switch (sel)
{
@@ -546,26 +546,26 @@ bool ShowDependencyDialogIfNeeded(AudacityProject *project,
FindDependencies(project, &aliasedFiles);
if (aliasedFiles.GetCount() == 0) {
- if (!isSaving)
+ if (!isSaving)
{
- wxString msg =
+ wxString msg =
_("Your project is currently self-contained; it does not depend on any external audio files. \
\n\nIf you change the project to a state that has external dependencies on imported \
files, it will no longer be self-contained. If you then Save without copying those files in, \
you may lose data.");
- wxMessageBox(msg,
+ wxMessageBox(msg,
_("Dependency Check"),
wxOK | wxICON_INFORMATION,
project);
}
return true; // Nothing to do.
}
-
+
if (isSaving)
{
- wxString action =
+ wxString action =
gPrefs->Read(
- wxT("/FileFormats/SaveProjectWithDependencies"),
+ wxT("/FileFormats/SaveProjectWithDependencies"),
wxT("ask"));
if (action == wxT("copy"))
{
@@ -582,7 +582,7 @@ you may lose data.");
int returnCode = dlog.ShowModal();
if (returnCode == wxID_CANCEL)
return false;
- else if (returnCode == wxID_YES)
+ else if (returnCode == wxID_YES)
RemoveDependencies(project, &aliasedFiles);
return true;
diff --git a/src/Dependencies.h b/src/Dependencies.h
index d6b4e6c05..c4bda4d57 100644
--- a/src/Dependencies.h
+++ b/src/Dependencies.h
@@ -3,7 +3,7 @@
Audacity: A Digital Audio Editor
Audacity(R) is copyright (c) 1999-2008 Audacity Team.
License: GPL v2. See License.txt.
-
+
Dependencies.h
Dominic Mazzoni
@@ -18,10 +18,10 @@
class AudacityProject;
-class AliasedFile
+class AliasedFile
{
public:
- AliasedFile(wxFileName fileName, wxLongLong byteCount, bool bOriginalExists)
+ AliasedFile(wxFileName fileName, wxLongLong byteCount, bool bOriginalExists)
{
mFileName = fileName;
mByteCount = byteCount;
diff --git a/src/DeviceManager.cpp b/src/DeviceManager.cpp
index 5109390f1..4c23f17a0 100644
--- a/src/DeviceManager.cpp
+++ b/src/DeviceManager.cpp
@@ -38,12 +38,12 @@
DeviceManager DeviceManager::dm;
-/// Gets the singleton instance
+/// Gets the singleton instance
DeviceManager* DeviceManager::Instance()
{
return &dm;
}
-
+
/// Releases memory assosiated with the singleton
void DeviceManager::Destroy()
{
@@ -89,7 +89,7 @@ DeviceSourceMap* DeviceManager::GetDefaultDevice(int hostIndex, int isInput)
if (maps[i].deviceIndex == targetDevice)
return &maps[i];
}
-
+
wxLogDebug(wxT("GetDefaultDevice() no default device"));
return NULL;
}
@@ -149,17 +149,17 @@ static void AddSourcesFromStream(int deviceIndex, const PaDeviceInfo *info, std:
}
//if there is only one source, we don't need to concatenate the source
- //or enumerate, because it is something meaningless like 'master'
+ //or enumerate, because it is something meaningless like 'master'
//(as opposed to 'mic in' or 'line in'), and the user doesn't have any choice.
//note that some devices have no input sources at all but are still valid.
//the behavior we do is the same for 0 and 1 source cases.
map.totalSources = Px_GetNumInputSources(portMixer);
#endif
-
+
if (map.totalSources <= 1) {
map.sourceIndex = 0;
maps->push_back(map);
- }
+ }
#ifdef USE_PORTMIXER
else {
//open up a stream with the device so portmixer can get the info out of it.
@@ -262,14 +262,14 @@ void DeviceManager::Rescan()
// check to see if there is a stream open - can happen if monitoring,
// but otherwise Rescan() should not be available to the user.
if (gAudioIO) {
- if (gAudioIO->IsMonitoring())
+ if (gAudioIO->IsMonitoring())
{
gAudioIO->StopStream();
while (gAudioIO->IsBusy())
wxMilliSleep(100);
}
}
-
+
// restart portaudio - this updates the device list
Pa_Terminate();
Pa_Initialize();
diff --git a/src/DeviceManager.h b/src/DeviceManager.h
index df4fdd938..958d4ccab 100644
--- a/src/DeviceManager.h
+++ b/src/DeviceManager.h
@@ -37,9 +37,9 @@ wxString MakeDeviceSourceString(const DeviceSourceMap *map);
class DeviceManager
{
public:
- /// Gets the singleton instance
+ /// Gets the singleton instance
static DeviceManager* Instance();
-
+
/// Releases memory assosiated with the singleton
static void Destroy();
@@ -64,7 +64,7 @@ class DeviceManager
DeviceSourceMap* GetDefaultDevice(int hostIndex, int isInput);
bool m_inited;
-
+
std::vector mInputDeviceSourceMaps;
std::vector mOutputDeviceSourceMaps;
diff --git a/src/DirManager.cpp b/src/DirManager.cpp
index a0570ed3a..097bfaa06 100644
--- a/src/DirManager.cpp
+++ b/src/DirManager.cpp
@@ -47,7 +47,7 @@
The current scheme uses two levels of subdirectories - up to 256 'eXX' and up to
256 'dYY' directories within each of the 'eXX' dirs, where XX and YY are hex chars.
In each of the dXX directories there are up to 256 audio files (e.g. .au or .auf).
- They have a filename scheme of 'eXXYYZZZZ', where XX and YY refers to the
+ They have a filename scheme of 'eXXYYZZZZ', where XX and YY refers to the
subdirectories as above. The 'ZZZZ' component is generated randomly for some reason.
The XX and YY components are sequential.
DirManager fills up the current dYY subdir until 256 are created, and moves on to the next one.
@@ -56,7 +56,7 @@
'e00/d00/e000015e8.au', and the 257th may be 'e00/d01/e0001f02a.au'.
On close the blockfiles that are no longer referenced by the project (edited or deleted) are removed,
along with the consequent empty directories.
-
+
*//*******************************************************************/
@@ -119,7 +119,7 @@ wxMemorySize GetFreeMemory()
mach_msg_type_number_t cnt = HOST_VM_INFO_COUNT;
vm_statistics_data_t stats;
vm_size_t pagesize = 0;
-
+
memset(&stats, 0, sizeof(stats));
host_page_size(port, &pagesize);
@@ -139,16 +139,16 @@ wxMemorySize GetFreeMemory()
// Behavior of RecursivelyEnumerate is tailored to our uses and not
// entirely straightforward. It recurs depth-first from the passed-
// in directory into its subdirs according to optional dirspec
-// pattern, building a list of directories and (optionally) files
+// pattern, building a list of directories and (optionally) files
// in the listed order. The dirspec is not applied to
// subdirs of subdirs. Files in the passed-in directory will not be
// enumerated. Also, the passed-in directory is the last entry added
// to the list.
-static int RecursivelyEnumerate(wxString dirPath,
+static int RecursivelyEnumerate(wxString dirPath,
wxArrayString& filePathArray, // output: all files in dirPath tree
wxString dirspec,
bool bFiles, bool bDirs,
- int progress_count = 0,
+ int progress_count = 0,
int progress_bias = 0,
ProgressDialog* progress = NULL)
{
@@ -163,12 +163,12 @@ static int RecursivelyEnumerate(wxString dirPath,
cont= dir.GetFirst(&name, dirspec, wxDIR_FILES);
while ( cont ){
wxString filepath = dirPath + wxFILE_SEP_PATH + name;
-
+
count++;
filePathArray.Add(filepath);
-
+
cont = dir.GetNext(&name);
-
+
if (progress)
progress->Update(count + progress_bias,
progress_count);
@@ -180,13 +180,13 @@ static int RecursivelyEnumerate(wxString dirPath,
wxString subdirPath = dirPath + wxFILE_SEP_PATH + name;
count += RecursivelyEnumerate(
subdirPath, filePathArray, wxEmptyString,
- bFiles, bDirs,
- progress_count, count + progress_bias,
- progress);
+ bFiles, bDirs,
+ progress_count, count + progress_bias,
+ progress);
cont = dir.GetNext(&name);
}
}
-
+
if (bDirs) {
filePathArray.Add(dirPath);
count++;
@@ -209,7 +209,7 @@ static int RecursivelyEnumerateWithProgress(wxString dirPath,
progress = new ProgressDialog(_("Progress"), message);
int count = RecursivelyEnumerate(
- dirPath, filePathArray, dirspec,
+ dirPath, filePathArray, dirspec,
bFiles, bDirs,
progress_count, 0,
progress);
@@ -225,54 +225,54 @@ static int RecursivelyCountSubdirs(wxString dirPath)
bool bContinue;
int nCount = 0;
wxDir dir(dirPath);
- if (dir.IsOpened() && dir.HasSubDirs())
+ if (dir.IsOpened() && dir.HasSubDirs())
{
wxString name;
bContinue = dir.GetFirst(&name, wxEmptyString, wxDIR_DIRS);
- while (bContinue)
+ while (bContinue)
{
nCount++;
wxString subdirPath = dirPath + wxFILE_SEP_PATH + name;
- nCount += RecursivelyCountSubdirs(subdirPath);
+ nCount += RecursivelyCountSubdirs(subdirPath);
bContinue = dir.GetNext(&name);
}
}
return nCount;
}
-static int RecursivelyRemoveEmptyDirs(wxString dirPath,
- int nDirCount = 0,
+static int RecursivelyRemoveEmptyDirs(wxString dirPath,
+ int nDirCount = 0,
ProgressDialog* pProgress = NULL)
{
bool bContinue;
wxDir dir(dirPath);
int nCount = 0;
- if (dir.IsOpened())
+ if (dir.IsOpened())
{
- if (dir.HasSubDirs())
+ if (dir.HasSubDirs())
{
wxString name;
bContinue = dir.GetFirst(&name, wxEmptyString, wxDIR_DIRS);
- while (bContinue)
+ while (bContinue)
{
wxString subdirPath = dirPath + wxFILE_SEP_PATH + name;
- nCount += RecursivelyRemoveEmptyDirs(subdirPath, nDirCount, pProgress);
+ nCount += RecursivelyRemoveEmptyDirs(subdirPath, nDirCount, pProgress);
bContinue = dir.GetNext(&name);
}
}
// Have to recheck dir.HasSubDirs() again, in case they all were deleted in recursive calls.
if (!dir.HasSubDirs() && !dir.HasFiles() && (dirPath.Right(5) != wxT("_data")))
{
- // No subdirs or files. It's empty so delete it.
- // Vaughan, 2010-07-07:
- // Note that, per http://src.chromium.org/svn/trunk/src/base/file_util_win.cc, among others,
+ // No subdirs or files. It's empty so delete it.
+ // Vaughan, 2010-07-07:
+ // Note that, per http://src.chromium.org/svn/trunk/src/base/file_util_win.cc, among others,
// "Some versions of Windows return ERROR_FILE_NOT_FOUND (0x2) when deleting
// an empty directory..." Supposedly fixed in Vista and up.
- // I discovered this on WinXP. I tried several other Windows SDK functions (e.g., _rmdir
- // and RemoveDirectory), and they all give same results.
- // I noticed dirs get deleted in RecursivelyRemove, maybe because it doesn't
+ // I discovered this on WinXP. I tried several other Windows SDK functions (e.g., _rmdir
+ // and RemoveDirectory), and they all give same results.
+ // I noticed dirs get deleted in RecursivelyRemove, maybe because it doesn't
// consider whether the path is a directory or a file and wxRemoveFile()'s it first.
- // Tried it here on WinXP, but no joy. Leave the code in case it works on other Win systems.
+ // Tried it here on WinXP, but no joy. Leave the code in case it works on other Win systems.
#ifdef __WXMSW__
::wxRemoveFile(dirPath);
#endif
@@ -285,7 +285,7 @@ static int RecursivelyRemoveEmptyDirs(wxString dirPath,
return nCount;
}
-static void RecursivelyRemove(wxArrayString& filePathArray, int count,
+static void RecursivelyRemove(wxArrayString& filePathArray, int count,
bool bFiles, bool bDirs,
const wxChar* message = NULL)
{
@@ -303,7 +303,7 @@ static void RecursivelyRemove(wxArrayString& filePathArray, int count,
if (progress)
progress->Update(i, count);
}
-
+
if (progress)
delete progress;
}
@@ -324,7 +324,7 @@ DirManager::DirManager()
wxLogDebug(wxT("DirManager: Created new instance."));
mRef = 1; // MM: Initial refcount is 1 by convention
-
+
// Seed the random number generator.
// this need not be strictly uniform or random, but it should give
// unclustered numbers
@@ -332,7 +332,7 @@ DirManager::DirManager()
// Set up local temp subdir
// Previously, Audacity just named project temp directories "project0",
- // "project1" and so on. But with the advent of recovery code, we need a
+ // "project1" and so on. But with the advent of recovery code, we need a
// unique name even after a crash. So we create a random project index
// and make sure it is not used already. This will not pose any performance
// penalties as long as the number of open Audacity projects is much
@@ -341,7 +341,7 @@ DirManager::DirManager()
mytemp = globaltemp + wxFILE_SEP_PATH +
wxString::Format(wxT("project%d"), rand());
} while (wxDirExists(mytemp));
-
+
numDirManagers++;
projPath = wxT("");
@@ -350,7 +350,7 @@ DirManager::DirManager()
mLoadingTarget = NULL;
mMaxSamples = -1;
- // toplevel pool hash is fully populated to begin
+ // toplevel pool hash is fully populated to begin
{
int i;
for(i=0; i< 256; i++) dirTopPool[i]=0;
@@ -383,14 +383,14 @@ void DirManager::CleanTempDir()
{
if (dontDeleteTempFiles)
return; // do nothing
-
+
wxArrayString filePathArray;
- // Subtract 1 because we don't want to delete the global temp directory,
+ // Subtract 1 because we don't want to delete the global temp directory,
// which this will find and list last.
- int count =
+ int count =
RecursivelyEnumerate(globaltemp, filePathArray, wxT("project*"), true, true) - 1;
- if (count == 0)
+ if (count == 0)
return;
RecursivelyRemove(filePathArray, count, true, true, _("Cleaning up temporary files"));
@@ -451,10 +451,10 @@ bool DirManager::SetProject(wxString& newProjPath, wxString& newProjName, const
BlockHash::iterator iter = mBlockFileHash.begin();
bool success = true;
- while ((iter != mBlockFileHash.end()) && success)
+ while ((iter != mBlockFileHash.end()) && success)
{
BlockFile *b = iter->second;
-
+
if (b->IsLocked())
success = CopyToNewProjectDirectory(b);
else{
@@ -477,7 +477,7 @@ bool DirManager::SetProject(wxString& newProjPath, wxString& newProjName, const
projFull = oldLoc;
BlockHash::iterator iter = mBlockFileHash.begin();
- while (iter != mBlockFileHash.end())
+ while (iter != mBlockFileHash.end())
{
BlockFile *b = iter->second;
MoveToNewProjectDirectory(b);
@@ -510,14 +510,14 @@ bool DirManager::SetProject(wxString& newProjPath, wxString& newProjName, const
// and new project directories. The easiest way to do this is to
// recurse depth-first and rmdir every directory seen in old and
// new; rmdir will fail on non-empty dirs.
-
+
wxArrayString dirlist;
count = RecursivelyEnumerate(cleanupLoc1, dirlist, wxEmptyString, false, true);
- //This destroys the empty dirs of the OD block files, which are yet to come.
+ //This destroys the empty dirs of the OD block files, which are yet to come.
//Dont know if this will make the project dirty, but I doubt it. (mchinen)
// count += RecursivelyEnumerate(cleanupLoc2, dirlist, wxEmptyString, false, true);
-
+
if (count > 0)
RecursivelyRemove(dirlist, count, false, true, _("Cleaning up cache directories"));
}
@@ -528,7 +528,7 @@ wxString DirManager::GetProjectDataDir()
{
return projFull;
}
-
+
wxString DirManager::GetProjectName()
{
return projName;
@@ -559,26 +559,26 @@ void DirManager::SetLocalTempDir(wxString path)
}
wxFileName DirManager::MakeBlockFilePath(wxString value){
-
+
wxFileName dir;
dir.AssignDir(GetDataFilesDir());
-
+
if(value.GetChar(0)==wxT('d')){
- // this file is located in a subdirectory tree
+ // this file is located in a subdirectory tree
int location=value.Find(wxT('b'));
wxString subdir=value.Mid(0,location);
dir.AppendDir(subdir);
-
+
if(!dir.DirExists())dir.Mkdir();
}
-
+
if(value.GetChar(0)==wxT('e')){
- // this file is located in a new style two-deep subdirectory tree
+ // this file is located in a new style two-deep subdirectory tree
wxString topdir=value.Mid(0,3);
wxString middir=wxT("d");
middir.Append(value.Mid(3,2));
- dir.AppendDir(topdir);
+ dir.AppendDir(topdir);
dir.AppendDir(middir);
if(!dir.DirExists() && !dir.Mkdir(0777,wxPATH_MKDIR_FULL))
@@ -587,34 +587,34 @@ wxFileName DirManager::MakeBlockFilePath(wxString value){
return dir;
}
-bool DirManager::AssignFile(wxFileName &fileName,
+bool DirManager::AssignFile(wxFileName &fileName,
wxString value,
- bool diskcheck)
+ bool diskcheck)
{
wxFileName dir=MakeBlockFilePath(value);
if(diskcheck){
// verify that there's no possible collision on disk. If there
- // is, log the problem and return FALSE so that MakeBlockFileName
+ // is, log the problem and return FALSE so that MakeBlockFileName
// can try again
wxDir checkit(dir.GetFullPath());
if(!checkit.IsOpened()) return FALSE;
-
+
// this code is only valid if 'value' has no extention; that
// means, effectively, AssignFile may be called with 'diskcheck'
// set to true only if called from MakeFileBlockName().
-
+
wxString filespec;
filespec.Printf(wxT("%s.*"),value.c_str());
if(checkit.HasFiles(filespec)){
// collision with on-disk state!
wxString collision;
checkit.GetFirst(&collision,filespec);
-
+
wxLogWarning(_("Audacity found an orphan block file: %s. \nPlease consider saving and reloading the project to perform a complete project check."),
collision.c_str());
-
+
return FALSE;
}
}
@@ -674,11 +674,11 @@ void DirManager::BalanceInfoAdd(wxString file)
{
const wxChar *s=file.c_str();
if(s[0]==wxT('e')){
- // this is one of the modern two-deep managed files
- // convert filename to keys
- unsigned int topnum = (hexchar_to_int(s[1]) << 4) |
+ // this is one of the modern two-deep managed files
+ // convert filename to keys
+ unsigned int topnum = (hexchar_to_int(s[1]) << 4) |
hexchar_to_int(s[2]);
- unsigned int midnum = (hexchar_to_int(s[3]) << 4) |
+ unsigned int midnum = (hexchar_to_int(s[3]) << 4) |
hexchar_to_int(s[4]);
unsigned int midkey=topnum<<8|midnum;
@@ -694,11 +694,11 @@ void DirManager::BalanceInfoDel(wxString file)
{
const wxChar *s=file.c_str();
if(s[0]==wxT('e')){
- // this is one of the modern two-deep managed files
+ // this is one of the modern two-deep managed files
- unsigned int topnum = (hexchar_to_int(s[1]) << 4) |
+ unsigned int topnum = (hexchar_to_int(s[1]) << 4) |
hexchar_to_int(s[2]);
- unsigned int midnum = (hexchar_to_int(s[3]) << 4) |
+ unsigned int midnum = (hexchar_to_int(s[3]) << 4) |
hexchar_to_int(s[4]);
unsigned int midkey=topnum<<8|midnum;
@@ -775,7 +775,7 @@ wxFileName DirManager::MakeBlockFileName()
// the available pool, try to make one
if(dirMidPool.empty()){
-
+
// is there a toplevel directory with space for a new subdir?
if(!dirTopPool.empty()){
@@ -785,7 +785,7 @@ wxFileName DirManager::MakeBlockFileName()
DirHash::iterator iter = dirTopPool.begin();
int newcount = 0;
topnum = iter->first;
-
+
// search for unused midlevels; linear search adequate
// add 32 new topnum/midnum dirs full of prospective filenames to midpool
@@ -804,7 +804,7 @@ wxFileName DirManager::MakeBlockFileName()
// into an infinite loop isn't acceptible. Just in case,
// for some reason, we get here, dynamite this toplevel so
// we don't just fail.
-
+
// this is 'wrong', but the best we can do given that
// something else is also wrong. It will contain the
// problem so we can keep going without worry.
@@ -827,7 +827,7 @@ wxFileName DirManager::MakeBlockFileName()
}else{
-
+
DirHash::iterator iter = dirMidPool.begin();
midkey = iter->first;
@@ -841,9 +841,9 @@ wxFileName DirManager::MakeBlockFileName()
baseFileName.Printf(wxT("e%02x%02x%03x"),topnum,midnum,filenum);
if (mBlockFileHash.find(baseFileName) == mBlockFileHash.end()){
- // not in the hash, good.
+ // not in the hash, good.
if (!this->AssignFile(ret, baseFileName, true))
- {
+ {
// this indicates an on-disk collision, likely due to an
// orphan blockfile. We should try again, but first
// alert the balancing info there's a phantom file here;
@@ -852,12 +852,12 @@ wxFileName DirManager::MakeBlockFileName()
// infinite loop if all possible filenames are taken by
// orphans (unlikely but possible)
BalanceFileAdd(midkey);
-
+
}else break;
}
}
- // FIXME: Might we get here without midkey having been set?
- // Seemed like a possible problem in these changes in .aup directory hierarchy.
+ // FIXME: Might we get here without midkey having been set?
+ // Seemed like a possible problem in these changes in .aup directory hierarchy.
BalanceFileAdd(midkey);
return ret;
}
@@ -957,8 +957,8 @@ BlockFile *DirManager::CopyBlockFile(BlockFile *b)
// Copy the blockfile
BlockFile *b2;
- if (!b->GetFileName().IsOk())
- // Block files with uninitialized filename (i.e. SilentBlockFile)
+ if (!b->GetFileName().IsOk())
+ // Block files with uninitialized filename (i.e. SilentBlockFile)
// just need an in-memory copy.
b2 = b->Copy(wxFileName());
else
@@ -1039,7 +1039,7 @@ bool DirManager::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
if (alias)
pBlockFile = LegacyAliasBlockFile::BuildFromXML(projFull, attrs);
- else
+ else
pBlockFile = LegacyBlockFile::BuildFromXML(projFull, attrs,
mLoadingBlockLen,
mLoadingFormat);
@@ -1055,13 +1055,13 @@ bool DirManager::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
if ((mMaxSamples > -1) && // is initialized
(pBlockFile->GetLength() > mMaxSamples))
{
- // See http://bugzilla.audacityteam.org/show_bug.cgi?id=451#c13.
- // Lock pBlockFile so that the ~BlockFile() will not delete the file on disk.
+ // See http://bugzilla.audacityteam.org/show_bug.cgi?id=451#c13.
+ // Lock pBlockFile so that the ~BlockFile() will not delete the file on disk.
pBlockFile->Lock();
delete pBlockFile;
return false;
}
- else
+ else
*mLoadingTarget = pBlockFile;
//
@@ -1070,7 +1070,7 @@ bool DirManager::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
// return a reference to the existing object instead.
//
- wxString name = (*mLoadingTarget)->GetFileName().GetName();
+ wxString name = (*mLoadingTarget)->GetFileName().GetName();
BlockFile *retrieved = mBlockFileHash[name];
if (retrieved) {
// Lock it in order to delete it safely, i.e. without having
@@ -1095,7 +1095,7 @@ bool DirManager::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
bool DirManager::MoveOrCopyToNewProjectDirectory(BlockFile *f, bool copy)
{
// Check that this BlockFile corresponds to a file on disk
- //ANSWER-ME: Is this checking only for SilentBlockFiles, in which case
+ //ANSWER-ME: Is this checking only for SilentBlockFiles, in which case
// (!f->GetFileName().IsOk()) is a more correct check?
if (f->GetFileName().GetName().IsEmpty()) {
return true;
@@ -1104,7 +1104,7 @@ bool DirManager::MoveOrCopyToNewProjectDirectory(BlockFile *f, bool copy)
wxFileName newFileName;
wxFileName oldFileName=f->GetFileName();
if (!this->AssignFile(newFileName, f->GetFileName().GetFullName(), false))
- return false;
+ return false;
if (newFileName != f->GetFileName()) {
//check to see that summary exists before we copy.
@@ -1116,7 +1116,7 @@ bool DirManager::MoveOrCopyToNewProjectDirectory(BlockFile *f, bool copy)
return false;
}
f->SetFileName(newFileName);
-
+
//there is a small chance that the summary has begun to be computed on a different thread with the
//original filename. we need to catch this case by waiting for it to finish and then copy.
if (!summaryExisted && (f->IsSummaryAvailable() || f->IsSummaryBeingComputed())) {
@@ -1124,8 +1124,8 @@ bool DirManager::MoveOrCopyToNewProjectDirectory(BlockFile *f, bool copy)
//(It is important that OD files set this lock while computing their summary files.)
while(f->IsSummaryBeingComputed() && !f->IsSummaryAvailable())
::wxMilliSleep(50);
-
- //check to make sure the oldfile exists.
+
+ //check to make sure the oldfile exists.
//if it doesn't, we can assume it was written to the new name, which is fine.
if (oldFileName.FileExists())
{
@@ -1193,7 +1193,7 @@ bool DirManager::EnsureSafeFilename(wxFileName fName)
return true;
/* i18n-hint: 'old' is part of a filename used when a file is renamed. */
- // Figure out what the new name for the existing file would be.
+ // Figure out what the new name for the existing file would be.
/* i18n-hint: e.g. Try to go from "mysong.wav" to "mysong-old1.wav". */
// Keep trying until we find a filename that doesn't exist.
@@ -1236,7 +1236,7 @@ bool DirManager::EnsureSafeFilename(wxFileName fName)
bool needToRename = false;
wxBusyCursor busy;
BlockHash::iterator iter = mBlockFileHash.begin();
- while (iter != mBlockFileHash.end())
+ while (iter != mBlockFileHash.end())
{
BlockFile *b = iter->second;
// don't worry, we don't rely on this cast unless IsAlias is true
@@ -1244,18 +1244,18 @@ bool DirManager::EnsureSafeFilename(wxFileName fName)
if (b->IsAlias() && ab->GetAliasedFileName() == fName) {
needToRename = true;
-
+
//ODBlocks access the aliased file on another thread, so we need to pause them before this continues.
ab->LockRead();
}
-
+
//now for encoded OD blocks (e.g. flac)
// don't worry, we don't rely on this cast unless ISDataAvailable is false
// which means that it still needs to access the file.
ODDecodeBlockFile *db = (ODDecodeBlockFile*)b;
if (!b->IsDataAvailable() && db->GetEncodedAudioFilename() == fName) {
needToRename = true;
-
+
//ODBlocks access the aliased file on another thread, so we need to pause them before this continues.
db->LockRead();
}
@@ -1265,7 +1265,7 @@ bool DirManager::EnsureSafeFilename(wxFileName fName)
if (needToRename) {
if (!wxRenameFile(fName.GetFullPath(),
- renamedFileName.GetFullPath()))
+ renamedFileName.GetFullPath()))
{
// ACK!!! The renaming was unsuccessful!!!
// (This shouldn't happen, since we tried creating a
@@ -1275,7 +1275,7 @@ bool DirManager::EnsureSafeFilename(wxFileName fName)
// Put things back where they were
BlockHash::iterator iter = mBlockFileHash.begin();
- while (iter != mBlockFileHash.end())
+ while (iter != mBlockFileHash.end())
{
BlockFile *b = iter->second;
AliasBlockFile *ab = (AliasBlockFile*)b;
@@ -1299,7 +1299,7 @@ bool DirManager::EnsureSafeFilename(wxFileName fName)
{
//point the aliases to the new filename.
BlockHash::iterator iter = mBlockFileHash.begin();
- while (iter != mBlockFileHash.end())
+ while (iter != mBlockFileHash.end())
{
BlockFile *b = iter->second;
AliasBlockFile *ab = (AliasBlockFile*)b;
@@ -1310,7 +1310,7 @@ bool DirManager::EnsureSafeFilename(wxFileName fName)
ab->ChangeAliasedFileName(renamedFileName);
ab->UnlockRead();
wxPrintf(_("Changed block %s to new alias name\n"), b->GetFileName().GetFullName().c_str());
-
+
}
if (!b->IsDataAvailable() && db->GetEncodedAudioFilename() == fName) {
db->ChangeAudioFile(renamedFileName);
@@ -1339,7 +1339,7 @@ void DirManager::Ref()
void DirManager::Deref()
{
wxASSERT(mRef > 0); // MM: If mRef is smaller, it should have been deleted already
-
+
--mRef;
// MM: Automatically delete if refcount reaches zero
@@ -1347,27 +1347,27 @@ void DirManager::Deref()
delete this;
}
-// Check the BlockFiles against the disk state.
+// Check the BlockFiles against the disk state.
// Missing Blockfile data can be regenerated if possible or replaced with silence.
-// Orphan blockfiles can be deleted.
+// Orphan blockfiles can be deleted.
// Note that even BlockFiles not referenced by the current savefile (but locked
// by history) will be reflected in the mBlockFileHash, and that's a
// good thing; this is one reason why we use the hash and not the most
// recent savefile.
int DirManager::ProjectFSCK(const bool bForceError, const bool bAutoRecoverMode)
{
- // In earlier versions of this method, enumerations of errors were
- // all done in sequence, then the user was prompted for each type of error.
- // The enumerations are now interleaved with prompting, because, for example,
- // user choosing to replace missing aliased block files with silence
- // needs to put in SilentBlockFiles and delete the corresponding auf files,
- // so those would then not be cumulated in missingAUFHash.
- // We still do the FindX methods outside the conditionals,
+ // In earlier versions of this method, enumerations of errors were
+ // all done in sequence, then the user was prompted for each type of error.
+ // The enumerations are now interleaved with prompting, because, for example,
+ // user choosing to replace missing aliased block files with silence
+ // needs to put in SilentBlockFiles and delete the corresponding auf files,
+ // so those would then not be cumulated in missingAUFHash.
+ // We still do the FindX methods outside the conditionals,
// so the log always shows all found errors.
int action; // choice of action for each type of error
int nResult = 0;
-
+
if (bForceError && !bAutoRecoverMode)
{
// TODO: Replace with more user friendly error message?
@@ -1377,25 +1377,25 @@ int DirManager::ProjectFSCK(const bool bForceError, const bool bAutoRecoverMode)
The error message is confusing to users in English, and could just say
"Found problems with when checking project file." */
wxString msg = _("Project check read faulty Sequence tags.");
- const wxChar *buttons[] =
+ const wxChar *buttons[] =
{_("Close project immediately with no changes"),
_("Continue with repairs noted in log, and check for more errors. This will save the project in its current state, unless you \"Close project immediately\" on further error alerts."),
NULL};
wxLog::FlushActive(); // MultiDialog has "Show Log..." button, so make sure log is current.
action = ShowMultiDialog(msg, _("Warning - Problems Reading Sequence Tags"), buttons);
- if (action == 0)
+ if (action == 0)
nResult = FSCKstatus_CLOSE_REQ;
- else
- nResult = FSCKstatus_CHANGED | FSCKstatus_SAVE_AUP;
+ else
+ nResult = FSCKstatus_CHANGED | FSCKstatus_SAVE_AUP;
}
wxArrayString filePathArray; // *all* files in the project directory/subdirectories
wxString dirPath = (projFull != wxT("") ? projFull : mytemp);
RecursivelyEnumerateWithProgress(
- dirPath,
+ dirPath,
filePathArray, // output: all files in project directory tree
- wxEmptyString,
- true, false,
+ wxEmptyString,
+ true, false,
mBlockFileHash.size(), // rough guess of how many BlockFiles will be found/processed, for progress
_("Inspecting project file data"));
@@ -1407,7 +1407,7 @@ int DirManager::ProjectFSCK(const bool bForceError, const bool bAutoRecoverMode)
BlockHash missingAliasedFilePathHash; // full paths of missing aliased files
this->FindMissingAliasedFiles(missingAliasedFileAUFHash, missingAliasedFilePathHash);
- if ((nResult != FSCKstatus_CLOSE_REQ) && !missingAliasedFileAUFHash.empty())
+ if ((nResult != FSCKstatus_CLOSE_REQ) && !missingAliasedFileAUFHash.empty())
{
// In auto-recover mode, we always create silent blocks, and do not ask user.
// This makes sure the project is complete next time we open it.
@@ -1430,38 +1430,38 @@ _("Project check of \"%s\" folder \
\nproject immediately\" on further error alerts.");
wxString msg;
msg.Printf(msgA, this->projName.c_str(), missingAliasedFilePathHash.size());
- const wxChar *buttons[] =
+ const wxChar *buttons[] =
{_("Close project immediately with no changes"),
- _("Treat missing audio as silence (this session only)"),
+ _("Treat missing audio as silence (this session only)"),
_("Replace missing audio with silence (permanent immediately)."),
NULL};
wxLog::FlushActive(); // MultiDialog has "Show Log..." button, so make sure log is current.
action = ShowMultiDialog(msg, _("Warning - Missing Aliased File(s)"), buttons);
}
- if (action == 0)
+ if (action == 0)
nResult = FSCKstatus_CLOSE_REQ;
else
{
BlockHash::iterator iter = missingAliasedFileAUFHash.begin();
- while (iter != missingAliasedFileAUFHash.end())
+ while (iter != missingAliasedFileAUFHash.end())
{
// This type caste is safe. We checked that it's an alias block file earlier.
- AliasBlockFile *b = (AliasBlockFile*)iter->second;
+ AliasBlockFile *b = (AliasBlockFile*)iter->second;
if (action == 1)
// Silence error logging for this block in this session.
- b->SilenceAliasLog();
- else if (action == 2)
+ b->SilenceAliasLog();
+ else if (action == 2)
{
// silence the blockfiles by yanking the filename
- // This is done, eventually, in PCMAliasBlockFile::ReadData()
- // and ODPCMAliasBlockFile::ReadData, in the stack of b->Recover().
+ // This is done, eventually, in PCMAliasBlockFile::ReadData()
+ // and ODPCMAliasBlockFile::ReadData, in the stack of b->Recover().
// There, if the mAliasedFileName is bad, it zeroes the data.
wxFileName dummy;
dummy.Clear();
b->ChangeAliasedFileName(dummy);
b->Recover();
- nResult = FSCKstatus_CHANGED | FSCKstatus_SAVE_AUP;
+ nResult = FSCKstatus_CHANGED | FSCKstatus_SAVE_AUP;
}
iter++;
}
@@ -1476,8 +1476,8 @@ _("Project check of \"%s\" folder \
// Alias summary regeneration must happen after checking missing aliased files.
//
BlockHash missingAUFHash; // missing (.auf) AliasBlockFiles
- this->FindMissingAUFs(missingAUFHash);
- if ((nResult != FSCKstatus_CLOSE_REQ) && !missingAUFHash.empty())
+ this->FindMissingAUFs(missingAUFHash);
+ if ((nResult != FSCKstatus_CLOSE_REQ) && !missingAUFHash.empty())
{
// In auto-recover mode, we just recreate the alias files, and do not ask user.
// This makes sure the project is complete next time we open it.
@@ -1494,7 +1494,7 @@ _("Project check of \"%s\" folder \
msg.Printf(msgA, this->projName.c_str(), missingAUFHash.size());
const wxChar *buttons[] = {_("Regenerate alias summary files (safe and recommended)"),
_("Fill in silence for missing display data (this session only)"),
- _("Close project immediately with no further changes"),
+ _("Close project immediately with no further changes"),
NULL};
wxLog::FlushActive(); // MultiDialog has "Show Log..." button, so make sure log is current.
action = ShowMultiDialog(msg, _("Warning - Missing Alias Summary File(s)"), buttons);
@@ -1505,16 +1505,16 @@ _("Project check of \"%s\" folder \
else
{
BlockHash::iterator iter = missingAUFHash.begin();
- while (iter != missingAUFHash.end())
+ while (iter != missingAUFHash.end())
{
BlockFile *b = iter->second;
if(action==0){
//regenerate from data
b->Recover();
- nResult |= FSCKstatus_CHANGED;
+ nResult |= FSCKstatus_CHANGED;
}else if (action==1){
// Silence error logging for this block in this session.
- b->SilenceLog();
+ b->SilenceLog();
}
iter++;
}
@@ -1549,30 +1549,30 @@ _("Project check of \"%s\" folder \
\nmay not show silence.");
wxString msg;
msg.Printf(msgA, this->projName.c_str(), missingAUHash.size());
- const wxChar *buttons[] =
- {_("Close project immediately with no further changes"),
- _("Treat missing audio as silence (this session only)"),
+ const wxChar *buttons[] =
+ {_("Close project immediately with no further changes"),
+ _("Treat missing audio as silence (this session only)"),
_("Replace missing audio with silence (permanent immediately)"),
NULL};
wxLog::FlushActive(); // MultiDialog has "Show Log..." button, so make sure log is current.
action = ShowMultiDialog(msg, _("Warning - Missing Audio Data Block File(s)"), buttons);
}
-
+
if (action == 0)
nResult = FSCKstatus_CLOSE_REQ;
else
{
BlockHash::iterator iter = missingAUHash.begin();
- while (iter != missingAUHash.end())
+ while (iter != missingAUHash.end())
{
BlockFile *b = iter->second;
- if (action == 2)
+ if (action == 2)
{
//regenerate with zeroes
b->Recover();
- nResult = FSCKstatus_CHANGED;
+ nResult = FSCKstatus_CHANGED;
}
- else if (action == 1)
+ else if (action == 1)
b->SilenceLog();
iter++;
}
@@ -1607,7 +1607,7 @@ other projects. \
wxString msg;
msg.Printf(msgA, this->projName.c_str(), (int)orphanFilePathArray.GetCount());
- const wxChar *buttons[] =
+ const wxChar *buttons[] =
{_("Continue without deleting; ignore the extra files this session"),
_("Close project immediately with no further changes"),
_("Delete orphan files (permanent immediately)"),
@@ -1621,12 +1621,12 @@ other projects. \
// Nothing is done if (action == 0).
else if (action == 2)
{
- // FSCKstatus_CHANGED was bogus here.
+ // FSCKstatus_CHANGED was bogus here.
// The files are deleted, so "Undo Project Repair" could not do anything.
- // Plus they affect none of the valid tracks, so incorrect to mark them changed,
+ // Plus they affect none of the valid tracks, so incorrect to mark them changed,
// and no need for refresh.
// nResult |= FSCKstatus_CHANGED;
- for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
+ for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
wxRemoveFile(orphanFilePathArray[i]);
}
}
@@ -1634,11 +1634,11 @@ other projects. \
if ((nResult != FSCKstatus_CLOSE_REQ) && !ODManager::HasLoadedODFlag())
{
// Remove any empty directories.
- ProgressDialog* pProgress =
- new ProgressDialog(_("Progress"),
+ ProgressDialog* pProgress =
+ new ProgressDialog(_("Progress"),
_("Cleaning up unused directories in project data"));
// nDirCount is for updating pProgress. +1 because we may delete dirPath.
- int nDirCount = RecursivelyCountSubdirs(dirPath) + 1;
+ int nDirCount = RecursivelyCountSubdirs(dirPath) + 1;
RecursivelyRemoveEmptyDirs(dirPath, nDirCount, pProgress);
delete pProgress;
}
@@ -1647,7 +1647,7 @@ other projects. \
if (bForceError ||
!missingAliasedFileAUFHash.empty() ||
!missingAUFHash.empty() ||
- !missingAUHash.empty() ||
+ !missingAUHash.empty() ||
!orphanFilePathArray.IsEmpty())
{
wxLogWarning(_("Project check found file inconsistencies inspecting the loaded project data."));
@@ -1656,8 +1656,8 @@ other projects. \
// In auto-recover mode, we didn't do any ShowMultiDialog calls above, so put up an alert.
if (bAutoRecoverMode)
::wxMessageBox(
- _("Project check found file inconsistencies during automatic recovery.\n\nSelect 'Show Log...' in the Help menu to see details."),
- _("Warning: Problems in Automatic Recovery"),
+ _("Project check found file inconsistencies during automatic recovery.\n\nSelect 'Show Log...' in the Help menu to see details."),
+ _("Warning: Problems in Automatic Recovery"),
wxOK | wxICON_EXCLAMATION);
}
@@ -1670,31 +1670,31 @@ void DirManager::FindMissingAliasedFiles(
BlockHash& missingAliasedFilePathHash) // output: full paths of missing aliased files
{
BlockHash::iterator iter = mBlockFileHash.begin();
- while (iter != mBlockFileHash.end())
+ while (iter != mBlockFileHash.end())
{
wxString key = iter->first; // file name and extension
BlockFile *b = iter->second;
- if (b->IsAlias())
+ if (b->IsAlias())
{
wxFileName aliasedFileName = ((AliasBlockFile*)b)->GetAliasedFileName();
wxString aliasedFileFullPath = aliasedFileName.GetFullPath();
// wxEmptyString can happen if user already chose to "replace... with silence".
- if ((aliasedFileFullPath != wxEmptyString) &&
+ if ((aliasedFileFullPath != wxEmptyString) &&
!aliasedFileName.FileExists())
{
missingAliasedFileAUFHash[key] = b;
- if (missingAliasedFilePathHash.find(aliasedFileFullPath) ==
+ if (missingAliasedFilePathHash.find(aliasedFileFullPath) ==
missingAliasedFilePathHash.end()) // Add it only once.
- // Not actually using the block here, just the path,
+ // Not actually using the block here, just the path,
// so set the block to NULL to create the entry.
- missingAliasedFilePathHash[aliasedFileFullPath] = NULL;
+ missingAliasedFilePathHash[aliasedFileFullPath] = NULL;
}
}
iter++;
}
iter = missingAliasedFilePathHash.begin();
- while (iter != missingAliasedFilePathHash.end())
+ while (iter != missingAliasedFilePathHash.end())
{
wxLogWarning(_("Missing aliased audio file: '%s'"), iter->first.c_str());
iter++;
@@ -1702,24 +1702,24 @@ void DirManager::FindMissingAliasedFiles(
}
void DirManager::FindMissingAUFs(
- BlockHash& missingAUFHash) // output: missing (.auf) AliasBlockFiles
+ BlockHash& missingAUFHash) // output: missing (.auf) AliasBlockFiles
{
BlockHash::iterator iter = mBlockFileHash.begin();
- while (iter != mBlockFileHash.end())
+ while (iter != mBlockFileHash.end())
{
wxString key = iter->first;
BlockFile *b = iter->second;
- if (b->IsAlias() && b->IsSummaryAvailable())
+ if (b->IsAlias() && b->IsSummaryAvailable())
{
/* don't look in hash; that might find files the user moved
that the Blockfile abstraction can't find itself */
wxFileName fileName = MakeBlockFilePath(key);
fileName.SetName(key);
fileName.SetExt(wxT("auf"));
- if (!fileName.FileExists())
+ if (!fileName.FileExists())
{
missingAUFHash[key] = b;
- wxLogWarning(_("Missing alias (.auf) block file: '%s'"),
+ wxLogWarning(_("Missing alias (.auf) block file: '%s'"),
fileName.GetFullPath().c_str());
}
}
@@ -1731,11 +1731,11 @@ void DirManager::FindMissingAUs(
BlockHash& missingAUHash) // missing data (.au) blockfiles
{
BlockHash::iterator iter = mBlockFileHash.begin();
- while (iter != mBlockFileHash.end())
+ while (iter != mBlockFileHash.end())
{
wxString key = iter->first;
BlockFile *b = iter->second;
- if (!b->IsAlias())
+ if (!b->IsAlias())
{
wxFileName fileName = MakeBlockFilePath(key);
fileName.SetName(key);
@@ -1743,7 +1743,7 @@ void DirManager::FindMissingAUs(
if (!fileName.FileExists())
{
missingAUHash[key] = b;
- wxLogWarning(_("Missing data block file: '%s'"),
+ wxLogWarning(_("Missing data block file: '%s'"),
fileName.GetFullPath().c_str());
}
}
@@ -1752,25 +1752,25 @@ void DirManager::FindMissingAUs(
}
// Find .au and .auf files that are not in the project.
-void DirManager::FindOrphanBlockFiles(
+void DirManager::FindOrphanBlockFiles(
const wxArrayString& filePathArray, // input: all files in project directory
wxArrayString& orphanFilePathArray) // output: orphan files
{
DirManager *clipboardDM = NULL;
- for (size_t i = 0; i < filePathArray.GetCount(); i++)
+ for (size_t i = 0; i < filePathArray.GetCount(); i++)
{
wxFileName fullname = filePathArray[i];
wxString basename = fullname.GetName();
if ((mBlockFileHash.find(basename) == mBlockFileHash.end()) && // is orphan
- // Consider only Audacity data files.
+ // Consider only Audacity data files.
// Specifically, ignore JPG and OGG ("Save Compressed Copy").
(fullname.GetExt().IsSameAs(wxT("au")) ||
fullname.GetExt().IsSameAs(wxT("auf"))))
{
if (!clipboardDM) {
TrackList *clipTracks = AudacityProject::GetClipboardTracks();
-
+
if (clipTracks) {
TrackListIterator clipIter(clipTracks);
Track *track = clipIter.First();
@@ -1778,13 +1778,13 @@ void DirManager::FindOrphanBlockFiles(
clipboardDM = track->GetDirManager();
}
}
-
+
// Ignore it if it exists in the clipboard (from a previously closed project)
if (!(clipboardDM && clipboardDM->ContainsBlockFile(basename)))
orphanFilePathArray.Add(fullname.GetFullPath());
}
}
- for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
+ for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
wxLogWarning(_("Orphan block file: '%s'"), orphanFilePathArray[i].c_str());
}
@@ -1794,10 +1794,10 @@ void DirManager::RemoveOrphanBlockfiles()
wxArrayString filePathArray; // *all* files in the project directory/subdirectories
wxString dirPath = (projFull != wxT("") ? projFull : mytemp);
RecursivelyEnumerateWithProgress(
- dirPath,
+ dirPath,
filePathArray, // output: all files in project directory tree
- wxEmptyString,
- true, false,
+ wxEmptyString,
+ true, false,
mBlockFileHash.size(), // rough guess of how many BlockFiles will be found/processed, for progress
_("Inspecting project file data"));
@@ -1805,15 +1805,15 @@ void DirManager::RemoveOrphanBlockfiles()
this->FindOrphanBlockFiles(
filePathArray, // input: all files in project directory tree
orphanFilePathArray); // output: orphan files
-
+
// Remove all orphan blockfiles.
- for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
+ for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
wxRemoveFile(orphanFilePathArray[i]);
}
void DirManager::FillBlockfilesCache()
{
-#ifdef DEPRECATED_AUDIO_CACHE
+#ifdef DEPRECATED_AUDIO_CACHE
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=545.
bool cacheBlockFiles = false;
gPrefs->Read(wxT("/Directories/CacheBlockFiles"), &cacheBlockFiles);
@@ -1838,7 +1838,7 @@ void DirManager::FillBlockfilesCache()
numNeed++;
iter++;
}
-
+
if (numNeed == 0)
return;
@@ -1875,7 +1875,7 @@ void DirManager::WriteCacheToDisk()
numNeed++;
iter++;
}
-
+
if (numNeed == 0)
return;
diff --git a/src/DirManager.h b/src/DirManager.h
index f9b53e79e..cb8a64384 100644
--- a/src/DirManager.h
+++ b/src/DirManager.h
@@ -60,13 +60,13 @@ class DirManager: public XMLTagHandler {
sampleCount sampleLen,
sampleFormat format,
bool allowDeferredWrite = false);
-
+
BlockFile *NewAliasBlockFile( wxString aliasedFile, sampleCount aliasStart,
sampleCount aliasLen, int aliasChannel);
-
+
BlockFile *NewODAliasBlockFile( wxString aliasedFile, sampleCount aliasStart,
sampleCount aliasLen, int aliasChannel);
-
+
BlockFile *NewODDecodeBlockFile( wxString aliasedFile, sampleCount aliasStart,
sampleCount aliasLen, int aliasChannel, int decodeType);
@@ -114,21 +114,21 @@ class DirManager: public XMLTagHandler {
static void CleanTempDir();
// Check the project for errors and possibly prompt user
- // bForceError: Always show log error alert even if no errors are found here.
+ // bForceError: Always show log error alert even if no errors are found here.
// Important when you know that there are already errors in the log.
- // bAutoRecoverMode: Do not show any option dialogs for how to deal with errors found here.
+ // bAutoRecoverMode: Do not show any option dialogs for how to deal with errors found here.
// Too complicated during auto-recover. Just correct problems the "safest" way.
int ProjectFSCK(const bool bForceError, const bool bAutoRecoverMode);
-
+
void FindMissingAliasedFiles(
BlockHash& missingAliasedFileAUFHash, // output: (.auf) AliasBlockFiles whose aliased files are missing
BlockHash& missingAliasedFilePathHash); // output: full paths of missing aliased files
void FindMissingAUFs(
- BlockHash& missingAUFHash); // output: missing (.auf) AliasBlockFiles
+ BlockHash& missingAUFHash); // output: missing (.auf) AliasBlockFiles
void FindMissingAUs(
BlockHash& missingAUHash); // missing data (.au) blockfiles
// Find .au and .auf files that are not in the project.
- void FindOrphanBlockFiles(
+ void FindOrphanBlockFiles(
const wxArrayString& filePathArray, // input: all files in project directory
wxArrayString& orphanFilePathArray); // output: orphan files
@@ -142,14 +142,14 @@ class DirManager: public XMLTagHandler {
// not interested in this information, but it is important for the
// auto-save functionality
wxString GetDataFilesDir() const;
-
+
// This should only be used by the auto save functionality
void SetLocalTempDir(wxString path);
-
+
// Do not delete any temporary files on exit. This is only called if
// auto recovery is cancelled and should be retried later
static void SetDontDeleteTempFiles() { dontDeleteTempFiles = true; }
-
+
// Write all write-cached block files to disc, if any
void WriteCacheToDisk();
diff --git a/src/Dither.cpp b/src/Dither.cpp
index a4a413027..94e7b25ff 100644
--- a/src/Dither.cpp
+++ b/src/Dither.cpp
@@ -70,7 +70,7 @@ const float Dither::SHAPED_BS[] = { 2.033f, -2.165f, 1.959f, -1.590f, 0.6149f };
// be quite fast.
#if 0
-// To assist in understanding what the macros are doing, here's an example of what
+// To assist in understanding what the macros are doing, here's an example of what
// the result would be for Shaped dither:
//
// DITHER(ShapedDither, dest, destFormat, destStride, source, sourceFormat, sourceStride, len);
diff --git a/src/Dither.h b/src/Dither.h
index e4bdc4c02..3069e3140 100644
--- a/src/Dither.h
+++ b/src/Dither.h
@@ -18,7 +18,7 @@ class Dither
public:
/// Default constructor
Dither();
-
+
/// These ditherers are currently available:
enum DitherType { none = 0, rectangle = 1, triangle = 2, shaped = 3};
@@ -47,7 +47,7 @@ private:
static const int BUF_SIZE; /* = 8 */
static const int BUF_MASK; /* = 7 */
static const float SHAPED_BS[];
-
+
// Dither state
int mPhase;
float mTriangleState;
diff --git a/src/Envelope.cpp b/src/Envelope.cpp
index 379d0d38f..12e99a946 100644
--- a/src/Envelope.cpp
+++ b/src/Envelope.cpp
@@ -21,7 +21,7 @@
*//****************************************************************//**
\class EnvPoint
-\brief EnvPoint, derived from XMLTagHandler, provides Envelope with
+\brief EnvPoint, derived from XMLTagHandler, provides Envelope with
a draggable point type.
*//*******************************************************************/
@@ -60,7 +60,7 @@ Envelope::Envelope()
mDirty = false;
mIsDeleting = false;
mMirror = true;
-
+
mMinValue = 1.0e-7;
mMaxValue = 2.0;
@@ -103,7 +103,7 @@ void Envelope::Rescale(double minValue, double maxValue)
}
-/// Flatten removes all points from the envelope to
+/// Flatten removes all points from the envelope to
/// make it horizontal at a chosen y-value.
/// @value - the y-value for the flat envelope.
void Envelope::Flatten(double value)
@@ -147,7 +147,7 @@ void Envelope::CopyFrom(const Envelope *e, double t0, double t1)
i++;
// Create the point at 0 if it needs interpolated representation
- if (i>0)
+ if (i>0)
AddPointAtEnd( 0, e->GetValue(mOffset) );
// Copy points from inside the copied region
@@ -291,8 +291,8 @@ bool Envelope::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
if (!value)
break;
const wxString strValue = value;
- if( !wxStrcmp(attr, wxT("numpoints")) &&
- XMLValueChecker::IsGoodInt(strValue) && strValue.ToLong(&nValue))
+ if( !wxStrcmp(attr, wxT("numpoints")) &&
+ XMLValueChecker::IsGoodInt(strValue) && strValue.ToLong(&nValue))
numPoints = nValue;
}
if (numPoints < 0)
@@ -305,7 +305,7 @@ bool Envelope::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
XMLTagHandler *Envelope::HandleXMLChild(const wxChar *tag)
{
- if (wxStrcmp(tag, wxT("controlpoint")))
+ if (wxStrcmp(tag, wxT("controlpoint")))
return NULL;
return AddPointAtEnd(0,0);
@@ -366,7 +366,7 @@ float Envelope::ValueOfPixel( int y, int height, bool upper, bool dB,
/// HandleMouseButtonDown either finds an existing control point or adds a new one
/// which is then recorded as the point to drag.
-/// This is slightly complicated by there possibly being four control points for
+/// This is slightly complicated by there possibly being four control points for
/// a given time value:
/// We have an upper and lower envelope line.
/// Also we may be showing an inner envelope (at 0.5 the range).
@@ -401,7 +401,7 @@ bool Envelope::HandleMouseButtonDown(wxMouseEvent & event, wxRect & r,
// TODO: also fix it so that we can drag the last point on an envelope.
for (int i = 0; i < len; i++) { //search for control point nearest click
if (mEnv[i]->GetT() >= tleft && mEnv[i]->GetT() <= tright) {
-
+
int x = int ((mEnv[i]->GetT() + mOffset - h) * pps) + r.x;
int y[4];
int numControlPoints;
@@ -415,7 +415,7 @@ bool Envelope::HandleMouseButtonDown(wxMouseEvent & event, wxRect & r,
// Inner control points(contour)
y[2] = GetWaveYPos( mEnv[i]->GetVal(), zoomMin, zoomMax, r.height,
dB, false, dBr, false);
- y[3] = GetWaveYPos( -mEnv[i]->GetVal()-.00000001, zoomMin, zoomMax,
+ y[3] = GetWaveYPos( -mEnv[i]->GetVal()-.00000001, zoomMin, zoomMax,
r.height, dB, false, dBr, false);
numControlPoints = 4;
@@ -425,9 +425,9 @@ bool Envelope::HandleMouseButtonDown(wxMouseEvent & event, wxRect & r,
if (!mMirror)
numControlPoints = 1;
-
+
for(int j=0; j= mTrackLen)
// return false;
-
+
double v = GetValueAtX( event.m_x, r, h, pps );
-
- int ct = GetWaveYPos( v, zoomMin, zoomMax, r.height, dB,
+
+ int ct = GetWaveYPos( v, zoomMin, zoomMax, r.height, dB,
false, dBr, false) ;
- int cb = GetWaveYPos( -v-.000000001, zoomMin, zoomMax, r.height, dB,
+ int cb = GetWaveYPos( -v-.000000001, zoomMin, zoomMax, r.height, dB,
false, dBr, false) ;
if( ct <= cb || !mMirror ){
- int t = GetWaveYPos( v, zoomMin, zoomMax, r.height, dB,
+ int t = GetWaveYPos( v, zoomMin, zoomMax, r.height, dB,
true, dBr, false) ;
- int b = GetWaveYPos( -v, zoomMin, zoomMax, r.height, dB,
+ int b = GetWaveYPos( -v, zoomMin, zoomMax, r.height, dB,
true, dBr, false) ;
ct = (t + ct) / 2;
@@ -498,14 +498,14 @@ void Envelope::MarkDragPointForDeletion()
// We're going to be deleting the point; On
// screen we show this by having the envelope move to
// the position it will have after deletion of the point.
- // Without delting the point we move it left or right
+ // Without delting the point we move it left or right
// to the same position as the previous or next point.
- if( mEnv.Count()<=1)
+ if( mEnv.Count()<=1)
{
// There is only one point - just move it
// off screen and at default height.
- // temporary state when dragging only!
+ // temporary state when dragging only!
mEnv[mDragPoint]->SetT(-1000000.0);
mEnv[mDragPoint]->SetVal(mDefaultValue);
return;
@@ -525,13 +525,13 @@ void Envelope::MoveDraggedPoint( wxMouseEvent & event, wxRect & r,
if(clip_y < 0) clip_y = 0;
if(clip_y > r.height) clip_y = r.height;
double newVal = ValueOfPixel(clip_y, r.height, mUpper, dB,
- zoomMin, zoomMax);
+ zoomMin, zoomMax);
wxASSERT( pps > 0 );
// We no longer tolerate multiple envelope points at the same t.
// epsilon is less than the time offset of a single sample
// TODO: However because mTrackEpsilon assumes 200KHz this use
- // of epsilon is a tad bogus. What we need to do instead is delete
+ // of epsilon is a tad bogus. What we need to do instead is delete
// a duplicated point on a mouse up.
double newWhen = mInitialWhen + (event.m_x - mInitialX) / pps;
@@ -555,7 +555,7 @@ void Envelope::MoveDraggedPoint( wxMouseEvent & event, wxRect & r,
bool Envelope::HandleDragging( wxMouseEvent & event, wxRect & r,
double h, double pps, bool dB,
- float zoomMin, float zoomMax,
+ float zoomMin, float zoomMax,
float WXUNUSED(eMin), float WXUNUSED(eMax))
{
mDirty = true;
@@ -571,7 +571,7 @@ bool Envelope::HandleDragging( wxMouseEvent & event, wxRect & r,
MoveDraggedPoint( event, r,h,pps,dB, zoomMin, zoomMax);
return true;
}
-
+
if(mIsDeleting )
// IF we already know we're deleting THEN no envelope point to update.
return false;
@@ -582,9 +582,9 @@ bool Envelope::HandleDragging( wxMouseEvent & event, wxRect & r,
// Exit dragging mode and deletes dragged point if neccessary.
bool Envelope::HandleMouseButtonUp( wxMouseEvent & WXUNUSED(event), wxRect & WXUNUSED(r),
- double WXUNUSED(h),
+ double WXUNUSED(h),
double WXUNUSED(pps), bool WXUNUSED(dB),
- float WXUNUSED(zoomMin),
+ float WXUNUSED(zoomMin),
float WXUNUSED(zoomMax) )
{
if (mIsDeleting) {
@@ -610,7 +610,7 @@ bool Envelope::MouseEvent(wxMouseEvent & event, wxRect & r,
if (event.ButtonDown() && mButton == wxMOUSE_BTN_NONE)
return HandleMouseButtonDown( event, r, h, pps,dB,
zoomMin, zoomMax);
- if (event.Dragging() && mDragPoint >= 0)
+ if (event.Dragging() && mDragPoint >= 0)
return HandleDragging( event, r, h, pps,dB,
zoomMin, zoomMax);
if (event.ButtonUp() && event.GetButton() == mButton)
@@ -647,7 +647,7 @@ void Envelope::CollapseRegion(double t0, double t1)
for (i = 0; i < len; i++)
if (mEnv[i]->GetT() >= t1)
mEnv[i]->SetT(mEnv[i]->GetT() - (t1 - t0));
-
+
mTrackLen -= (t1-t0);
}
@@ -682,7 +682,7 @@ void Envelope::Paste(double t0, Envelope *e)
e->Insert(e->mTrackLen, rightval);
pointsAdded = true; // we need to delete them later so's not to corrupt 'e' for later use
}
-
+
t0 = wxMin(t0 - mOffset, mTrackLen); // t0 now has origin of zero
double deltat = e->mTrackLen;
@@ -696,7 +696,7 @@ void Envelope::Paste(double t0, Envelope *e)
bool onPoint = false;
unsigned int len = mEnv.Count();
- // get values to perform framing of the insertion
+ // get values to perform framing of the insertion
double splitval = GetValue(t0 + mOffset);
if(len != 0) { // Not case 10: there are point/s in the envelope
@@ -727,8 +727,8 @@ Old analysis of cases:
// In pasting in a clip we choose to preserve the envelope so that the loudness of the
// parts is unchanged.
//
-// 1) This may introduce a discontnuity in the envelope at a boundary between the
-// old and new clips. In that case we must ensure there are envelope points
+// 1) This may introduce a discontnuity in the envelope at a boundary between the
+// old and new clips. In that case we must ensure there are envelope points
// at sample positions immediately before and immediately after the boundary.
// 2) If the points have the same value we only need one of them.
// 3) If the points have the same value AND it is the same as the value interpolated
@@ -736,8 +736,8 @@ Old analysis of cases:
//
// We do the same for the left and right edge of the new clip.
//
-// Even simpler: we could always add two points at a boundary and then call
-// RemoveUnneededPoints() (provided that function behaves correctly).
+// Even simpler: we could always add two points at a boundary and then call
+// RemoveUnneededPoints() (provided that function behaves correctly).
// See if existing points need shifting to the right, and what Case we are in
for (i = 0; i < len; i++) {
@@ -775,7 +775,7 @@ Old analysis of cases:
}
else {
if(atEnd) { // insertion at the end
- if(onPoint) { // last env point is at RH end, Case 2:
+ if(onPoint) { // last env point is at RH end, Case 2:
mEnv[0]->SetT(mEnv[0]->GetT() - mTrackEpsilon); // move it L slightly to avoid duplicate point
//wxLogDebug(wxT("Case 2"));
}
@@ -875,7 +875,7 @@ void Envelope::RemoveUnneededPoints(double time, double tolerence)
if( fabs(val -val1) > tolerence )
{
Insert(when,val); // put it back, we needed it
-
+
//Insert may have modified instead of inserting, if two points were at the same time.
// in which case len needs to shrink i and len, because the array size decreased.
bExcludePoint = (mEnv.Count() < len);
@@ -960,7 +960,7 @@ void Envelope::GetPoints(double *bufferWhen,
* If you call Envelope::Insert() from WaveClip, or anywhere else outside the
* Envelope class that is using project timing, subtract the envelope's mOffset
* from the time.
- * If you call Envelope::Insert() from within Envelope, don't subtract mOffset
+ * If you call Envelope::Insert() from within Envelope, don't subtract mOffset
* because you are working in relative time inside the envelope
* @param when the time in seconds when the envelope point should be created.
* @param value the envelope value to use at the given point.
@@ -997,7 +997,7 @@ int Envelope::Insert(double when, double value)
when = mTrackLen;
int i = 0;
-
+
while (i < len && when > mEnv[i]->GetT())
i++;
@@ -1078,7 +1078,7 @@ void Envelope::BinarySearchForTime( int &Lo, int &Hi, double t ) const
/// GetInterpolationStartValueAtPoint() is used to select either the
/// envelope value or its log depending on whether we are doing linear
-/// or log interpolation.
+/// or log interpolation.
/// @param iPoint index in env array to look at.
/// @return value there, or its (safe) log10.
double Envelope::GetInterpolationStartValueAtPoint( int iPoint ) const
@@ -1139,7 +1139,7 @@ void Envelope::GetValues(double *buffer, int bufferLen,
vprev = GetInterpolationStartValueAtPoint( lo );
vnext = GetInterpolationStartValueAtPoint( hi );
-
+
// Interpolate, either linear or log depending on mDB.
double dt = (tnext - tprev);
double to = t - tprev;
@@ -1317,11 +1317,11 @@ double Envelope::Integral( double t0, double t1 )
{
return -Integral(t1, t0); // this makes more sense than returning the default value
}
-
+
unsigned int count = mEnv.Count();
if(count == 0) // 'empty' envelope
return (t1 - t0) * mDefaultValue;
-
+
double total = 0.0, lastT, lastVal;
unsigned int i; // this is the next point to check
if(t0 < mEnv[0]->GetT()) // t0 preceding the first point
@@ -1346,7 +1346,7 @@ double Envelope::Integral( double t0, double t1 )
lastT = t0;
i = hi; // the point immediately after t0.
}
-
+
// loop through the rest of the envelope points until we get to t1
while (1)
{
@@ -1377,11 +1377,11 @@ double Envelope::IntegralOfInverse( double t0, double t1 )
{
return -IntegralOfInverse(t1, t0); // this makes more sense than returning the default value
}
-
+
unsigned int count = mEnv.Count();
if(count == 0) // 'empty' envelope
return (t1 - t0) / mDefaultValue;
-
+
double total = 0.0, lastT, lastVal;
unsigned int i; // this is the next point to check
if(t0 < mEnv[0]->GetT()) // t0 preceding the first point
@@ -1406,7 +1406,7 @@ double Envelope::IntegralOfInverse( double t0, double t1 )
lastT = t0;
i = hi; // the point immediately after t0.
}
-
+
// loop through the rest of the envelope points until we get to t1
while (1)
{
@@ -1438,11 +1438,11 @@ double Envelope::SolveIntegralOfInverse( double t0, double area )
fprintf( stderr, "SolveIntegralOfInverse called with negative area, this is not supported!\n" );
return t0;
}
-
+
unsigned int count = mEnv.Count();
if(count == 0) // 'empty' envelope
return t0 + area * mDefaultValue;
-
+
double lastT, lastVal;
unsigned int i; // this is the next point to check
if(t0 < mEnv[0]->GetT()) // t0 preceding the first point
@@ -1468,7 +1468,7 @@ double Envelope::SolveIntegralOfInverse( double t0, double area )
lastT = t0;
i = hi; // the point immediately after t0.
}
-
+
// loop through the rest of the envelope points until we get to t1
while (1)
{
diff --git a/src/Envelope.h b/src/Envelope.h
index 1265cdda6..691985199 100644
--- a/src/Envelope.h
+++ b/src/Envelope.h
@@ -40,7 +40,7 @@ public:
mT = t;
mVal = ClampValue(val);
}
-
+
double ClampValue(double val); // this calls mEnvelope->ClampValue(), implementation is below the Envelope class
double GetT() { return mT; }
@@ -74,12 +74,12 @@ private:
Envelope *mEnvelope;
double mT;
double mVal;
-
+
};
// TODO: Become an array of EnvPoint rather than of pointers to.
-// Really? wxWidgets help says:
-// "wxArray is suitable for storing integer types and pointers which it does not
+// Really? wxWidgets help says:
+// "wxArray is suitable for storing integer types and pointers which it does not
// treat as objects in any way..."
// And why is this a TODO in any case, if it works correctly?
WX_DEFINE_ARRAY(EnvPoint *, EnvArray);
@@ -98,11 +98,11 @@ class Envelope : public XMLTagHandler {
void Flatten(double value);
int GetDragPoint(void) {return mDragPoint;}
-
+
double GetMinValue() { return mMinValue; }
double GetMaxValue() { return mMaxValue; }
void SetRange(double minValue, double maxValue);
-
+
double ClampValue(double value) { return std::max(mMinValue, std::min(mMaxValue, value)); }
#if LEGACY_PROJECT_FILE_SUPPORT
@@ -147,7 +147,7 @@ class Envelope : public XMLTagHandler {
// Control
void SetOffset(double newOffset);
void SetTrackLen(double trackLen);
-
+
// Accessors
/** \brief Get envelope value at time t */
double GetValue(double t) const;
@@ -241,7 +241,7 @@ private:
int mButton;
bool mDB;
bool mDirty;
-
+
double mMinValue, mMaxValue;
// These are memoizing variables for Integral()
diff --git a/src/Experimental.h b/src/Experimental.h
index 083cb92b6..950b13c7a 100644
--- a/src/Experimental.h
+++ b/src/Experimental.h
@@ -9,7 +9,7 @@
Used for #includes and #defines for experimental features.
- When the features become mainstream the #include files will
+ When the features become mainstream the #include files will
move out of here and into the files which need them. The
#defines will then be retired.
@@ -21,8 +21,8 @@
- Modular architecture.
Add #defines in here for the new features, and make your code
conditional on those #defines.
-
- All the #defines are positive, i.e., when defined,
+
+ All the #defines are positive, i.e., when defined,
they enable the feature.
**********************************************************************/
@@ -50,7 +50,7 @@
// experimental theming
// Work in progress, June-2008.
-// This mostly sets up a weird color scheme currently.
+// This mostly sets up a weird color scheme currently.
//#define EXPERIMENTAL_THEMING
//August 2009 - Theming not locked down enough for a stable release.
@@ -58,7 +58,7 @@
//#define EXPERIMENTAL_THEME_PREFS
//Next line enables Mic monitoring at times when it was previously off.
-//More work is needed as after recording or playing it results in an
+//More work is needed as after recording or playing it results in an
//unwanted record-cursor on the wave track.
//#define EXPERIMENTAL_EXTRA_MONITORING
@@ -75,9 +75,9 @@
// preferrably disabled until other work is done. Martyn 22/12/2008.
//#define EFFECT_CATEGORIES
-// Andreas Micheler, 20.Nov 2007:
+// Andreas Micheler, 20.Nov 2007:
// A spectrumLogF-like view mode with notes quantization.
-// Just select the "Find Notes" checkbox in the spectrum prefs
+// Just select the "Find Notes" checkbox in the spectrum prefs
// to activate it instead of the Spectrum log(f) mode.
//#define EXPERIMENTAL_FIND_NOTES
@@ -85,7 +85,7 @@
// Skip Points support in the spectrum view mode.
//#define EXPERIMENTAL_FFT_SKIP_POINTS
-// AM, 22.Nov 2007:
+// AM, 22.Nov 2007:
// A Frequency Grid for the Spectrum Log(f) & Find Notes modes
//#define EXPERIMENTAL_FFT_Y_GRID
@@ -125,7 +125,7 @@
// a tabbed divider to the project.
//#define EXPERIMENTAL_NOTEBOOK
// The notebook in turn can contain:
- // 1. The Nyquist Inspector, which is a browser for the objects in
+ // 1. The Nyquist Inspector, which is a browser for the objects in
// Audacity.
//#define EXPERIMENTAL_NYQUIST_INSPECTOR
// 2. The Vocal Studio, a screen for working with vocal sounds
@@ -133,7 +133,7 @@
//#define EXPERIMENTAL_VOCAL_STUDIO
// 3. The Audacity Tester is an extended version of the benchmarks
// display. The crucial idea is to be able to compare waveforms
- // where effects have been applied by audacity but using different
+ // where effects have been applied by audacity but using different
// block-sizes. This should give high confidence that we don't
// suffer from end-effects on buffers, e.g. losing one sample on
// each buffer.
diff --git a/src/FFmpeg.h b/src/FFmpeg.h
index 285e82dfa..bcdced555 100644
--- a/src/FFmpeg.h
+++ b/src/FFmpeg.h
@@ -35,7 +35,7 @@ Describes shared object that is used to access FFmpeg libraries.
#if defined(USE_FFMPEG)
extern "C" {
- // Include errno.h before the ffmpeg includes since they depend on
+ // Include errno.h before the ffmpeg includes since they depend on
// knowing the value of EINVAL...see bottom of avcodec.h. Not doing
// so will produce positive error returns when they should be < 0.
#include
@@ -369,7 +369,7 @@ private:
wxString mAVCodecVersion;
wxString mAVFormatVersion;
wxString mAVUtilVersion;
-
+
///! wx interfaces for dynamic libraries
wxDynamicLibrary *avformat;
wxDynamicLibrary *avcodec;
@@ -401,7 +401,7 @@ typedef struct _streamContext
AVPacket m_pkt; // the last AVPacket we read for this stream
int m_pktValid; // is m_pkt valid?
uint8_t *m_pktDataPtr; // pointer into m_pkt.data
- int m_pktRemainingSiz;
+ int m_pktRemainingSiz;
int64_t m_pts; // the current presentation time of the input stream
int64_t m_ptsOffset; // packets associated with stream are relative to this
@@ -450,7 +450,7 @@ extern "C" {
// make sure that the definitions are the same. If not, it will complain. For this to occur,
// the functions MUST be defined in an extern "C" block otherwise the compiler just thinks the
// functions are being overloaded.
- //
+ //
// The compiler should optimize away the inline function since it just passes control to the real
// function and we should wind up with about the same function call we had before, only now it is
// safer due to the validation.
@@ -525,7 +525,7 @@ extern "C" {
} \
}
- //
+ //
// libavutil
//
FFMPEG_FUNCTION_WITH_RETURN(
@@ -535,7 +535,7 @@ extern "C" {
()
);
FFMPEG_FUNCTION_NO_RETURN(
- av_log_set_callback,
+ av_log_set_callback,
(void (*cb)(void*, int, const char*, va_list)),
(cb)
);
diff --git a/src/FileFormats.cpp b/src/FileFormats.cpp
index 19918237d..bfdce00f4 100644
--- a/src/FileFormats.cpp
+++ b/src/FileFormats.cpp
@@ -72,7 +72,7 @@ unsigned int sf_header_index_to_type(int i)
int sf_num_encodings()
{
int count ;
-
+
sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &count, sizeof (int)) ;
return count;
@@ -108,7 +108,7 @@ unsigned int sf_encoding_index_to_subtype(int i)
wxString sf_header_name(int format)
{
SF_FORMAT_INFO format_info;
-
+
memset(&format_info, 0, sizeof(format_info));
format_info.format = (format & SF_FORMAT_TYPEMASK);
sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info));
@@ -122,7 +122,7 @@ wxString sf_header_shortname(int format)
char *tmp;
int i;
wxString s;
-
+
memset(&format_info, 0, sizeof(format_info));
format_info.format = (format & SF_FORMAT_TYPEMASK);
sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info));
@@ -147,7 +147,7 @@ wxString sf_header_shortname(int format)
wxString sf_header_extension(int format)
{
SF_FORMAT_INFO format_info;
-
+
memset(&format_info, 0, sizeof(format_info));
format_info.format = (format & SF_FORMAT_TYPEMASK);
sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info));
@@ -158,7 +158,7 @@ wxString sf_header_extension(int format)
wxString sf_encoding_name(int encoding)
{
SF_FORMAT_INFO format_info;
-
+
memset(&format_info, 0, sizeof(format_info));
format_info.format = (encoding & SF_FORMAT_SUBMASK);
sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info));
@@ -169,7 +169,7 @@ wxString sf_encoding_name(int encoding)
int sf_num_simple_formats()
{
int count ;
-
+
sf_command (NULL, SFC_GET_SIMPLE_FORMAT_COUNT, &count, sizeof (int)) ;
return count;
@@ -204,7 +204,7 @@ bool sf_subtype_is_integer(unsigned int format)
subtype == SF_FORMAT_PCM_24 ||
subtype == SF_FORMAT_PCM_32);
}
-
+
wxArrayString sf_get_all_extensions()
{
wxArrayString exts;
@@ -212,7 +212,7 @@ wxArrayString sf_get_all_extensions()
int count, k;
memset(&format_info, 0, sizeof(format_info));
-
+
sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT,
&count, sizeof(count));
@@ -220,7 +220,7 @@ wxArrayString sf_get_all_extensions()
format_info.format = k;
sf_command(NULL, SFC_GET_FORMAT_MAJOR,
&format_info, sizeof (format_info)) ;
-
+
exts.Add(LAT1CTOWX(format_info.extension));
}
diff --git a/src/FileFormats.h b/src/FileFormats.h
index 9932cd913..5bab39bad 100644
--- a/src/FileFormats.h
+++ b/src/FileFormats.h
@@ -20,15 +20,15 @@
// enumerating headers
//
-/** @brief Get the number of container formats supported by libsndfile
+/** @brief Get the number of container formats supported by libsndfile
*
* Uses SFC_GET_FORMAT_MAJOR_COUNT in sf_command interface */
int sf_num_headers();
-/** @brief Get the name of a container format from libsndfile
+/** @brief Get the name of a container format from libsndfile
*
* Uses SFC_GET_FORMAT_MAJOR in the sf_command() interface. Resulting C string
- * from libsndfile is converted to a wxString
+ * from libsndfile is converted to a wxString
* @param format_num The libsndfile format number for the container format
* required
*/
@@ -54,7 +54,7 @@ unsigned int sf_encoding_index_to_subtype(int encoding_num);
/** @brief Get the string name of the specified container format
*
* AND format with SF_FORMAT_TYPEMASK to get only the container format and
- * then use SFC_GET_FORMAT_INFO to get the description
+ * then use SFC_GET_FORMAT_INFO to get the description
* @param format the libsndfile format to get the name for (only the container
* part is used) */
wxString sf_header_name(int format);
@@ -75,7 +75,7 @@ wxString sf_header_extension(int format);
/** @brief Get the string name of the specified data encoding
*
* AND encoding_num with SF_FORMAT_SUBMASK to get only the data encoding and
- * then use SFC_GET_FORMAT_INFO to get the description
+ * then use SFC_GET_FORMAT_INFO to get the description
* @param encoding_num the libsndfile encoding to get the name for (only the
* data encoding is used) */
wxString sf_encoding_name(int encoding_num);
diff --git a/src/FileIO.cpp b/src/FileIO.cpp
index f8974829f..9f98cb152 100644
--- a/src/FileIO.cpp
+++ b/src/FileIO.cpp
@@ -1,9 +1,9 @@
/**********************************************************************
Audacity: A Digital Audio Editor
-
+
FileIO.cpp
-
+
Leland Lucius
**********************************************************************/
@@ -72,7 +72,7 @@ void FileIO::Close()
// MacOS: set the file type/creator so that the OS knows it's an MP3
// file which was created by Audacity
-
+
void FileIO::SetCatalogInfo()
{
#ifdef __WXMAC__
@@ -124,6 +124,6 @@ wxOutputStream & FileIO::Write(const void *buf, size_t size)
if (mOutputStream == NULL) {
return *mOutputStream;
}
-
+
return mOutputStream->Write(buf, size);
}
diff --git a/src/FileIO.h b/src/FileIO.h
index 77f2971cb..be1290aec 100644
--- a/src/FileIO.h
+++ b/src/FileIO.h
@@ -1,9 +1,9 @@
/**********************************************************************
Audacity: A Digital Audio Editor
-
+
FileIO.h
-
+
Leland Lucius
**********************************************************************/
@@ -28,7 +28,7 @@ class FileIO
~FileIO();
bool IsOpened();
-
+
void Close();
wxInputStream & Read(void *buffer, size_t size);
diff --git a/src/FileNames.cpp b/src/FileNames.cpp
index 67da50cc4..e89cf3498 100644
--- a/src/FileNames.cpp
+++ b/src/FileNames.cpp
@@ -11,8 +11,8 @@
\class FileNames
\brief Provides Static functions to yield filenames.
-This class helps us with setting a base path, and makes it easier
-for us to keep track of the different kinds of files we read and write
+This class helps us with setting a base path, and makes it easier
+for us to keep track of the different kinds of files we read and write
from.
JKC: In time I plan to add all file names and file extensions
@@ -53,7 +53,7 @@ wxString FileNames::MkDir(const wxString &Str)
/// Returns the directory used for temp files.
/// \todo put a counter in here to see if it gets used a lot.
-/// if it does, then maybe we should cache the path name
+/// if it does, then maybe we should cache the path name
/// each time.
wxString FileNames::TempDir()
{
@@ -103,7 +103,7 @@ wxString FileNames::DataDir()
exePath.RemoveLastDir();
#endif
wxFileName portablePrefsPath(exePath.GetPath(), wxT("Portable Settings"));
-
+
if (::wxDirExists(portablePrefsPath.GetFullPath()))
{
// Use "Portable Settings" folder
@@ -121,7 +121,7 @@ wxString FileNames::DataDir()
gDataDir = FileNames::MkDir(dataDir);
}
}
-
+
return gDataDir;
}
@@ -133,16 +133,16 @@ wxString FileNames::HtmlHelpDir()
exePath.RemoveLastDir();
exePath.RemoveLastDir();
exePath.RemoveLastDir();
-
+
return wxFileName( exePath.GetPath()+wxT("/help/manual"), wxEmptyString ).GetFullPath();
#else
//linux goes into /*prefix*/share/audacity/
//windows goes into the dir containing the .exe
wxString exeDir = wxStandardPaths::Get().GetDataDir();
-
+
//for mac this puts us within the .app: Audacity.app/Contents/SharedSupport/
return wxFileName( exeDir+wxT("/help/manual"), wxEmptyString ).GetFullPath();
-#endif
+#endif
}
wxString FileNames::HtmlHelpIndexFile(bool quick)
@@ -236,7 +236,7 @@ wxString FileNames::PathFromAddr(void *addr)
}
#elif defined(__WXMSW__) && defined(_UNICODE)
// The GetModuleHandlEx() function did not appear until Windows XP and
- // GetModuleFileName() did appear until Windows 2000, so we have to
+ // GetModuleFileName() did appear until Windows 2000, so we have to
// check for them at runtime.
typedef BOOL (WINAPI *getmodulehandleex)(DWORD dwFlags, LPCWSTR lpModuleName, HMODULE* phModule);
typedef DWORD (WINAPI *getmodulefilename)(HMODULE hModule, LPWCH lpFilename, DWORD nSize);
diff --git a/src/FileNames.h b/src/FileNames.h
index 84b5fc8a3..f5b4bb641 100644
--- a/src/FileNames.h
+++ b/src/FileNames.h
@@ -60,7 +60,7 @@ public:
private:
// Private constructors: No one is ever going to instantiate it.
- //
+ //
FileNames(){;};
~FileNames(){;};
};
diff --git a/src/FreqWindow.cpp b/src/FreqWindow.cpp
index 8c68444e4..e6c3dd401 100644
--- a/src/FreqWindow.cpp
+++ b/src/FreqWindow.cpp
@@ -432,7 +432,7 @@ void FreqWindow::GetAudio()
}
t = iter.Next();
}
-
+
if (selcount == 0)
return;
@@ -477,7 +477,7 @@ void FreqWindow::DrawPlot()
}
mBitmap = new wxBitmap(mUpdateRect.width, mUpdateRect.height);
-
+
wxMemoryDC memDC;
memDC.SelectObject(*mBitmap);
diff --git a/src/HelpText.cpp b/src/HelpText.cpp
index d37dd8ffd..8f6d78706 100644
--- a/src/HelpText.cpp
+++ b/src/HelpText.cpp
@@ -186,12 +186,12 @@ static wxString HelpTextBuiltIn( const wxString & Key )
wxString(wxT("")) +
_("How to Get Help
") +
_("Welcome to Audacity ") + AUDACITY_VERSION_STRING + wxT("!") +
- _("These are our support methods:") + wxT("
") + wxT("- ") +
+ _("These are our support methods:") + wxT("