mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 09:23:17 +02:00
clarifies some names
This commit is contained in:
parent
989256aad0
commit
4f3f5e1abe
2 changed files with 7 additions and 7 deletions
|
@ -35,7 +35,7 @@ namespace { // everything in here only exists while compiling this .cpp file
|
|||
Oscilloscope::Oscilloscope(int w, int h, bool isEnabled) :
|
||||
_valWidth(w), _valHeight(h),
|
||||
_arrSamples(0l), _arrVertices(0l),
|
||||
_valLowpass(0.4f), _valDownsample(3),
|
||||
_valLowpassFactor(0.4f), _valDownsampleFactor(3),
|
||||
enabled(isEnabled), inputPaused(false) {
|
||||
|
||||
// allocate enough space for the sample data and to turn it into
|
||||
|
@ -95,8 +95,8 @@ void Oscilloscope::render(int x, int y) {
|
|||
}
|
||||
|
||||
// determine lowpass / downsample factors
|
||||
int lowpass = -int(std::numeric_limits<short>::min()) * _valLowpass;
|
||||
unsigned downsample = _valDownsample;
|
||||
int lowpass = -int(std::numeric_limits<short>::min()) * _valLowpassFactor;
|
||||
unsigned downsample = _valDownsampleFactor;
|
||||
// keep half of the buffer for writing and ensure an even vertex count
|
||||
unsigned usedWidth = min(_valWidth, MAX_SAMPLES_PER_CHANNEL / (downsample * 2)) & ~1u;
|
||||
unsigned usedSamples = usedWidth * downsample;
|
||||
|
|
|
@ -26,8 +26,8 @@ public:
|
|||
volatile bool enabled;
|
||||
volatile bool inputPaused;
|
||||
|
||||
void setLowpass(float w) { assert(w > 0.0f && w <= 1.0f); _valLowpass = w; }
|
||||
void setDownsampling(unsigned f) { assert(f > 0); _valDownsample = f; }
|
||||
void setLowpass(float w) { assert(w > 0.0f && w <= 1.0f); _valLowpassFactor = w; }
|
||||
void setDownsampling(unsigned f) { assert(f > 0); _valDownsampleFactor = f; }
|
||||
|
||||
private:
|
||||
// don't copy/assign
|
||||
|
@ -42,8 +42,8 @@ private:
|
|||
short* _arrVertices;
|
||||
unsigned _arrWritePos[MAX_CHANNELS];
|
||||
|
||||
float _valLowpass;
|
||||
unsigned _valDownsample;
|
||||
float _valLowpassFactor;
|
||||
unsigned _valDownsampleFactor;
|
||||
};
|
||||
|
||||
#endif /* defined(__interface__oscilloscope__) */
|
||||
|
|
Loading…
Reference in a new issue