mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-07-26 12:04:13 -04:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user