2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
Noise.h
|
|
|
|
|
|
|
|
Dominic Mazzoni
|
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
An effect to add white noise.
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef __AUDACITY_EFFECT_NOISE__
|
|
|
|
#define __AUDACITY_EFFECT_NOISE__
|
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
#include <wx/string.h>
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
#include "../widgets/NumericTextCtrl.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
#include "Effect.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-06-18 14:24:36 +00:00
|
|
|
class ShuttleGui;
|
|
|
|
|
2015-04-19 03:49:05 +00:00
|
|
|
#define NOISE_PLUGIN_SYMBOL XO("Noise")
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2016-02-24 06:06:39 +00:00
|
|
|
class EffectNoise final : public Effect
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
EffectNoise();
|
|
|
|
virtual ~EffectNoise();
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
// IdentInterface implementation
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2016-02-24 06:06:47 +00:00
|
|
|
wxString GetSymbol() override;
|
|
|
|
wxString GetDescription() override;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
// EffectIdentInterface implementation
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2016-02-24 06:06:47 +00:00
|
|
|
EffectType GetType() override;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
// EffectClientInterface implementation
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2016-09-02 19:53:09 +00:00
|
|
|
unsigned GetAudioOutCount() override;
|
2016-02-24 06:06:47 +00:00
|
|
|
sampleCount ProcessBlock(float **inBlock, float **outBlock, sampleCount blockLen) override;
|
|
|
|
bool GetAutomationParameters(EffectAutomationParameters & parms) override;
|
|
|
|
bool SetAutomationParameters(EffectAutomationParameters & parms) override;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
// Effect implementation
|
2015-01-01 10:34:48 +00:00
|
|
|
|
2016-02-24 06:06:47 +00:00
|
|
|
bool Startup() override;
|
|
|
|
void PopulateOrExchange(ShuttleGui & S) override;
|
|
|
|
bool TransferDataToWindow() override;
|
|
|
|
bool TransferDataFromWindow() override;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
private:
|
|
|
|
// EffectNoise implementation
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
private:
|
|
|
|
int mType;
|
|
|
|
double mAmp;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2013-02-14 01:10:59 +00:00
|
|
|
float y, z, buf0, buf1, buf2, buf3, buf4, buf5, buf6;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2014-11-08 15:18:43 +00:00
|
|
|
NumericTextCtrl *mNoiseDurationT;
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|