Audacity  3.2.0
Public Member Functions | Public Attributes | List of all members
anonymous_namespace{Sequence.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 1212 of file Sequence.cpp.

Constructor & Destructor Documentation

◆ MinMaxSumsq()

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

Definition at line 1214 of file Sequence.cpp.

1215  {
1216  min = FLT_MAX, max = -FLT_MAX, sumsq = 0.0f;
1217  while (count--) {
1218  float v;
1219  switch (divisor) {
1220  default:
1221  case 1:
1222  // array holds samples
1223  v = *pv++;
1224  if (v < min)
1225  min = v;
1226  if (v > max)
1227  max = v;
1228  sumsq += v * v;
1229  break;
1230  case 256:
1231  case 65536:
1232  // array holds triples of min, max, and rms values
1233  v = *pv++;
1234  if (v < min)
1235  min = v;
1236  v = *pv++;
1237  if (v > max)
1238  max = v;
1239  v = *pv++;
1240  sumsq += v * v;
1241  break;
1242  }
1243  }
1244  }

References min().

Here is the call graph for this function:

Member Data Documentation

◆ max

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

Definition at line 1247 of file Sequence.cpp.

◆ min

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

Definition at line 1246 of file Sequence.cpp.

◆ sumsq

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

Definition at line 1248 of file Sequence.cpp.


The documentation for this struct was generated from the following file:
anonymous_namespace{Sequence.cpp}::MinMaxSumsq::min
float min
Definition: Sequence.cpp:1246
anonymous_namespace{Sequence.cpp}::MinMaxSumsq::sumsq
float sumsq
Definition: Sequence.cpp:1248
anonymous_namespace{Sequence.cpp}::MinMaxSumsq::max
float max
Definition: Sequence.cpp:1247