Audacity
3.2.0
src
commands
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
26
class
CompareAudioCommand
final :
public
AudacityCommand
27
{
28
public
:
29
static
const
ComponentInterfaceSymbol
Symbol
;
30
31
// ComponentInterface overrides
32
ComponentInterfaceSymbol
GetSymbol
()
const override
{
return
Symbol
;}
33
TranslatableString
GetDescription
()
const override
{
return
XO
(
"Compares a range on two tracks."
);};
34
template
<
bool
Const>
bool
VisitSettings
(
SettingsVisitorBase<Const>
&
S
);
35
bool
VisitSettings
(
SettingsVisitor
&
S
)
override
;
36
bool
VisitSettings
(
ConstSettingsVisitor
&
S
)
override
;
37
void
PopulateOrExchange
(
ShuttleGui
&
S
)
override
;
38
39
// AudacityCommand overrides
40
ManualPageID
ManualPage
()
override
{
return
L
"Extra_Menu:_Scriptables_II#compare_Audio"
;}
41
bool
Apply
(
const
CommandContext
&context)
override
;
42
43
44
private
:
45
double
errorThreshold
;
46
double
mT0
,
mT1
;
47
const
WaveTrack
*
mTrack0
;
48
const
WaveTrack
*
mTrack1
;
49
50
// Update member variables with project selection data (and validate)
51
bool
GetSelection
(
const
CommandContext
&context,
AudacityProject
&proj);
52
53
protected
:
54
double
CompareSample
(
double
value1,
double
value2)
/* not override */
;
55
56
};
57
58
#endif
/* End of include guard: __COMPAREAUDIOCOMMAND__ */
Command.h
Contains declaration of Command base class.
CommandType.h
Contains declarations for CommandType class.
XO
XO("Cut/Copy/Paste")
S
#define S(N)
Definition:
ToChars.cpp:64
AudacityCommand
Base class for command in Audacity.
Definition:
AudacityCommand.h:40
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition:
Project.h:90
CommandContext
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Definition:
CommandContext.h:37
CompareAudioCommand
Returns information about the amount of audio that is about a certain threshold of difference in two ...
Definition:
CompareAudioCommand.h:27
CompareAudioCommand::CompareSample
double CompareSample(double value1, double value2)
Definition:
CompareAudioCommand.cpp:109
CompareAudioCommand::GetDescription
TranslatableString GetDescription() const override
Definition:
CompareAudioCommand.h:33
CompareAudioCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition:
CompareAudioCommand.cpp:63
CompareAudioCommand::mT1
double mT1
Definition:
CompareAudioCommand.h:46
CompareAudioCommand::ManualPage
ManualPageID ManualPage() override
Definition:
CompareAudioCommand.h:40
CompareAudioCommand::mTrack1
const WaveTrack * mTrack1
Definition:
CompareAudioCommand.h:48
CompareAudioCommand::mT0
double mT0
Definition:
CompareAudioCommand.h:46
CompareAudioCommand::GetSymbol
ComponentInterfaceSymbol GetSymbol() const override
Definition:
CompareAudioCommand.h:32
CompareAudioCommand::Apply
bool Apply(const CommandContext &context) override
Definition:
CompareAudioCommand.cpp:119
CompareAudioCommand::GetSelection
bool GetSelection(const CommandContext &context, AudacityProject &proj)
Definition:
CompareAudioCommand.cpp:75
CompareAudioCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition:
CompareAudioCommand.h:29
CompareAudioCommand::errorThreshold
double errorThreshold
Definition:
CompareAudioCommand.h:45
CompareAudioCommand::mTrack0
const WaveTrack * mTrack0
Definition:
CompareAudioCommand.h:47
CompareAudioCommand::VisitSettings
bool VisitSettings(SettingsVisitorBase< Const > &S)
Definition:
CompareAudioCommand.cpp:53
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition:
ComponentInterfaceSymbol.h:27
SettingsVisitorBase
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Definition:
SettingsVisitor.h:79
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition:
ShuttleGui.h:640
TaggedIdentifier< ManualPageIDTag >
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:203
Generated by
1.9.3