Audacity  3.0.3
CompareAudioCommand.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity - A Digital Audio Editor
4  Copyright 1999-2009 Audacity Team
5  License: wxwidgets
6 
7  Dan Horgan
8  James Crook
9 
10 ******************************************************************//*******************************************************************/
17 
18 #ifndef __COMPAREAUDIOCOMMAND__
19 #define __COMPAREAUDIOCOMMAND__
20 
21 #include "Command.h"
22 #include "CommandType.h"
23 
24 class WaveTrack;
25 
27 {
28 public:
30 
31  // ComponentInterface overrides
33  TranslatableString GetDescription() override {return XO("Compares a range on two tracks.");};
34  bool DefineParams( ShuttleParams & S ) override;
35  void PopulateOrExchange(ShuttleGui & S) override;
36 
37  // AudacityCommand overrides
38  ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_II#compare_Audio";}
39  bool Apply(const CommandContext &context) override;
40 
41 
42 private:
44  double mT0, mT1;
47 
48  // Update member variables with project selection data (and validate)
49  bool GetSelection(const CommandContext &context, AudacityProject &proj);
50 
51 protected:
52  double CompareSample(double value1, double value2) /* not override */;
53 
54 };
55 
56 #endif /* End of include guard: __COMPAREAUDIOCOMMAND__ */
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:70
S
#define S(N)
Definition: ToChars.cpp:64
CompareAudioCommand::ManualPage
ManualPageID ManualPage() override
Definition: CompareAudioCommand.h:38
CompareAudioCommand::mTrack1
const WaveTrack * mTrack1
Definition: CompareAudioCommand.h:46
CompareAudioCommand::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: CompareAudioCommand.h:32
CompareAudioCommand::mT0
double mT0
Definition: CompareAudioCommand.h:44
CompareAudioCommand::Apply
bool Apply(const CommandContext &context) override
Definition: CompareAudioCommand.cpp:111
XO
#define XO(s)
Definition: Internat.h:31
CompareAudioCommand::errorThreshold
double errorThreshold
Definition: CompareAudioCommand.h:43
ShuttleParams
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:62
CompareAudioCommand::DefineParams
bool DefineParams(ShuttleParams &S) override
Definition: CompareAudioCommand.cpp:50
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
CompareAudioCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: CompareAudioCommand.cpp:55
CommandContext
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Definition: CommandContext.h:34
AudacityCommand
Base class for command in Audacity.
Definition: AudacityCommand.h:40
CompareAudioCommand::mT1
double mT1
Definition: CompareAudioCommand.h:44
CompareAudioCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: CompareAudioCommand.h:29
CompareAudioCommand
Returns information about the amount of audio that is about a certain threshold of difference in two ...
Definition: CompareAudioCommand.h:27
CompareAudioCommand::GetDescription
TranslatableString GetDescription() override
Definition: CompareAudioCommand.h:33
CommandType.h
Contains declarations for CommandType class.
TaggedIdentifier< ManualPageIDTag >
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
CompareAudioCommand::mTrack0
const WaveTrack * mTrack0
Definition: CompareAudioCommand.h:45
Command.h
Contains declaration of Command base class.
CompareAudioCommand::GetSelection
bool GetSelection(const CommandContext &context, AudacityProject &proj)
Definition: CompareAudioCommand.cpp:67
CompareAudioCommand::CompareSample
double CompareSample(double value1, double value2)
Definition: CompareAudioCommand.cpp:101
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631