Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
anonymous_namespace{GetWaveDisplay.cpp}::MinMaxSumsq Struct Reference

Public Member Functions

 MinMaxSumsq (const float *pv, int count, int divisor)
 

Public Attributes

float min
 
float max
 
float sumsq
 

Detailed Description

Definition at line 23 of file GetWaveDisplay.cpp.

Constructor & Destructor Documentation

◆ MinMaxSumsq()

anonymous_namespace{GetWaveDisplay.cpp}::MinMaxSumsq::MinMaxSumsq ( const float *  pv,
int  count,
int  divisor 
)
inline

Definition at line 25 of file GetWaveDisplay.cpp.

26 {
27 min = FLT_MAX, max = -FLT_MAX, sumsq = 0.0f;
28 while (count--) {
29 float v;
30 switch (divisor) {
31 default:
32 case 1:
33 // array holds samples
34 v = *pv++;
35 if (v < min)
36 min = v;
37 if (v > max)
38 max = v;
39 sumsq += v * v;
40 break;
41 case 256:
42 case 65536:
43 // array holds triples of min, max, and rms values
44 v = *pv++;
45 if (v < min)
46 min = v;
47 v = *pv++;
48 if (v > max)
49 max = v;
50 v = *pv++;
51 sumsq += v * v;
52 break;
53 }
54 }
55 }

References min().

Here is the call graph for this function:

Member Data Documentation

◆ max

float anonymous_namespace{GetWaveDisplay.cpp}::MinMaxSumsq::max

Definition at line 58 of file GetWaveDisplay.cpp.

◆ min

float anonymous_namespace{GetWaveDisplay.cpp}::MinMaxSumsq::min

Definition at line 57 of file GetWaveDisplay.cpp.

◆ sumsq

float anonymous_namespace{GetWaveDisplay.cpp}::MinMaxSumsq::sumsq

Definition at line 59 of file GetWaveDisplay.cpp.


The documentation for this struct was generated from the following file: