mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-18 17:10:05 +02:00
Merge branch 'master' into Escape-key
This commit is contained in:
commit
662d42178c
@ -966,6 +966,7 @@
|
|||||||
28D587CC0E264CF4009C7DEA /* LV2Effect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28D587C90E264CF4009C7DEA /* LV2Effect.cpp */; };
|
28D587CC0E264CF4009C7DEA /* LV2Effect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28D587C90E264CF4009C7DEA /* LV2Effect.cpp */; };
|
||||||
28D65C720B97E54B000E001A /* AutoDuck.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28D65C700B97E54B000E001A /* AutoDuck.cpp */; };
|
28D65C720B97E54B000E001A /* AutoDuck.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28D65C700B97E54B000E001A /* AutoDuck.cpp */; };
|
||||||
28D65C760B97E573000E001A /* DtmfGen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28D65C740B97E573000E001A /* DtmfGen.cpp */; };
|
28D65C760B97E573000E001A /* DtmfGen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28D65C740B97E573000E001A /* DtmfGen.cpp */; };
|
||||||
|
28D8425C1AD8D69D00551353 /* SelectedRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28D8425B1AD8D69D00551353 /* SelectedRegion.cpp */; };
|
||||||
28DA07390E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DA07380E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp */; };
|
28DA07390E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DA07380E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp */; };
|
||||||
28DABFBE0FF19DB100AC7848 /* RealFFTf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DABFBC0FF19DB100AC7848 /* RealFFTf.cpp */; };
|
28DABFBE0FF19DB100AC7848 /* RealFFTf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DABFBC0FF19DB100AC7848 /* RealFFTf.cpp */; };
|
||||||
28DB34790FDC2C5D0011F589 /* ResponseQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DB34780FDC2C5D0011F589 /* ResponseQueue.cpp */; };
|
28DB34790FDC2C5D0011F589 /* ResponseQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 28DB34780FDC2C5D0011F589 /* ResponseQueue.cpp */; };
|
||||||
@ -3757,6 +3758,8 @@
|
|||||||
28D65C710B97E54B000E001A /* AutoDuck.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = AutoDuck.h; sourceTree = "<group>"; tabWidth = 3; };
|
28D65C710B97E54B000E001A /* AutoDuck.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = AutoDuck.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||||
28D65C740B97E573000E001A /* DtmfGen.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = DtmfGen.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
28D65C740B97E573000E001A /* DtmfGen.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = DtmfGen.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||||
28D65C750B97E573000E001A /* DtmfGen.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = DtmfGen.h; sourceTree = "<group>"; tabWidth = 3; };
|
28D65C750B97E573000E001A /* DtmfGen.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = DtmfGen.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||||
|
28D8425A1AD8D69D00551353 /* RevisionIdent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RevisionIdent.h; sourceTree = "<group>"; };
|
||||||
|
28D8425B1AD8D69D00551353 /* SelectedRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectedRegion.cpp; sourceTree = "<group>"; };
|
||||||
28DA07370E4F5CEC003933C5 /* ExportFFmpegDialogs.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ExportFFmpegDialogs.h; sourceTree = "<group>"; tabWidth = 3; };
|
28DA07370E4F5CEC003933C5 /* ExportFFmpegDialogs.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ExportFFmpegDialogs.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||||
28DA07380E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ExportFFmpegDialogs.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
28DA07380E4F5CEC003933C5 /* ExportFFmpegDialogs.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ExportFFmpegDialogs.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||||
28DABFBC0FF19DB100AC7848 /* RealFFTf.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = RealFFTf.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
28DABFBC0FF19DB100AC7848 /* RealFFTf.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = RealFFTf.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||||
@ -5128,12 +5131,14 @@
|
|||||||
EDFCEBA318894B2A00C98E51 /* RealFFTf48x.h */,
|
EDFCEBA318894B2A00C98E51 /* RealFFTf48x.h */,
|
||||||
1790B0D209883BFD008A330A /* Resample.cpp */,
|
1790B0D209883BFD008A330A /* Resample.cpp */,
|
||||||
1790B0D309883BFD008A330A /* Resample.h */,
|
1790B0D309883BFD008A330A /* Resample.h */,
|
||||||
|
28D8425A1AD8D69D00551353 /* RevisionIdent.h */,
|
||||||
1790B0D409883BFD008A330A /* RingBuffer.cpp */,
|
1790B0D409883BFD008A330A /* RingBuffer.cpp */,
|
||||||
1790B0D509883BFD008A330A /* RingBuffer.h */,
|
1790B0D509883BFD008A330A /* RingBuffer.h */,
|
||||||
1790B0D609883BFD008A330A /* SampleFormat.cpp */,
|
1790B0D609883BFD008A330A /* SampleFormat.cpp */,
|
||||||
1790B0D709883BFD008A330A /* SampleFormat.h */,
|
1790B0D709883BFD008A330A /* SampleFormat.h */,
|
||||||
285DE1F80BF03C7800A20DF0 /* Screenshot.cpp */,
|
285DE1F80BF03C7800A20DF0 /* Screenshot.cpp */,
|
||||||
285DE1F90BF03C7800A20DF0 /* Screenshot.h */,
|
285DE1F90BF03C7800A20DF0 /* Screenshot.h */,
|
||||||
|
28D8425B1AD8D69D00551353 /* SelectedRegion.cpp */,
|
||||||
2813897919E6163C004111ED /* SelectedRegion.h */,
|
2813897919E6163C004111ED /* SelectedRegion.h */,
|
||||||
1790B0DA09883BFD008A330A /* Sequence.cpp */,
|
1790B0DA09883BFD008A330A /* Sequence.cpp */,
|
||||||
1790B0DB09883BFD008A330A /* Sequence.h */,
|
1790B0DB09883BFD008A330A /* Sequence.h */,
|
||||||
@ -9251,6 +9256,7 @@
|
|||||||
28BB98051A15BE6800D1CC80 /* NoiseReduction.cpp in Sources */,
|
28BB98051A15BE6800D1CC80 /* NoiseReduction.cpp in Sources */,
|
||||||
28285C801A27A81600BC2205 /* AudioUnitCocoaHelper.mm in Sources */,
|
28285C801A27A81600BC2205 /* AudioUnitCocoaHelper.mm in Sources */,
|
||||||
28D000A51A32920C00367B21 /* DeviceChange.cpp in Sources */,
|
28D000A51A32920C00367B21 /* DeviceChange.cpp in Sources */,
|
||||||
|
28D8425C1AD8D69D00551353 /* SelectedRegion.cpp in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -2130,8 +2130,6 @@ bool LabelTrack::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||||||
|
|
||||||
// loop through attrs, which is a null-terminated list of
|
// loop through attrs, which is a null-terminated list of
|
||||||
// attribute-value pairs
|
// attribute-value pairs
|
||||||
bool has_t1 = false;
|
|
||||||
double dblValue;
|
|
||||||
while(*attrs) {
|
while(*attrs) {
|
||||||
const wxChar *attr = *attrs++;
|
const wxChar *attr = *attrs++;
|
||||||
const wxChar *value = *attrs++;
|
const wxChar *value = *attrs++;
|
||||||
@ -2145,14 +2143,8 @@ bool LabelTrack::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("t")) && Internat::CompatibleToDouble(strValue, &dblValue))
|
if (selectedRegion.HandleXMLAttribute(attr, value, wxT("t"), wxT("t1")))
|
||||||
selectedRegion.setT0(dblValue, false);
|
;
|
||||||
else if (!wxStrcmp(attr, wxT("t1")) && Internat::CompatibleToDouble(strValue, &dblValue))
|
|
||||||
{
|
|
||||||
has_t1 = true;
|
|
||||||
selectedRegion.setT1(dblValue, false);
|
|
||||||
}
|
|
||||||
// PRL: to do: read other selection fields
|
|
||||||
else if (!wxStrcmp(attr, wxT("title")))
|
else if (!wxStrcmp(attr, wxT("title")))
|
||||||
title = strValue;
|
title = strValue;
|
||||||
|
|
||||||
@ -2160,8 +2152,10 @@ bool LabelTrack::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||||||
|
|
||||||
// Handle files created by Audacity 1.1. Labels in Audacity 1.1
|
// Handle files created by Audacity 1.1. Labels in Audacity 1.1
|
||||||
// did not have separate start- and end-times.
|
// did not have separate start- and end-times.
|
||||||
if (!has_t1)
|
// PRL: this superfluous now, given class SelectedRegion's internal
|
||||||
selectedRegion.collapseToT0();
|
// consistency guarantees
|
||||||
|
//if (selectedRegion.t1() < 0)
|
||||||
|
// selectedRegion.collapseToT0();
|
||||||
|
|
||||||
LabelStruct *l = new LabelStruct(selectedRegion, title);
|
LabelStruct *l = new LabelStruct(selectedRegion, title);
|
||||||
mLabels.Add(l);
|
mLabels.Add(l);
|
||||||
@ -2230,9 +2224,8 @@ void LabelTrack::WriteXML(XMLWriter &xmlFile)
|
|||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
xmlFile.StartTag(wxT("label"));
|
xmlFile.StartTag(wxT("label"));
|
||||||
// PRL: mismatch of attribute name and structure field name, historical
|
mLabels[i]->getSelectedRegion()
|
||||||
xmlFile.WriteAttr(wxT("t"), mLabels[i]->getT0(), 8);
|
.WriteXMLAttributes(xmlFile, wxT("t"), wxT("t1"));
|
||||||
xmlFile.WriteAttr(wxT("t1"), mLabels[i]->getT1(), 8);
|
|
||||||
// PRL: to do: write other selection fields
|
// PRL: to do: write other selection fields
|
||||||
xmlFile.WriteAttr(wxT("title"), mLabels[i]->title);
|
xmlFile.WriteAttr(wxT("title"), mLabels[i]->title);
|
||||||
xmlFile.EndTag(wxT("label"));
|
xmlFile.EndTag(wxT("label"));
|
||||||
|
@ -56,6 +56,7 @@ public:
|
|||||||
void DrawTextBox( wxDC & dc, const wxRect & r);
|
void DrawTextBox( wxDC & dc, const wxRect & r);
|
||||||
void DrawHighlight( wxDC & dc, int xPos1, int xPos2, int charHeight);
|
void DrawHighlight( wxDC & dc, int xPos1, int xPos2, int charHeight);
|
||||||
void getXPos( wxDC & dc, int * xPos1, int cursorPos);
|
void getXPos( wxDC & dc, int * xPos1, int cursorPos);
|
||||||
|
const SelectedRegion &getSelectedRegion() const { return selectedRegion; }
|
||||||
double getDuration() const { return selectedRegion.duration(); }
|
double getDuration() const { return selectedRegion.duration(); }
|
||||||
double getT0() const { return selectedRegion.t0(); }
|
double getT0() const { return selectedRegion.t0(); }
|
||||||
double getT1() const { return selectedRegion.t1(); }
|
double getT1() const { return selectedRegion.t1(); }
|
||||||
@ -169,11 +170,11 @@ class AUDACITY_DLL_API LabelTrack : public Track
|
|||||||
static bool IsTextClipSupported();
|
static bool IsTextClipSupported();
|
||||||
|
|
||||||
// methods to set flags
|
// methods to set flags
|
||||||
void SetDragXPos(const int d) { mDragXPos = d; };
|
void SetDragXPos(const int d) { mDragXPos = d; }
|
||||||
void SetInBox(bool inTextBox) { mInBox = inTextBox; };
|
void SetInBox(bool inTextBox) { mInBox = inTextBox; }
|
||||||
void SetResetCursorPos(bool resetFlag) { mResetCursorPos = resetFlag; };
|
void SetResetCursorPos(bool resetFlag) { mResetCursorPos = resetFlag; }
|
||||||
void SetWrongDragging(bool rightFlag) { mRightDragging = rightFlag; };
|
void SetWrongDragging(bool rightFlag) { mRightDragging = rightFlag; }
|
||||||
void SetDrawCursor(bool drawCursorFlag) { mDrawCursor = drawCursorFlag; };
|
void SetDrawCursor(bool drawCursorFlag) { mDrawCursor = drawCursorFlag; }
|
||||||
|
|
||||||
bool HandleMouse(const wxMouseEvent & evt, wxRect & r, double h, double pps,
|
bool HandleMouse(const wxMouseEvent & evt, wxRect & r, double h, double pps,
|
||||||
SelectedRegion *newSel);
|
SelectedRegion *newSel);
|
||||||
@ -202,7 +203,7 @@ class AUDACITY_DLL_API LabelTrack : public Track
|
|||||||
|
|
||||||
//get current cursor position
|
//get current cursor position
|
||||||
bool CalcCursorX(wxWindow * parent, int * x);
|
bool CalcCursorX(wxWindow * parent, int * x);
|
||||||
int getCurrentCursorPosition() const { return mCurrentCursorPos; };
|
int getCurrentCursorPosition() const { return mCurrentCursorPos; }
|
||||||
|
|
||||||
void MayAdjustLabel( int iLabel, int iEdge, bool bAllowSwapping, double fNewTime);
|
void MayAdjustLabel( int iLabel, int iEdge, bool bAllowSwapping, double fNewTime);
|
||||||
void MayMoveLabel( int iLabel, int iEdge, double fNewTime);
|
void MayMoveLabel( int iLabel, int iEdge, double fNewTime);
|
||||||
|
@ -185,10 +185,12 @@ audacity_SOURCES = \
|
|||||||
RealFFTf48x.h \
|
RealFFTf48x.h \
|
||||||
Resample.cpp \
|
Resample.cpp \
|
||||||
Resample.h \
|
Resample.h \
|
||||||
|
RevisionIdent.h \
|
||||||
RingBuffer.cpp \
|
RingBuffer.cpp \
|
||||||
RingBuffer.h \
|
RingBuffer.h \
|
||||||
Screenshot.cpp \
|
Screenshot.cpp \
|
||||||
Screenshot.h \
|
Screenshot.h \
|
||||||
|
SelectedRegion.cpp \
|
||||||
SelectedRegion.h \
|
SelectedRegion.h \
|
||||||
Shuttle.cpp \
|
Shuttle.cpp \
|
||||||
Shuttle.h \
|
Shuttle.h \
|
||||||
|
@ -304,12 +304,12 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \
|
|||||||
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \
|
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \
|
||||||
Profiler.cpp Profiler.h Project.cpp Project.h RealFFTf.cpp \
|
Profiler.cpp Profiler.h Project.cpp Project.h RealFFTf.cpp \
|
||||||
RealFFTf.h RealFFTf48x.cpp RealFFTf48x.h Resample.cpp \
|
RealFFTf.h RealFFTf48x.cpp RealFFTf48x.h Resample.cpp \
|
||||||
Resample.h RingBuffer.cpp RingBuffer.h Screenshot.cpp \
|
Resample.h RevisionIdent.h RingBuffer.cpp RingBuffer.h \
|
||||||
Screenshot.h SelectedRegion.h Shuttle.cpp Shuttle.h \
|
Screenshot.cpp Screenshot.h SelectedRegion.cpp \
|
||||||
ShuttleGui.cpp ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h \
|
SelectedRegion.h Shuttle.cpp Shuttle.h ShuttleGui.cpp \
|
||||||
Snap.cpp Snap.h SoundActivatedRecord.cpp \
|
ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \
|
||||||
SoundActivatedRecord.h Spectrum.cpp Spectrum.h \
|
SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \
|
||||||
SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \
|
Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \
|
||||||
SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \
|
SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \
|
||||||
ThemeAsCeeCode.h TimeDialog.cpp TimeDialog.h \
|
ThemeAsCeeCode.h TimeDialog.cpp TimeDialog.h \
|
||||||
TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \
|
TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \
|
||||||
@ -546,7 +546,8 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \
|
|||||||
audacity-Profiler.$(OBJEXT) audacity-Project.$(OBJEXT) \
|
audacity-Profiler.$(OBJEXT) audacity-Project.$(OBJEXT) \
|
||||||
audacity-RealFFTf.$(OBJEXT) audacity-RealFFTf48x.$(OBJEXT) \
|
audacity-RealFFTf.$(OBJEXT) audacity-RealFFTf48x.$(OBJEXT) \
|
||||||
audacity-Resample.$(OBJEXT) audacity-RingBuffer.$(OBJEXT) \
|
audacity-Resample.$(OBJEXT) audacity-RingBuffer.$(OBJEXT) \
|
||||||
audacity-Screenshot.$(OBJEXT) audacity-Shuttle.$(OBJEXT) \
|
audacity-Screenshot.$(OBJEXT) \
|
||||||
|
audacity-SelectedRegion.$(OBJEXT) audacity-Shuttle.$(OBJEXT) \
|
||||||
audacity-ShuttleGui.$(OBJEXT) audacity-ShuttlePrefs.$(OBJEXT) \
|
audacity-ShuttleGui.$(OBJEXT) audacity-ShuttlePrefs.$(OBJEXT) \
|
||||||
audacity-Snap.$(OBJEXT) \
|
audacity-Snap.$(OBJEXT) \
|
||||||
audacity-SoundActivatedRecord.$(OBJEXT) \
|
audacity-SoundActivatedRecord.$(OBJEXT) \
|
||||||
@ -1173,12 +1174,12 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \
|
|||||||
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \
|
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \
|
||||||
Profiler.cpp Profiler.h Project.cpp Project.h RealFFTf.cpp \
|
Profiler.cpp Profiler.h Project.cpp Project.h RealFFTf.cpp \
|
||||||
RealFFTf.h RealFFTf48x.cpp RealFFTf48x.h Resample.cpp \
|
RealFFTf.h RealFFTf48x.cpp RealFFTf48x.h Resample.cpp \
|
||||||
Resample.h RingBuffer.cpp RingBuffer.h Screenshot.cpp \
|
Resample.h RevisionIdent.h RingBuffer.cpp RingBuffer.h \
|
||||||
Screenshot.h SelectedRegion.h Shuttle.cpp Shuttle.h \
|
Screenshot.cpp Screenshot.h SelectedRegion.cpp \
|
||||||
ShuttleGui.cpp ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h \
|
SelectedRegion.h Shuttle.cpp Shuttle.h ShuttleGui.cpp \
|
||||||
Snap.cpp Snap.h SoundActivatedRecord.cpp \
|
ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \
|
||||||
SoundActivatedRecord.h Spectrum.cpp Spectrum.h \
|
SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \
|
||||||
SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \
|
Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \
|
||||||
SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \
|
SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \
|
||||||
ThemeAsCeeCode.h TimeDialog.cpp TimeDialog.h \
|
ThemeAsCeeCode.h TimeDialog.cpp TimeDialog.h \
|
||||||
TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \
|
TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \
|
||||||
@ -2029,6 +2030,7 @@ distclean-compile:
|
|||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-RingBuffer.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-RingBuffer.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-SampleFormat.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-SampleFormat.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Screenshot.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Screenshot.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-SelectedRegion.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Sequence.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Sequence.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Shuttle.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Shuttle.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ShuttleGui.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ShuttleGui.Po@am__quote@
|
||||||
@ -3266,6 +3268,20 @@ audacity-Screenshot.obj: Screenshot.cpp
|
|||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-Screenshot.obj `if test -f 'Screenshot.cpp'; then $(CYGPATH_W) 'Screenshot.cpp'; else $(CYGPATH_W) '$(srcdir)/Screenshot.cpp'; fi`
|
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-Screenshot.obj `if test -f 'Screenshot.cpp'; then $(CYGPATH_W) 'Screenshot.cpp'; else $(CYGPATH_W) '$(srcdir)/Screenshot.cpp'; fi`
|
||||||
|
|
||||||
|
audacity-SelectedRegion.o: SelectedRegion.cpp
|
||||||
|
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-SelectedRegion.o -MD -MP -MF $(DEPDIR)/audacity-SelectedRegion.Tpo -c -o audacity-SelectedRegion.o `test -f 'SelectedRegion.cpp' || echo '$(srcdir)/'`SelectedRegion.cpp
|
||||||
|
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-SelectedRegion.Tpo $(DEPDIR)/audacity-SelectedRegion.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SelectedRegion.cpp' object='audacity-SelectedRegion.o' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-SelectedRegion.o `test -f 'SelectedRegion.cpp' || echo '$(srcdir)/'`SelectedRegion.cpp
|
||||||
|
|
||||||
|
audacity-SelectedRegion.obj: SelectedRegion.cpp
|
||||||
|
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-SelectedRegion.obj -MD -MP -MF $(DEPDIR)/audacity-SelectedRegion.Tpo -c -o audacity-SelectedRegion.obj `if test -f 'SelectedRegion.cpp'; then $(CYGPATH_W) 'SelectedRegion.cpp'; else $(CYGPATH_W) '$(srcdir)/SelectedRegion.cpp'; fi`
|
||||||
|
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-SelectedRegion.Tpo $(DEPDIR)/audacity-SelectedRegion.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SelectedRegion.cpp' object='audacity-SelectedRegion.obj' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-SelectedRegion.obj `if test -f 'SelectedRegion.cpp'; then $(CYGPATH_W) 'SelectedRegion.cpp'; else $(CYGPATH_W) '$(srcdir)/SelectedRegion.cpp'; fi`
|
||||||
|
|
||||||
audacity-Shuttle.o: Shuttle.cpp
|
audacity-Shuttle.o: Shuttle.cpp
|
||||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-Shuttle.o -MD -MP -MF $(DEPDIR)/audacity-Shuttle.Tpo -c -o audacity-Shuttle.o `test -f 'Shuttle.cpp' || echo '$(srcdir)/'`Shuttle.cpp
|
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-Shuttle.o -MD -MP -MF $(DEPDIR)/audacity-Shuttle.Tpo -c -o audacity-Shuttle.o `test -f 'Shuttle.cpp' || echo '$(srcdir)/'`Shuttle.cpp
|
||||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-Shuttle.Tpo $(DEPDIR)/audacity-Shuttle.Po
|
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-Shuttle.Tpo $(DEPDIR)/audacity-Shuttle.Po
|
||||||
|
@ -1214,6 +1214,10 @@ void AudacityProject::CreateMenusAndCommands()
|
|||||||
AudioIOBusyFlag);
|
AudioIOBusyFlag);
|
||||||
c->AddCommand(wxT("PlayOneSec"), _("Play One Second"), FN(OnPlayOneSecond), wxT("1"));
|
c->AddCommand(wxT("PlayOneSec"), _("Play One Second"), FN(OnPlayOneSecond), wxT("1"));
|
||||||
c->AddCommand(wxT("PlayToSelection"),_("Play To Selection"), FN(OnPlayToSelection), wxT("B"));
|
c->AddCommand(wxT("PlayToSelection"),_("Play To Selection"), FN(OnPlayToSelection), wxT("B"));
|
||||||
|
c->AddCommand(wxT("PlayBeforeSelectionStart"),_("Play Before Selection Start"), FN(OnPlayBeforeSelectionStart), wxT("Shift+F5"));
|
||||||
|
c->AddCommand(wxT("PlayAfterSelectionStart"),_("Play After Selection Start"), FN(OnPlayAfterSelectionStart), wxT("Shift+F6"));
|
||||||
|
c->AddCommand(wxT("PlayBeforeSelectionEnd"),_("Play Before Selection End"), FN(OnPlayBeforeSelectionEnd), wxT("Shift+F7"));
|
||||||
|
c->AddCommand(wxT("PlayAfterSelectionEnd"),_("Play After Selection End"), FN(OnPlayAfterSelectionEnd), wxT("Shift+F8"));
|
||||||
c->AddCommand(wxT("PlayCutPreview"), _("Play Cut Preview"), FN(OnPlayCutPreview), wxT("C"));
|
c->AddCommand(wxT("PlayCutPreview"), _("Play Cut Preview"), FN(OnPlayCutPreview), wxT("C"));
|
||||||
|
|
||||||
c->AddCommand(wxT("SelStart"), _("Selection to Start"), FN(OnSelToStart), wxT("Shift+Home"));
|
c->AddCommand(wxT("SelStart"), _("Selection to Start"), FN(OnSelToStart), wxT("Shift+Home"));
|
||||||
@ -2252,6 +2256,74 @@ void AudacityProject::OnPlayToSelection()
|
|||||||
GetControlToolBar()->PlayPlayRegion(t0, t1);
|
GetControlToolBar()->PlayPlayRegion(t0, t1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The next 4 functions provide a limited version of the
|
||||||
|
// functionality of OnPlayToSelection() for keyboard users
|
||||||
|
|
||||||
|
void AudacityProject::OnPlayBeforeSelectionStart()
|
||||||
|
{
|
||||||
|
if( !MakeReadyToPlay() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
double t0 = mViewInfo.selectedRegion.t0();
|
||||||
|
double beforeLen;
|
||||||
|
gPrefs->Read(wxT("/AudioIO/CutPreviewBeforeLen"), &beforeLen, 2.0);
|
||||||
|
|
||||||
|
mLastPlayMode = oneSecondPlay; // this disables auto scrolling, as in OnPlayToSelection()
|
||||||
|
|
||||||
|
GetControlToolBar()->PlayPlayRegion(t0 - beforeLen, t0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AudacityProject::OnPlayAfterSelectionStart()
|
||||||
|
{
|
||||||
|
if( !MakeReadyToPlay() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
double t0 = mViewInfo.selectedRegion.t0();
|
||||||
|
double t1 = mViewInfo.selectedRegion.t1();
|
||||||
|
double afterLen;
|
||||||
|
gPrefs->Read(wxT("/AudioIO/CutPreviewAfterLen"), &afterLen, 1.0);
|
||||||
|
|
||||||
|
mLastPlayMode = oneSecondPlay; // this disables auto scrolling, as in OnPlayToSelection()
|
||||||
|
|
||||||
|
if ( t1 - t0 > 0.0 && t1 - t0 < afterLen )
|
||||||
|
GetControlToolBar()->PlayPlayRegion(t0, t1);
|
||||||
|
else
|
||||||
|
GetControlToolBar()->PlayPlayRegion(t0, t0 + afterLen);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AudacityProject::OnPlayBeforeSelectionEnd()
|
||||||
|
{
|
||||||
|
if( !MakeReadyToPlay() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
double t0 = mViewInfo.selectedRegion.t0();
|
||||||
|
double t1 = mViewInfo.selectedRegion.t1();
|
||||||
|
double beforeLen;
|
||||||
|
gPrefs->Read(wxT("/AudioIO/CutPreviewBeforeLen"), &beforeLen, 1.0);
|
||||||
|
|
||||||
|
mLastPlayMode = oneSecondPlay; // this disables auto scrolling, as in OnPlayToSelection()
|
||||||
|
|
||||||
|
if ( t1 - t0 > 0.0 && t1 - t0 < beforeLen )
|
||||||
|
GetControlToolBar()->PlayPlayRegion(t0, t1);
|
||||||
|
else
|
||||||
|
GetControlToolBar()->PlayPlayRegion(t1 - beforeLen, t1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AudacityProject::OnPlayAfterSelectionEnd()
|
||||||
|
{
|
||||||
|
if( !MakeReadyToPlay() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
double t1 = mViewInfo.selectedRegion.t1();
|
||||||
|
double afterLen;
|
||||||
|
gPrefs->Read(wxT("/AudioIO/CutPreviewAfterLen"), &afterLen, 1.0);
|
||||||
|
|
||||||
|
mLastPlayMode = oneSecondPlay; // this disables auto scrolling, as in OnPlayToSelection()
|
||||||
|
|
||||||
|
GetControlToolBar()->PlayPlayRegion(t1, t1 + afterLen);
|
||||||
|
}
|
||||||
|
|
||||||
void AudacityProject::OnPlayLooped()
|
void AudacityProject::OnPlayLooped()
|
||||||
{
|
{
|
||||||
if( !MakeReadyToPlay(true) )
|
if( !MakeReadyToPlay(true) )
|
||||||
|
@ -93,6 +93,10 @@ void OnPlayStop();
|
|||||||
void OnPlayStopSelect();
|
void OnPlayStopSelect();
|
||||||
void OnPlayOneSecond();
|
void OnPlayOneSecond();
|
||||||
void OnPlayToSelection();
|
void OnPlayToSelection();
|
||||||
|
void OnPlayBeforeSelectionStart();
|
||||||
|
void OnPlayAfterSelectionStart();
|
||||||
|
void OnPlayBeforeSelectionEnd();
|
||||||
|
void OnPlayAfterSelectionEnd();
|
||||||
void OnPlayLooped();
|
void OnPlayLooped();
|
||||||
void OnPlayCutPreview();
|
void OnPlayCutPreview();
|
||||||
|
|
||||||
|
@ -741,6 +741,8 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
|||||||
Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample)),
|
Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample)),
|
||||||
mSnapTo(gPrefs->Read(wxT("/SnapTo"), SNAP_OFF)),
|
mSnapTo(gPrefs->Read(wxT("/SnapTo"), SNAP_OFF)),
|
||||||
mSelectionFormat(gPrefs->Read(wxT("/SelectionFormat"), wxT(""))),
|
mSelectionFormat(gPrefs->Read(wxT("/SelectionFormat"), wxT(""))),
|
||||||
|
mFrequencySelectionFormatName(gPrefs->Read(wxT("/FrequencySelectionFormatName"), wxT(""))),
|
||||||
|
mBandwidthSelectionFormatName(gPrefs->Read(wxT("/BandwidthSelectionFormatName"), wxT(""))),
|
||||||
mDirty(false),
|
mDirty(false),
|
||||||
mRuler(NULL),
|
mRuler(NULL),
|
||||||
mTrackPanel(NULL),
|
mTrackPanel(NULL),
|
||||||
@ -773,6 +775,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
|||||||
mLastEffectType(0),
|
mLastEffectType(0),
|
||||||
mTimerRecordCanceled(false),
|
mTimerRecordCanceled(false),
|
||||||
mMenuClose(false)
|
mMenuClose(false)
|
||||||
|
, mbInitializingScrollbar(false)
|
||||||
{
|
{
|
||||||
int widths[] = {-2, -1};
|
int widths[] = {-2, -1};
|
||||||
mStatusBar = CreateStatusBar(2);
|
mStatusBar = CreateStatusBar(2);
|
||||||
@ -1253,16 +1256,16 @@ void AudacityProject::SSBL_SetFrequencySelectionFormatName(const wxString & form
|
|||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
const wxString & AudacityProject::SSBL_GetLogFrequencySelectionFormatName()
|
const wxString & AudacityProject::SSBL_GetBandwidthSelectionFormatName()
|
||||||
{
|
{
|
||||||
return GetLogFrequencySelectionFormatName();
|
return GetBandwidthSelectionFormatName();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudacityProject::SSBL_SetLogFrequencySelectionFormatName(const wxString & formatName)
|
void AudacityProject::SSBL_SetBandwidthSelectionFormatName(const wxString & formatName)
|
||||||
{
|
{
|
||||||
mLogFrequencySelectionFormatName = formatName;
|
mBandwidthSelectionFormatName = formatName;
|
||||||
|
|
||||||
gPrefs->Write(wxT("/LogFrequencySelectionFormatName"), mLogFrequencySelectionFormatName);
|
gPrefs->Write(wxT("/BandwidthSelectionFormatName"), mBandwidthSelectionFormatName);
|
||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1299,17 +1302,17 @@ void AudacityProject::SetFrequencySelectionFormatName(const wxString & formatNam
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const wxString & AudacityProject::GetLogFrequencySelectionFormatName() const
|
const wxString & AudacityProject::GetBandwidthSelectionFormatName() const
|
||||||
{
|
{
|
||||||
return mLogFrequencySelectionFormatName;
|
return mBandwidthSelectionFormatName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudacityProject::SetLogFrequencySelectionFormatName(const wxString & formatName)
|
void AudacityProject::SetBandwidthSelectionFormatName(const wxString & formatName)
|
||||||
{
|
{
|
||||||
SSBL_SetLogFrequencySelectionFormatName(formatName);
|
SSBL_SetBandwidthSelectionFormatName(formatName);
|
||||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
if (GetSpectralSelectionBar()) {
|
if (GetSpectralSelectionBar()) {
|
||||||
GetSpectralSelectionBar()->SetLogFrequencySelectionFormatName(formatName);
|
GetSpectralSelectionBar()->SetBandwidthSelectionFormatName(formatName);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1508,7 +1511,16 @@ void AudacityProject::FixScrollbars()
|
|||||||
mViewInfo.sbarH = (wxInt64) (mViewInfo.h * mViewInfo.zoom);
|
mViewInfo.sbarH = (wxInt64) (mViewInfo.h * mViewInfo.zoom);
|
||||||
|
|
||||||
int lastv = mViewInfo.vpos;
|
int lastv = mViewInfo.vpos;
|
||||||
|
// PRL: Can someone else find a more elegant solution to bug 812, than
|
||||||
|
// introducing this boolean member variable?
|
||||||
|
// Setting mVSbar earlier, int HandlXMLTag, didn't succeed in restoring
|
||||||
|
// the vertical scrollbar to its saved position. So defer that till now.
|
||||||
|
// mbInitializingScrollbar should be true only at the start of the life
|
||||||
|
// of an AudacityProject reopened from disk.
|
||||||
|
if (!mbInitializingScrollbar) {
|
||||||
mViewInfo.vpos = mVsbar->GetThumbPosition() * mViewInfo.scrollStep;
|
mViewInfo.vpos = mVsbar->GetThumbPosition() * mViewInfo.scrollStep;
|
||||||
|
}
|
||||||
|
mbInitializingScrollbar = false;
|
||||||
|
|
||||||
if (mViewInfo.vpos >= totalHeight)
|
if (mViewInfo.vpos >= totalHeight)
|
||||||
mViewInfo.vpos = totalHeight - 1;
|
mViewInfo.vpos = totalHeight - 1;
|
||||||
@ -2808,6 +2820,7 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||||||
wxString fileVersion = _("<unrecognized version -- possibly corrupt project file>");
|
wxString fileVersion = _("<unrecognized version -- possibly corrupt project file>");
|
||||||
wxString audacityVersion = _("<unrecognized version -- possibly corrupt project file>");
|
wxString audacityVersion = _("<unrecognized version -- possibly corrupt project file>");
|
||||||
int requiredTags = 0;
|
int requiredTags = 0;
|
||||||
|
long longVpos = 0;
|
||||||
|
|
||||||
// loop through attrs, which is a null-terminated list of
|
// loop through attrs, which is a null-terminated list of
|
||||||
// attribute-value pairs
|
// attribute-value pairs
|
||||||
@ -2834,19 +2847,19 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("version")))
|
else if (!wxStrcmp(attr, wxT("version")))
|
||||||
{
|
{
|
||||||
fileVersion = value;
|
fileVersion = value;
|
||||||
bFileVersionFound = true;
|
bFileVersionFound = true;
|
||||||
requiredTags++;
|
requiredTags++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("audacityversion"))) {
|
else if (!wxStrcmp(attr, wxT("audacityversion"))) {
|
||||||
audacityVersion = value;
|
audacityVersion = value;
|
||||||
requiredTags++;
|
requiredTags++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("projname"))) {
|
else if (!wxStrcmp(attr, wxT("projname"))) {
|
||||||
wxString projName;
|
wxString projName;
|
||||||
wxString projPath;
|
wxString projPath;
|
||||||
|
|
||||||
@ -2911,46 +2924,46 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||||||
requiredTags++;
|
requiredTags++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("sel0"))) {
|
else if (mViewInfo.selectedRegion
|
||||||
double t0;
|
.HandleXMLAttribute(attr, value, wxT("sel0"), wxT("sel1"))) {
|
||||||
Internat::CompatibleToDouble(value, &t0);
|
|
||||||
mViewInfo.selectedRegion.setT0(t0, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("sel1"))) {
|
else if (!wxStrcmp(attr, wxT("vpos")))
|
||||||
double t1;
|
// Just assign a variable, put the value in its place later
|
||||||
Internat::CompatibleToDouble(value, &t1);
|
|
||||||
mViewInfo.selectedRegion.setT1(t1, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// PRL: to do: persistence of other fields of the selection
|
|
||||||
|
|
||||||
long longVpos = 0;
|
|
||||||
if (!wxStrcmp(attr, wxT("vpos")))
|
|
||||||
wxString(value).ToLong(&longVpos);
|
wxString(value).ToLong(&longVpos);
|
||||||
mViewInfo.track = NULL;
|
|
||||||
mViewInfo.vpos = longVpos;
|
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("h")))
|
else if (!wxStrcmp(attr, wxT("h")))
|
||||||
Internat::CompatibleToDouble(value, &mViewInfo.h);
|
Internat::CompatibleToDouble(value, &mViewInfo.h);
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("zoom")))
|
else if (!wxStrcmp(attr, wxT("zoom")))
|
||||||
Internat::CompatibleToDouble(value, &mViewInfo.zoom);
|
Internat::CompatibleToDouble(value, &mViewInfo.zoom);
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("rate"))) {
|
else if (!wxStrcmp(attr, wxT("rate"))) {
|
||||||
Internat::CompatibleToDouble(value, &mRate);
|
Internat::CompatibleToDouble(value, &mRate);
|
||||||
GetSelectionBar()->SetRate(mRate);
|
GetSelectionBar()->SetRate(mRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("snapto"))) {
|
else if (!wxStrcmp(attr, wxT("snapto"))) {
|
||||||
SetSnapTo(wxString(value) == wxT("on") ? true : false);
|
SetSnapTo(wxString(value) == wxT("on") ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wxStrcmp(attr, wxT("selectionformat"))) {
|
else if (!wxStrcmp(attr, wxT("selectionformat")))
|
||||||
SetSelectionFormat(value);
|
SetSelectionFormat(value);
|
||||||
}
|
|
||||||
|
else if (!wxStrcmp(attr, wxT("frequencyformat")))
|
||||||
|
SetFrequencySelectionFormatName(value);
|
||||||
|
|
||||||
|
else if (!wxStrcmp(attr, wxT("bandwidthformat")))
|
||||||
|
SetBandwidthSelectionFormatName(value);
|
||||||
} // while
|
} // while
|
||||||
|
|
||||||
|
if (longVpos != 0) {
|
||||||
|
// PRL: It seems this must happen after SetSnapTo
|
||||||
|
mViewInfo.track = NULL;
|
||||||
|
mViewInfo.vpos = longVpos;
|
||||||
|
mbInitializingScrollbar = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Specifically detect newer versions of Audacity
|
// Specifically detect newer versions of Audacity
|
||||||
// WARNING: This will need review/revision if we ever have a version string
|
// WARNING: This will need review/revision if we ever have a version string
|
||||||
// such as 1.5.10, i.e. with 2 digit numbers.
|
// such as 1.5.10, i.e. with 2 digit numbers.
|
||||||
@ -3117,8 +3130,8 @@ void AudacityProject::WriteXML(XMLWriter &xmlFile)
|
|||||||
xmlFile.WriteAttr(wxT("projname"), projName);
|
xmlFile.WriteAttr(wxT("projname"), projName);
|
||||||
xmlFile.WriteAttr(wxT("version"), wxT(AUDACITY_FILE_FORMAT_VERSION));
|
xmlFile.WriteAttr(wxT("version"), wxT(AUDACITY_FILE_FORMAT_VERSION));
|
||||||
xmlFile.WriteAttr(wxT("audacityversion"), AUDACITY_VERSION_STRING);
|
xmlFile.WriteAttr(wxT("audacityversion"), AUDACITY_VERSION_STRING);
|
||||||
xmlFile.WriteAttr(wxT("sel0"), mViewInfo.selectedRegion.t0(), 10);
|
mViewInfo.selectedRegion
|
||||||
xmlFile.WriteAttr(wxT("sel1"), mViewInfo.selectedRegion.t1(), 10);
|
.WriteXMLAttributes(xmlFile, wxT("sel0"), wxT("sel1"));
|
||||||
// PRL: to do: persistence of other fields of the selection
|
// PRL: to do: persistence of other fields of the selection
|
||||||
xmlFile.WriteAttr(wxT("vpos"), mViewInfo.vpos);
|
xmlFile.WriteAttr(wxT("vpos"), mViewInfo.vpos);
|
||||||
xmlFile.WriteAttr(wxT("h"), mViewInfo.h, 10);
|
xmlFile.WriteAttr(wxT("h"), mViewInfo.h, 10);
|
||||||
@ -3126,6 +3139,8 @@ void AudacityProject::WriteXML(XMLWriter &xmlFile)
|
|||||||
xmlFile.WriteAttr(wxT("rate"), mRate);
|
xmlFile.WriteAttr(wxT("rate"), mRate);
|
||||||
xmlFile.WriteAttr(wxT("snapto"), GetSnapTo() ? wxT("on") : wxT("off"));
|
xmlFile.WriteAttr(wxT("snapto"), GetSnapTo() ? wxT("on") : wxT("off"));
|
||||||
xmlFile.WriteAttr(wxT("selectionformat"), GetSelectionFormat());
|
xmlFile.WriteAttr(wxT("selectionformat"), GetSelectionFormat());
|
||||||
|
xmlFile.WriteAttr(wxT("frequencyformat"), GetFrequencySelectionFormatName());
|
||||||
|
xmlFile.WriteAttr(wxT("bandwidthformat"), GetBandwidthSelectionFormatName());
|
||||||
|
|
||||||
mTags->WriteXML(xmlFile);
|
mTags->WriteXML(xmlFile);
|
||||||
|
|
||||||
|
@ -110,10 +110,10 @@ enum PlayMode {
|
|||||||
class ImportXMLTagHandler : public XMLTagHandler
|
class ImportXMLTagHandler : public XMLTagHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ImportXMLTagHandler(AudacityProject* pProject) { mProject = pProject; };
|
ImportXMLTagHandler(AudacityProject* pProject) { mProject = pProject; }
|
||||||
|
|
||||||
virtual bool HandleXMLTag(const wxChar *tag, const wxChar **attrs);
|
virtual bool HandleXMLTag(const wxChar *tag, const wxChar **attrs);
|
||||||
virtual XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag)) { return NULL; };
|
virtual XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag)) { return NULL; }
|
||||||
|
|
||||||
// Don't want a WriteXML method because ImportXMLTagHandler is not a WaveTrack.
|
// Don't want a WriteXML method because ImportXMLTagHandler is not a WaveTrack.
|
||||||
// <import> tags are instead written by AudacityProject::WriteXML.
|
// <import> tags are instead written by AudacityProject::WriteXML.
|
||||||
@ -135,7 +135,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
const wxPoint & pos, const wxSize & size);
|
const wxPoint & pos, const wxSize & size);
|
||||||
virtual ~AudacityProject();
|
virtual ~AudacityProject();
|
||||||
|
|
||||||
TrackList *GetTracks() { return mTracks; };
|
TrackList *GetTracks() { return mTracks; }
|
||||||
UndoManager *GetUndoManager() { return &mUndoManager; }
|
UndoManager *GetUndoManager() { return &mUndoManager; }
|
||||||
|
|
||||||
sampleFormat GetDefaultFormat() { return mDefaultFormat; }
|
sampleFormat GetDefaultFormat() { return mDefaultFormat; }
|
||||||
@ -221,7 +221,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
bool GetDirty() { return mDirty; }
|
bool GetDirty() { return mDirty; }
|
||||||
void SetProjectTitle();
|
void SetProjectTitle();
|
||||||
|
|
||||||
TrackPanel * GetTrackPanel(){return mTrackPanel;};
|
TrackPanel * GetTrackPanel(){return mTrackPanel;}
|
||||||
|
|
||||||
bool GetIsEmpty() { return mTracks->IsEmpty(); }
|
bool GetIsEmpty() { return mTracks->IsEmpty(); }
|
||||||
|
|
||||||
@ -327,8 +327,8 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
void SetFrequencySelectionFormatName(const wxString & format);
|
void SetFrequencySelectionFormatName(const wxString & format);
|
||||||
const wxString & GetFrequencySelectionFormatName() const;
|
const wxString & GetFrequencySelectionFormatName() const;
|
||||||
|
|
||||||
void SetLogFrequencySelectionFormatName(const wxString & format);
|
void SetBandwidthSelectionFormatName(const wxString & format);
|
||||||
const wxString & GetLogFrequencySelectionFormatName() const;
|
const wxString & GetBandwidthSelectionFormatName() const;
|
||||||
|
|
||||||
// Scrollbars
|
// Scrollbars
|
||||||
|
|
||||||
@ -387,8 +387,8 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
Meter *GetCaptureMeter();
|
Meter *GetCaptureMeter();
|
||||||
void SetCaptureMeter(Meter *capture);
|
void SetCaptureMeter(Meter *capture);
|
||||||
|
|
||||||
LyricsWindow* GetLyricsWindow() { return mLyricsWindow; };
|
LyricsWindow* GetLyricsWindow() { return mLyricsWindow; }
|
||||||
MixerBoard* GetMixerBoard() { return mMixerBoard; };
|
MixerBoard* GetMixerBoard() { return mMixerBoard; }
|
||||||
|
|
||||||
// SelectionBarListener callback methods
|
// SelectionBarListener callback methods
|
||||||
|
|
||||||
@ -407,8 +407,8 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
virtual const wxString & SSBL_GetFrequencySelectionFormatName();
|
virtual const wxString & SSBL_GetFrequencySelectionFormatName();
|
||||||
virtual void SSBL_SetFrequencySelectionFormatName(const wxString & formatName);
|
virtual void SSBL_SetFrequencySelectionFormatName(const wxString & formatName);
|
||||||
|
|
||||||
virtual const wxString & SSBL_GetLogFrequencySelectionFormatName();
|
virtual const wxString & SSBL_GetBandwidthSelectionFormatName();
|
||||||
virtual void SSBL_SetLogFrequencySelectionFormatName(const wxString & formatName);
|
virtual void SSBL_SetBandwidthSelectionFormatName(const wxString & formatName);
|
||||||
|
|
||||||
virtual void SSBL_ModifySpectralSelection(double &bottom, double &top, bool done);
|
virtual void SSBL_ModifySpectralSelection(double &bottom, double &top, bool done);
|
||||||
|
|
||||||
@ -464,8 +464,8 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
static bool GetCacheBlockFiles();
|
static bool GetCacheBlockFiles();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool IsSoloSimple() { return mSoloPref == wxT("Simple"); };
|
bool IsSoloSimple() { return mSoloPref == wxT("Simple"); }
|
||||||
bool IsSoloNone() { return mSoloPref == wxT("None"); };
|
bool IsSoloNone() { return mSoloPref == wxT("None"); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -488,7 +488,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
int mSnapTo;
|
int mSnapTo;
|
||||||
wxString mSelectionFormat;
|
wxString mSelectionFormat;
|
||||||
wxString mFrequencySelectionFormatName;
|
wxString mFrequencySelectionFormatName;
|
||||||
wxString mLogFrequencySelectionFormatName;
|
wxString mBandwidthSelectionFormatName;
|
||||||
|
|
||||||
TrackList *mLastSavedTracks;
|
TrackList *mLastSavedTracks;
|
||||||
|
|
||||||
@ -618,6 +618,8 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
// Are we currently closing as the result of a menu command?
|
// Are we currently closing as the result of a menu command?
|
||||||
bool mMenuClose;
|
bool mMenuClose;
|
||||||
|
|
||||||
|
bool mbInitializingScrollbar;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
63
src/SelectedRegion.cpp
Normal file
63
src/SelectedRegion.cpp
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Audacity: A Digital Audio Editor
|
||||||
|
|
||||||
|
SelectedRegion.cpp
|
||||||
|
|
||||||
|
Paul Licameli
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
|
||||||
|
#include "Internat.h"
|
||||||
|
#include "SelectedRegion.h"
|
||||||
|
#include "xml/XMLWriter.h"
|
||||||
|
|
||||||
|
const wxChar *SelectedRegion::sDefaultT0Name = wxT("selStart");
|
||||||
|
const wxChar *SelectedRegion::sDefaultT1Name = wxT("selEnd");
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
const wxChar *sDefaultF0Name = wxT("selLow");
|
||||||
|
const wxChar *sDefaultF1Name = wxT("selHigh");
|
||||||
|
}
|
||||||
|
|
||||||
|
void SelectedRegion::WriteXMLAttributes
|
||||||
|
(XMLWriter &xmlFile,
|
||||||
|
const wxChar *legacyT0Name, const wxChar *legacyT1Name) const
|
||||||
|
{
|
||||||
|
xmlFile.WriteAttr(legacyT0Name, t0(), 10);
|
||||||
|
xmlFile.WriteAttr(legacyT1Name, t1(), 10);
|
||||||
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
|
if (f0() >= 0)
|
||||||
|
xmlFile.WriteAttr(sDefaultF0Name, f0(), 10);
|
||||||
|
if (f1() >= 0)
|
||||||
|
xmlFile.WriteAttr(sDefaultF1Name, f1(), 10);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SelectedRegion::HandleXMLAttribute
|
||||||
|
(const wxChar *attr, const wxChar *value,
|
||||||
|
const wxChar *legacyT0Name, const wxChar *legacyT1Name)
|
||||||
|
{
|
||||||
|
typedef bool (SelectedRegion::*Setter)(double, bool);
|
||||||
|
Setter setter = 0;
|
||||||
|
if (!wxStrcmp(attr, legacyT0Name))
|
||||||
|
setter = &SelectedRegion::setT0;
|
||||||
|
else if (!wxStrcmp(attr, legacyT1Name))
|
||||||
|
setter = &SelectedRegion::setT1;
|
||||||
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
|
else if (!wxStrcmp(attr, sDefaultF0Name))
|
||||||
|
setter = &SelectedRegion::setF0;
|
||||||
|
else if (!wxStrcmp(attr, sDefaultF1Name))
|
||||||
|
setter = &SelectedRegion::setF1;
|
||||||
|
#endif
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
|
||||||
|
double dblValue;
|
||||||
|
if (!Internat::CompatibleToDouble(value, &dblValue))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// False means don't flip time or frequency boundaries
|
||||||
|
(void)(this->*setter)(dblValue, false);
|
||||||
|
return true;
|
||||||
|
}
|
@ -28,6 +28,12 @@
|
|||||||
#include "Audacity.h"
|
#include "Audacity.h"
|
||||||
#include "Experimental.h"
|
#include "Experimental.h"
|
||||||
|
|
||||||
|
#include <wx/defs.h>
|
||||||
|
#include <wx/wxchar.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
class XMLWriter;
|
||||||
|
|
||||||
class AUDACITY_DLL_API SelectedRegion {
|
class AUDACITY_DLL_API SelectedRegion {
|
||||||
|
|
||||||
// Maintains the invariant: t1() >= t0()
|
// Maintains the invariant: t1() >= t0()
|
||||||
@ -156,15 +162,31 @@ public:
|
|||||||
|
|
||||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
// Returns true iff the bounds got swapped
|
// Returns true iff the bounds got swapped
|
||||||
bool setF0(double f) {
|
bool setF0(double f, bool maySwap = true) {
|
||||||
|
if (f < 0)
|
||||||
|
f = UndefinedFrequency;
|
||||||
mF0 = f;
|
mF0 = f;
|
||||||
|
if (maySwap)
|
||||||
return ensureFrequencyOrdering();
|
return ensureFrequencyOrdering();
|
||||||
|
else {
|
||||||
|
if (mF1 >= 0 && mF1 < mF0)
|
||||||
|
mF1 = mF0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns true iff the bounds got swapped
|
// Returns true iff the bounds got swapped
|
||||||
bool setF1(double f) {
|
bool setF1(double f, bool maySwap = true) {
|
||||||
|
if (f < 0)
|
||||||
|
f = UndefinedFrequency;
|
||||||
mF1 = f;
|
mF1 = f;
|
||||||
|
if (maySwap)
|
||||||
return ensureFrequencyOrdering();
|
return ensureFrequencyOrdering();
|
||||||
|
else {
|
||||||
|
if (mF0 >= 0 && mF1 < mF0)
|
||||||
|
mF0 = mF1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns true iff the bounds got swapped
|
// Returns true iff the bounds got swapped
|
||||||
@ -176,6 +198,30 @@ public:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Serialization: historically, selections were written to file
|
||||||
|
// in two places (project, and each label) but only as attributes
|
||||||
|
// in the tags, and different names were used in the two places.
|
||||||
|
// For compatibility, continue that, but possibly add attributes
|
||||||
|
// as SelectedRegion is extended. Therefore, this is not an
|
||||||
|
// XMLTagHandler.
|
||||||
|
|
||||||
|
static const wxChar *sDefaultT0Name;
|
||||||
|
static const wxChar *sDefaultT1Name;
|
||||||
|
|
||||||
|
// Serialize, not with tags of its own, but as attributes within a tag.
|
||||||
|
// Don't add more legacy arguments as the structure grows.
|
||||||
|
void WriteXMLAttributes
|
||||||
|
(XMLWriter &xmlFile,
|
||||||
|
const wxChar *legacyT0Name = sDefaultT0Name,
|
||||||
|
const wxChar *legacyT1Name = sDefaultT1Name) const;
|
||||||
|
|
||||||
|
// Return true iff the attribute is recognized.
|
||||||
|
// Don't add more legacy arguments as the structure grows.
|
||||||
|
bool HandleXMLAttribute
|
||||||
|
(const wxChar *attr, const wxChar *value,
|
||||||
|
const wxChar *legacyT0Name = sDefaultT0Name,
|
||||||
|
const wxChar *legacyT1Name = sDefaultT1Name);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool ensureOrdering()
|
bool ensureOrdering()
|
||||||
{
|
{
|
||||||
|
@ -2,12 +2,15 @@
|
|||||||
Name=Audacity
|
Name=Audacity
|
||||||
Name[de]=Audacity
|
Name[de]=Audacity
|
||||||
Name[ru]=Audacity
|
Name[ru]=Audacity
|
||||||
|
Name[uk]=Audacity
|
||||||
GenericName=Sound Editor
|
GenericName=Sound Editor
|
||||||
GenericName[de]=Audio-Editor
|
GenericName[de]=Audio-Editor
|
||||||
GenericName[ru]=Редактор звуковых файлов
|
GenericName[ru]=Редактор звуковых файлов
|
||||||
|
GenericName[uk]=Редактор звукових файлів
|
||||||
Comment=Record and edit audio files
|
Comment=Record and edit audio files
|
||||||
Comment[de]=Audio-Dateien aufnehmen und bearbeiten
|
Comment[de]=Audio-Dateien aufnehmen und bearbeiten
|
||||||
Comment[ru]=Запись и редактирование звуковых файлов
|
Comment[ru]=Запись и редактирование звуковых файлов
|
||||||
|
Comment[uk]=Запис і редагування звукових файлів
|
||||||
|
|
||||||
Icon=@AUDACITY_NAME@
|
Icon=@AUDACITY_NAME@
|
||||||
|
|
||||||
|
@ -1454,26 +1454,26 @@ struct ControlInfo {
|
|||||||
}; const ControlInfo *controlInfo() { static const ControlInfo table[] = {
|
}; const ControlInfo *controlInfo() { static const ControlInfo table[] = {
|
||||||
{ &EffectNoiseReduction::Settings::mNoiseGain,
|
{ &EffectNoiseReduction::Settings::mNoiseGain,
|
||||||
0.0, 48.0, 48, wxT("%d"), true,
|
0.0, 48.0, 48, wxT("%d"), true,
|
||||||
wxTRANSLATE("&Noise reduction (dB):"), wxTRANSLATE("Noise reduction") },
|
wxString(wxTRANSLATE("&Noise reduction (dB):")), wxString(wxTRANSLATE("Noise reduction")) },
|
||||||
{ &EffectNoiseReduction::Settings::mNewSensitivity,
|
{ &EffectNoiseReduction::Settings::mNewSensitivity,
|
||||||
0.0, 24.0, 48, wxT("%.2f"), false,
|
0.0, 24.0, 48, wxT("%.2f"), false,
|
||||||
wxTRANSLATE("&Sensitivity:"), wxTRANSLATE("Sensitivity") },
|
wxString(wxTRANSLATE("&Sensitivity:")), wxString(wxTRANSLATE("Sensitivity")) },
|
||||||
#ifdef ATTACK_AND_RELEASE
|
#ifdef ATTACK_AND_RELEASE
|
||||||
{ &EffectNoiseReduction::Settings::mAttackTime,
|
{ &EffectNoiseReduction::Settings::mAttackTime,
|
||||||
0, 1.0, 100, wxT("%.2f"), false,
|
0, 1.0, 100, wxT("%.2f"), false,
|
||||||
wxTRANSLATE("Attac&k time (secs):"), wxTRANSLATE("Attack time") },
|
wxString(wxTRANSLATE("Attac&k time (secs):")), wxString(wxTRANSLATE("Attack time")) },
|
||||||
{ &EffectNoiseReduction::Settings::mReleaseTime,
|
{ &EffectNoiseReduction::Settings::mReleaseTime,
|
||||||
0, 1.0, 100, wxT("%.2f"), false,
|
0, 1.0, 100, wxT("%.2f"), false,
|
||||||
wxTRANSLATE("R&elease time (secs):"), wxTRANSLATE("Release time") },
|
wxTRANSLATE("R&elease time (secs):"), wxString(wxTRANSLATE("Release time")) },
|
||||||
#endif
|
#endif
|
||||||
{ &EffectNoiseReduction::Settings::mFreqSmoothingBands,
|
{ &EffectNoiseReduction::Settings::mFreqSmoothingBands,
|
||||||
0, 6, 6, wxT("%d"), true,
|
0, 6, 6, wxT("%d"), true,
|
||||||
wxTRANSLATE("&Frequency smoothing (bands):"), wxTRANSLATE("Frequency smoothing") },
|
wxString(wxTRANSLATE("&Frequency smoothing (bands):")), wxString(wxTRANSLATE("Frequency smoothing")) },
|
||||||
|
|
||||||
#ifdef ADVANCED_SETTINGS
|
#ifdef ADVANCED_SETTINGS
|
||||||
{ &EffectNoiseReduction::Settings::mOldSensitivity,
|
{ &EffectNoiseReduction::Settings::mOldSensitivity,
|
||||||
-20.0, 20.0, 4000, wxT("%.2f"), false,
|
-20.0, 20.0, 4000, wxT("%.2f"), false,
|
||||||
wxTRANSLATE("Sensiti&vity (dB):"), wxTRANSLATE("Old Sensitivity") },
|
wxString(wxTRANSLATE("Sensiti&vity (dB):")), wxString(wxTRANSLATE("Old Sensitivity")) },
|
||||||
// add here
|
// add here
|
||||||
#endif
|
#endif
|
||||||
}; return table; }
|
}; return table; }
|
||||||
|
@ -52,6 +52,8 @@ void GUIPrefs::Populate()
|
|||||||
mRangeCodes.Add(wxT("36"));
|
mRangeCodes.Add(wxT("36"));
|
||||||
mRangeCodes.Add(wxT("48"));
|
mRangeCodes.Add(wxT("48"));
|
||||||
mRangeCodes.Add(wxT("60"));
|
mRangeCodes.Add(wxT("60"));
|
||||||
|
mRangeCodes.Add(wxT("72"));
|
||||||
|
mRangeCodes.Add(wxT("84"));
|
||||||
mRangeCodes.Add(wxT("96"));
|
mRangeCodes.Add(wxT("96"));
|
||||||
mRangeCodes.Add(wxT("120"));
|
mRangeCodes.Add(wxT("120"));
|
||||||
mRangeCodes.Add(wxT("145"));
|
mRangeCodes.Add(wxT("145"));
|
||||||
@ -59,6 +61,8 @@ void GUIPrefs::Populate()
|
|||||||
mRangeChoices.Add(_("-36 dB (shallow range for high-amplitude editing)"));
|
mRangeChoices.Add(_("-36 dB (shallow range for high-amplitude editing)"));
|
||||||
mRangeChoices.Add(_("-48 dB (PCM range of 8 bit samples)"));
|
mRangeChoices.Add(_("-48 dB (PCM range of 8 bit samples)"));
|
||||||
mRangeChoices.Add(_("-60 dB (PCM range of 10 bit samples)"));
|
mRangeChoices.Add(_("-60 dB (PCM range of 10 bit samples)"));
|
||||||
|
mRangeChoices.Add(_("-72 dB (PCM range of 12 bit samples)"));
|
||||||
|
mRangeChoices.Add(_("-84 dB (PCM range of 14 bit samples)"));
|
||||||
mRangeChoices.Add(_("-96 dB (PCM range of 16 bit samples)"));
|
mRangeChoices.Add(_("-96 dB (PCM range of 16 bit samples)"));
|
||||||
mRangeChoices.Add(_("-120 dB (approximate limit of human hearing)"));
|
mRangeChoices.Add(_("-120 dB (approximate limit of human hearing)"));
|
||||||
mRangeChoices.Add(_("-145 dB (PCM range of 24 bit samples)"));
|
mRangeChoices.Add(_("-145 dB (PCM range of 24 bit samples)"));
|
||||||
|
@ -76,7 +76,7 @@ BEGIN_EVENT_TABLE(SpectralSelectionBar, ToolBar)
|
|||||||
EVT_TEXT(OnHighID, SpectralSelectionBar::OnCtrl)
|
EVT_TEXT(OnHighID, SpectralSelectionBar::OnCtrl)
|
||||||
EVT_CHOICE(OnChoiceID, SpectralSelectionBar::OnChoice)
|
EVT_CHOICE(OnChoiceID, SpectralSelectionBar::OnChoice)
|
||||||
EVT_COMMAND(wxID_ANY, EVT_FREQUENCYTEXTCTRL_UPDATED, SpectralSelectionBar::OnUpdate)
|
EVT_COMMAND(wxID_ANY, EVT_FREQUENCYTEXTCTRL_UPDATED, SpectralSelectionBar::OnUpdate)
|
||||||
EVT_COMMAND(wxID_ANY, EVT_LOGFREQUENCYTEXTCTRL_UPDATED, SpectralSelectionBar::OnUpdate)
|
EVT_COMMAND(wxID_ANY, EVT_BANDWIDTHTEXTCTRL_UPDATED, SpectralSelectionBar::OnUpdate)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
static const wxString preferencePath
|
static const wxString preferencePath
|
||||||
@ -117,8 +117,8 @@ void SpectralSelectionBar::Populate()
|
|||||||
wxString frequencyFormatName = mListener
|
wxString frequencyFormatName = mListener
|
||||||
? mListener->SSBL_GetFrequencySelectionFormatName()
|
? mListener->SSBL_GetFrequencySelectionFormatName()
|
||||||
: wxString(wxEmptyString);
|
: wxString(wxEmptyString);
|
||||||
wxString logFrequencyFormatName = mListener
|
wxString bandwidthFormatName = mListener
|
||||||
? mListener->SSBL_GetLogFrequencySelectionFormatName()
|
? mListener->SSBL_GetBandwidthSelectionFormatName()
|
||||||
: wxString(wxEmptyString);
|
: wxString(wxEmptyString);
|
||||||
|
|
||||||
wxFlexGridSizer *mainSizer = new wxFlexGridSizer(1, 1, 1);
|
wxFlexGridSizer *mainSizer = new wxFlexGridSizer(1, 1, 1);
|
||||||
@ -151,7 +151,7 @@ void SpectralSelectionBar::Populate()
|
|||||||
subSizer->Add(mCenterCtrl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
|
subSizer->Add(mCenterCtrl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
|
||||||
|
|
||||||
mWidthCtrl = new NumericTextCtrl(
|
mWidthCtrl = new NumericTextCtrl(
|
||||||
NumericConverter::LOG_FREQUENCY, this, OnWidthID, logFrequencyFormatName, 0.0);
|
NumericConverter::BANDWIDTH, this, OnWidthID, bandwidthFormatName, 0.0);
|
||||||
mWidthCtrl->SetName(wxString(_("Bandwidth:")));
|
mWidthCtrl->SetName(wxString(_("Bandwidth:")));
|
||||||
mWidthCtrl->EnableMenu();
|
mWidthCtrl->EnableMenu();
|
||||||
subSizer->Add(mWidthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 0);
|
subSizer->Add(mWidthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 0);
|
||||||
@ -192,7 +192,7 @@ void SpectralSelectionBar::UpdatePrefs()
|
|||||||
|
|
||||||
if (mbCenterAndWidth)
|
if (mbCenterAndWidth)
|
||||||
{
|
{
|
||||||
wxCommandEvent e(EVT_LOGFREQUENCYTEXTCTRL_UPDATED);
|
wxCommandEvent e(EVT_BANDWIDTHTEXTCTRL_UPDATED);
|
||||||
e.SetInt(mWidthCtrl->GetFormatIndex());
|
e.SetInt(mWidthCtrl->GetFormatIndex());
|
||||||
OnUpdate(e);
|
OnUpdate(e);
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ void SpectralSelectionBar::SetListener(SpectralSelectionBarListener *l)
|
|||||||
{
|
{
|
||||||
mListener = l;
|
mListener = l;
|
||||||
SetFrequencySelectionFormatName(mListener->SSBL_GetFrequencySelectionFormatName());
|
SetFrequencySelectionFormatName(mListener->SSBL_GetFrequencySelectionFormatName());
|
||||||
SetLogFrequencySelectionFormatName(mListener->SSBL_GetLogFrequencySelectionFormatName());
|
SetBandwidthSelectionFormatName(mListener->SSBL_GetBandwidthSelectionFormatName());
|
||||||
};
|
};
|
||||||
|
|
||||||
void SpectralSelectionBar::OnSize(wxSizeEvent &evt)
|
void SpectralSelectionBar::OnSize(wxSizeEvent &evt)
|
||||||
@ -312,9 +312,9 @@ void SpectralSelectionBar::OnUpdate(wxCommandEvent &evt)
|
|||||||
mListener->SSBL_SetFrequencySelectionFormatName(frequencyFormatName);
|
mListener->SSBL_SetFrequencySelectionFormatName(frequencyFormatName);
|
||||||
}
|
}
|
||||||
else if (mbCenterAndWidth &&
|
else if (mbCenterAndWidth &&
|
||||||
type == EVT_LOGFREQUENCYTEXTCTRL_UPDATED) {
|
type == EVT_BANDWIDTHTEXTCTRL_UPDATED) {
|
||||||
wxString logFrequencyFormatName = mWidthCtrl->GetBuiltinName(index);
|
wxString bandwidthFormatName = mWidthCtrl->GetBuiltinName(index);
|
||||||
mListener->SSBL_SetLogFrequencySelectionFormatName(logFrequencyFormatName);
|
mListener->SSBL_SetBandwidthSelectionFormatName(bandwidthFormatName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToolBar::ReCreateButtons() will get rid of our sizers and controls
|
// ToolBar::ReCreateButtons() will get rid of our sizers and controls
|
||||||
@ -377,12 +377,12 @@ void SpectralSelectionBar::SetFrequencySelectionFormatName(const wxString & form
|
|||||||
OnUpdate(e);
|
OnUpdate(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpectralSelectionBar::SetLogFrequencySelectionFormatName(const wxString & formatName)
|
void SpectralSelectionBar::SetBandwidthSelectionFormatName(const wxString & formatName)
|
||||||
{
|
{
|
||||||
if (mbCenterAndWidth) {
|
if (mbCenterAndWidth) {
|
||||||
mWidthCtrl->SetFormatName(formatName);
|
mWidthCtrl->SetFormatName(formatName);
|
||||||
|
|
||||||
wxCommandEvent e(EVT_LOGFREQUENCYTEXTCTRL_UPDATED);
|
wxCommandEvent e(EVT_BANDWIDTHTEXTCTRL_UPDATED);
|
||||||
e.SetInt(mWidthCtrl->GetFormatIndex());
|
e.SetInt(mWidthCtrl->GetFormatIndex());
|
||||||
OnUpdate(e);
|
OnUpdate(e);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
void SetFrequencies(double bottom, double top);
|
void SetFrequencies(double bottom, double top);
|
||||||
void SetFrequencySelectionFormatName(const wxString & formatName);
|
void SetFrequencySelectionFormatName(const wxString & formatName);
|
||||||
void SetLogFrequencySelectionFormatName(const wxString & formatName);
|
void SetBandwidthSelectionFormatName(const wxString & formatName);
|
||||||
void SetListener(SpectralSelectionBarListener *l);
|
void SetListener(SpectralSelectionBarListener *l);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -14,22 +14,21 @@
|
|||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
|
|
||||||
class wxString;
|
class wxString;
|
||||||
class SelectedRegion;
|
|
||||||
|
|
||||||
class AUDACITY_DLL_API SpectralSelectionBarListener {
|
class AUDACITY_DLL_API SpectralSelectionBarListener {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
SpectralSelectionBarListener(){};
|
SpectralSelectionBarListener(){}
|
||||||
virtual ~SpectralSelectionBarListener(){};
|
virtual ~SpectralSelectionBarListener(){}
|
||||||
|
|
||||||
virtual double SSBL_GetRate() const = 0;
|
virtual double SSBL_GetRate() const = 0;
|
||||||
|
|
||||||
virtual const wxString & SSBL_GetFrequencySelectionFormatName() = 0;
|
virtual const wxString & SSBL_GetFrequencySelectionFormatName() = 0;
|
||||||
virtual void SSBL_SetFrequencySelectionFormatName(const wxString & formatName) = 0;
|
virtual void SSBL_SetFrequencySelectionFormatName(const wxString & formatName) = 0;
|
||||||
|
|
||||||
virtual const wxString & SSBL_GetLogFrequencySelectionFormatName() = 0;
|
virtual const wxString & SSBL_GetBandwidthSelectionFormatName() = 0;
|
||||||
virtual void SSBL_SetLogFrequencySelectionFormatName(const wxString & formatName) = 0;
|
virtual void SSBL_SetBandwidthSelectionFormatName(const wxString & formatName) = 0;
|
||||||
|
|
||||||
virtual void SSBL_ModifySpectralSelection(double &bottom, double &top, bool done) = 0;
|
virtual void SSBL_ModifySpectralSelection(double &bottom, double &top, bool done) = 0;
|
||||||
};
|
};
|
||||||
|
@ -486,7 +486,7 @@ const BuiltinFormatString FrequencyConverterFormats[] = {
|
|||||||
* array of string pairs for name of the format and the format string
|
* array of string pairs for name of the format and the format string
|
||||||
* needed to create that format output. This is used for the pop-up
|
* needed to create that format output. This is used for the pop-up
|
||||||
* list of formats to choose from in the control. */
|
* list of formats to choose from in the control. */
|
||||||
const BuiltinFormatString LogFrequencyConverterFormats[] = {
|
const BuiltinFormatString BandwidthConverterFormats[] = {
|
||||||
{
|
{
|
||||||
/* i18n-hint: Name of display format that shows log of frequency
|
/* i18n-hint: Name of display format that shows log of frequency
|
||||||
* in octaves */
|
* in octaves */
|
||||||
@ -546,10 +546,10 @@ NumericConverter::NumericConverter(Type type,
|
|||||||
mNBuiltins = sizeof(FrequencyConverterFormats) /
|
mNBuiltins = sizeof(FrequencyConverterFormats) /
|
||||||
sizeof (FrequencyConverterFormats[0]);
|
sizeof (FrequencyConverterFormats[0]);
|
||||||
break;
|
break;
|
||||||
case LOG_FREQUENCY:
|
case BANDWIDTH:
|
||||||
mBuiltinFormatStrings = LogFrequencyConverterFormats;
|
mBuiltinFormatStrings = BandwidthConverterFormats;
|
||||||
mNBuiltins = sizeof(LogFrequencyConverterFormats) /
|
mNBuiltins = sizeof(BandwidthConverterFormats) /
|
||||||
sizeof (LogFrequencyConverterFormats[0]);
|
sizeof(BandwidthConverterFormats[0]);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1099,7 +1099,7 @@ void NumericConverter::Adjust(int steps, int dir)
|
|||||||
|
|
||||||
DEFINE_EVENT_TYPE(EVT_TIMETEXTCTRL_UPDATED)
|
DEFINE_EVENT_TYPE(EVT_TIMETEXTCTRL_UPDATED)
|
||||||
DEFINE_EVENT_TYPE(EVT_FREQUENCYTEXTCTRL_UPDATED)
|
DEFINE_EVENT_TYPE(EVT_FREQUENCYTEXTCTRL_UPDATED)
|
||||||
DEFINE_EVENT_TYPE(EVT_LOGFREQUENCYTEXTCTRL_UPDATED)
|
DEFINE_EVENT_TYPE(EVT_BANDWIDTHTEXTCTRL_UPDATED)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(NumericTextCtrl, wxControl)
|
BEGIN_EVENT_TABLE(NumericTextCtrl, wxControl)
|
||||||
EVT_ERASE_BACKGROUND(NumericTextCtrl::OnErase)
|
EVT_ERASE_BACKGROUND(NumericTextCtrl::OnErase)
|
||||||
@ -1470,8 +1470,8 @@ void NumericTextCtrl::OnContext(wxContextMenuEvent &event)
|
|||||||
case NumericConverter::FREQUENCY:
|
case NumericConverter::FREQUENCY:
|
||||||
eventType = EVT_FREQUENCYTEXTCTRL_UPDATED;
|
eventType = EVT_FREQUENCYTEXTCTRL_UPDATED;
|
||||||
break;
|
break;
|
||||||
case NumericConverter::LOG_FREQUENCY:
|
case NumericConverter::BANDWIDTH:
|
||||||
eventType = EVT_LOGFREQUENCYTEXTCTRL_UPDATED;
|
eventType = EVT_BANDWIDTHTEXTCTRL_UPDATED;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wxASSERT(false);
|
wxASSERT(false);
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
// update their formats to agree.
|
// update their formats to agree.
|
||||||
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_TIMETEXTCTRL_UPDATED, -1);
|
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_TIMETEXTCTRL_UPDATED, -1);
|
||||||
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_FREQUENCYTEXTCTRL_UPDATED, -1);
|
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_FREQUENCYTEXTCTRL_UPDATED, -1);
|
||||||
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_LOGFREQUENCYTEXTCTRL_UPDATED,
|
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_BANDWIDTHTEXTCTRL_UPDATED,
|
||||||
-1);
|
-1);
|
||||||
|
|
||||||
/** \brief struct to hold a formatting control string and it's user facing name
|
/** \brief struct to hold a formatting control string and it's user facing name
|
||||||
@ -53,7 +53,7 @@ public:
|
|||||||
enum Type {
|
enum Type {
|
||||||
TIME,
|
TIME,
|
||||||
FREQUENCY,
|
FREQUENCY,
|
||||||
LOG_FREQUENCY,
|
BANDWIDTH,
|
||||||
};
|
};
|
||||||
|
|
||||||
NumericConverter(Type type,
|
NumericConverter(Type type,
|
||||||
|
@ -293,6 +293,7 @@
|
|||||||
<ClCompile Include="..\..\..\src\RingBuffer.cpp" />
|
<ClCompile Include="..\..\..\src\RingBuffer.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\SampleFormat.cpp" />
|
<ClCompile Include="..\..\..\src\SampleFormat.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\Screenshot.cpp" />
|
<ClCompile Include="..\..\..\src\Screenshot.cpp" />
|
||||||
|
<ClCompile Include="..\..\..\src\SelectedRegion.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\Sequence.cpp" />
|
<ClCompile Include="..\..\..\src\Sequence.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\Shuttle.cpp" />
|
<ClCompile Include="..\..\..\src\Shuttle.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\ShuttleGui.cpp" />
|
<ClCompile Include="..\..\..\src\ShuttleGui.cpp" />
|
||||||
@ -530,6 +531,7 @@
|
|||||||
<ClInclude Include="..\..\..\src\import\SpecPowerMeter.h" />
|
<ClInclude Include="..\..\..\src\import\SpecPowerMeter.h" />
|
||||||
<ClInclude Include="..\..\..\src\ModuleManager.h" />
|
<ClInclude Include="..\..\..\src\ModuleManager.h" />
|
||||||
<ClInclude Include="..\..\..\src\RevisionIdent.h" />
|
<ClInclude Include="..\..\..\src\RevisionIdent.h" />
|
||||||
|
<ClInclude Include="..\..\..\src\SelectedRegion.h" />
|
||||||
<ClInclude Include="..\..\..\src\SseMathFuncs.h" />
|
<ClInclude Include="..\..\..\src\SseMathFuncs.h" />
|
||||||
<ClInclude Include="..\..\..\src\toolbars\SpectralSelectionBar.h" />
|
<ClInclude Include="..\..\..\src\toolbars\SpectralSelectionBar.h" />
|
||||||
<ClInclude Include="..\..\..\src\toolbars\SpectralSelectionBarListener.h" />
|
<ClInclude Include="..\..\..\src\toolbars\SpectralSelectionBarListener.h" />
|
||||||
|
@ -837,6 +837,9 @@
|
|||||||
<ClCompile Include="..\..\..\src\DeviceChange.cpp">
|
<ClCompile Include="..\..\..\src\DeviceChange.cpp">
|
||||||
<Filter>src</Filter>
|
<Filter>src</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\..\src\SelectedRegion.cpp">
|
||||||
|
<Filter>src</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\..\src\AboutDialog.h">
|
<ClInclude Include="..\..\..\src\AboutDialog.h">
|
||||||
@ -1673,6 +1676,9 @@
|
|||||||
<ClInclude Include="..\..\..\src\RevisionIdent.h">
|
<ClInclude Include="..\..\..\src\RevisionIdent.h">
|
||||||
<Filter>src</Filter>
|
<Filter>src</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\src\SelectedRegion.h">
|
||||||
|
<Filter>src</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="..\..\audacity.ico">
|
<Image Include="..\..\audacity.ico">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user