mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 23:40:11 +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) :
|
Oscilloscope::Oscilloscope(int w, int h, bool isEnabled) :
|
||||||
_valWidth(w), _valHeight(h),
|
_valWidth(w), _valHeight(h),
|
||||||
_arrSamples(0l), _arrVertices(0l),
|
_arrSamples(0l), _arrVertices(0l),
|
||||||
_valLowpass(0.4f), _valDownsample(3),
|
_valLowpassFactor(0.4f), _valDownsampleFactor(3),
|
||||||
enabled(isEnabled), inputPaused(false) {
|
enabled(isEnabled), inputPaused(false) {
|
||||||
|
|
||||||
// allocate enough space for the sample data and to turn it into
|
// 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
|
// determine lowpass / downsample factors
|
||||||
int lowpass = -int(std::numeric_limits<short>::min()) * _valLowpass;
|
int lowpass = -int(std::numeric_limits<short>::min()) * _valLowpassFactor;
|
||||||
unsigned downsample = _valDownsample;
|
unsigned downsample = _valDownsampleFactor;
|
||||||
// keep half of the buffer for writing and ensure an even vertex count
|
// 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 usedWidth = min(_valWidth, MAX_SAMPLES_PER_CHANNEL / (downsample * 2)) & ~1u;
|
||||||
unsigned usedSamples = usedWidth * downsample;
|
unsigned usedSamples = usedWidth * downsample;
|
||||||
|
|
|
@ -26,8 +26,8 @@ public:
|
||||||
volatile bool enabled;
|
volatile bool enabled;
|
||||||
volatile bool inputPaused;
|
volatile bool inputPaused;
|
||||||
|
|
||||||
void setLowpass(float w) { assert(w > 0.0f && w <= 1.0f); _valLowpass = w; }
|
void setLowpass(float w) { assert(w > 0.0f && w <= 1.0f); _valLowpassFactor = w; }
|
||||||
void setDownsampling(unsigned f) { assert(f > 0); _valDownsample = f; }
|
void setDownsampling(unsigned f) { assert(f > 0); _valDownsampleFactor = f; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// don't copy/assign
|
// don't copy/assign
|
||||||
|
@ -42,8 +42,8 @@ private:
|
||||||
short* _arrVertices;
|
short* _arrVertices;
|
||||||
unsigned _arrWritePos[MAX_CHANNELS];
|
unsigned _arrWritePos[MAX_CHANNELS];
|
||||||
|
|
||||||
float _valLowpass;
|
float _valLowpassFactor;
|
||||||
unsigned _valDownsample;
|
unsigned _valDownsampleFactor;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* defined(__interface__oscilloscope__) */
|
#endif /* defined(__interface__oscilloscope__) */
|
||||||
|
|
Loading…
Reference in a new issue