Logo Search packages:      
Sourcecode: calf version File versions  Download package

int filter_audio_module::get_changed_offsets ( int  generation,
int &  subindex_graph,
int &  subindex_dot,
int &  subindex_gridline 
) [virtual]

Return which graphs need to be redrawn and which can be cached for later reuse

generation 0 (at start) or the last value returned by the function (corresponds to a set of input values)
subindex_graph First graph that has to be redrawn (because it depends on values that might have changed)
subindex_dot First dot that has to be redrawn
subindex_gridline First gridline/legend that has to be redrawn
Return values:
Current generation (to pass when calling the function next time); if different than passed generation value, call the function again to retrieve which graph offsets should be put into cache

Reimplemented from calf_plugins::line_graph_iface.

Definition at line 246 of file modules_dsp.cpp.

    if (fabs(inertia_cutoff.get_last() - old_cutoff) + 100 * fabs(inertia_resonance.get_last() - old_resonance) + fabs(*params[par_mode] - old_mode) > 0.1f)
        old_cutoff = inertia_cutoff.get_last();
        old_resonance = inertia_resonance.get_last();
        old_mode = *params[par_mode];
        subindex_graph = 0;
        subindex_dot = INT_MAX;
        subindex_gridline = INT_MAX;
    else {
        subindex_graph = 0;
        subindex_dot = subindex_gridline = generation ? INT_MAX : 0;
    if (generation == last_calculated_generation)
        subindex_graph = INT_MAX;
    return last_generation;

Generated by  Doxygen 1.6.0   Back to index