Value Pair based on the template class pair (STL). It is used
by calcCacheAmp as return value.
static ValuePair calcCacheAmp(const AudioCache& cache, const Mode which)
Function to calculate the range of the loaded
amplitudes in the audio cache and returns it depending on the
parameter which. which can be: MAX/MIN/AVE/ABS/SUM,
so that calcCacheAmp returns the maximal amplitude range, the minimal,
the average (above and below 0), an absolute range (from 0 to sum of
max pos and max neg amplitude) or the sum of all amplitudes (the
integral/the energy)
- Throws:
- Exception , if the mode is unknown
- Returns:
- the range (two values: positive first) as a ValuePair
- Parameters:
- cache - audio cache containing the signal
which - calculation mode