1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-29 15:09:30 +02:00
audacity/src/effects/SimpleMono.h
Paul Licameli 990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
2016-02-26 12:35:38 -05:00

52 lines
1.3 KiB
C++

/**********************************************************************
Audacity: A Digital Audio Editor
SimpleMono.h
Dominic Mazzoni
This abstract class simplifies the implementation of a basic
monaural effect. Inherit from it if your effect doesn't just
modifies a track in place and doesn't care how many samples
it gets at a time. Your derived class only needs to implement
GetEffectName, GetEffectAction, and ProcessSimpleMono.
**********************************************************************/
#ifndef __AUDACITY_EFFECT_SIMPLE_MONO__
#define __AUDACITY_EFFECT_SIMPLE_MONO__
#include "Effect.h"
class WaveTrack;
class EffectSimpleMono /* not final */ : public Effect
{
public:
bool Process() override;
protected:
// Override this method if you need to do things
// before every track (including the first one)
// NEW override
virtual bool NewTrackSimpleMono() = 0;
// Override this method to actually process audio
virtual bool ProcessSimpleMono(float *buffer, sampleCount len) = 0;
protected:
// Other useful information
int mCurTrackNum;
double mCurRate;
double mCurT0;
double mCurT1;
int mCurChannel;
private:
bool ProcessOne(WaveTrack * t, sampleCount start, sampleCount end);
};
#endif