2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity - A Digital Audio Editor
|
|
|
|
Copyright 1999-2009 Audacity Team
|
|
|
|
License: wxwidgets
|
|
|
|
|
|
|
|
Dan Horgan
|
|
|
|
|
|
|
|
******************************************************************//**
|
|
|
|
|
|
|
|
\file CompareAudioCommand.h
|
|
|
|
\brief Contains declaration of CompareAudioCommand and CompareAudioCommandType
|
|
|
|
classes
|
|
|
|
|
|
|
|
*//*******************************************************************/
|
|
|
|
|
|
|
|
#ifndef __COMPAREAUDIOCOMMAND__
|
|
|
|
#define __COMPAREAUDIOCOMMAND__
|
|
|
|
|
|
|
|
#include "Command.h"
|
|
|
|
#include "CommandType.h"
|
|
|
|
|
|
|
|
class WaveTrack;
|
|
|
|
|
2016-02-24 06:06:39 +00:00
|
|
|
class CompareAudioCommandType final : public CommandType
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-02-24 06:06:47 +00:00
|
|
|
wxString BuildName() override;
|
|
|
|
void BuildSignature(CommandSignature &signature) override;
|
2016-03-31 11:40:05 +00:00
|
|
|
CommandHolder Create(std::unique_ptr<CommandOutputTarget> &&target) override;
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
2016-02-24 06:06:39 +00:00
|
|
|
class CompareAudioCommand final : public CommandImplementation
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
double mT0, mT1;
|
2017-02-22 19:23:35 +00:00
|
|
|
const WaveTrack *mTrack0;
|
|
|
|
const WaveTrack *mTrack1;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
// Update member variables with project selection data (and validate)
|
|
|
|
bool GetSelection(AudacityProject &proj);
|
|
|
|
|
|
|
|
protected:
|
2016-02-24 06:06:47 +00:00
|
|
|
double CompareSample(double value1, double value2) /* not override */;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
public:
|
2016-03-31 11:40:05 +00:00
|
|
|
CompareAudioCommand(CommandType &type, std::unique_ptr<CommandOutputTarget> &&target)
|
|
|
|
: CommandImplementation(type, std::move(target))
|
2010-01-23 19:44:49 +00:00
|
|
|
{ }
|
2016-02-24 06:06:47 +00:00
|
|
|
bool Apply(CommandExecutionContext context) override;
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* End of include guard: __COMPAREAUDIOCOMMAND__ */
|