1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-09 06:33:49 +01:00
Files
audacity/src/effects/Noise.h
Paul Licameli 67cec5ad83 Make many counts of tracks and channels unsigned...
... And in some places where a library uses signed types, assert that
the reported number is not negative.

What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
2016-09-07 10:11:41 -04:00

68 lines
1.4 KiB
C++

/**********************************************************************
Audacity: A Digital Audio Editor
Noise.h
Dominic Mazzoni
An effect to add white noise.
**********************************************************************/
#ifndef __AUDACITY_EFFECT_NOISE__
#define __AUDACITY_EFFECT_NOISE__
#include <wx/string.h>
#include "../widgets/NumericTextCtrl.h"
#include "Effect.h"
class ShuttleGui;
#define NOISE_PLUGIN_SYMBOL XO("Noise")
class EffectNoise final : public Effect
{
public:
EffectNoise();
virtual ~EffectNoise();
// IdentInterface implementation
wxString GetSymbol() override;
wxString GetDescription() override;
// EffectIdentInterface implementation
EffectType GetType() override;
// EffectClientInterface implementation
unsigned GetAudioOutCount() override;
sampleCount ProcessBlock(float **inBlock, float **outBlock, sampleCount blockLen) override;
bool GetAutomationParameters(EffectAutomationParameters & parms) override;
bool SetAutomationParameters(EffectAutomationParameters & parms) override;
// Effect implementation
bool Startup() override;
void PopulateOrExchange(ShuttleGui & S) override;
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
private:
// EffectNoise implementation
private:
int mType;
double mAmp;
float y, z, buf0, buf1, buf2, buf3, buf4, buf5, buf6;
NumericTextCtrl *mNoiseDurationT;
};
#endif