COMMENTS,POLISHING: comments fenzy around VisualProcessor machinery,

make process() a true interface as strong hint for derived classes,
plus misc define added for understanding.

BUGFIX: FFTDataDistributor loses incoming samples when compacting internal buffers.

BUGFIX2: FFTDistributor: Frozen Waterfall if internal buffer is no bigger than fftSize
This commit is contained in:
vsonnier
2017-02-04 10:32:35 +01:00
parent 0815b6a684
commit 4609386648
13 changed files with 137 additions and 64 deletions
+5
View File
@@ -39,6 +39,7 @@ void WaterfallPanel::refreshTheme() {
void WaterfallPanel::setPoints(std::vector<float> &points) {
size_t halfPts = points.size()/2;
if (halfPts == fft_size) {
for (unsigned int i = 0; i < fft_size; i++) {
this->points[i] = points[i*2+1];
}
@@ -102,6 +103,10 @@ void WaterfallPanel::update() {
unsigned char *waterfall_tex;
//Creates 2x 2D textures into card memory.
//of size half_fft_size * waterfall_lines, which can be BIG.
//The limit of the size of Waterfall is the size of the maximum supported 2D texture
//by the graphic card. (half_fft_size * waterfall_lines, i.e DEFAULT_DEMOD_WATERFALL_LINES_NB * DEFAULT_FFT_SIZE/2)
waterfall_tex = new unsigned char[half_fft_size * waterfall_lines];
memset(waterfall_tex, 0, half_fft_size * waterfall_lines);