Audacity  2.2.2
Macros | Functions | Variables
BlockFile.cpp File Reference
#include "Audacity.h"
#include "BlockFile.h"
#include <float.h>
#include <cmath>
#include <wx/utils.h>
#include <wx/filefn.h>
#include <wx/ffile.h>
#include <wx/log.h>
#include "Internat.h"
#include "MemoryX.h"
#include "sndfile.h"
#include "FileFormats.h"
#include "AudacityApp.h"

Go to the source code of this file.

Macros

#define BLOCKFILE_DEBUG_OUTPUT(op, i)
 

Functions

static void ComputeMinMax256 (float *summary256, float *outMin, float *outMax, int *outBads)
 

Variables

static const int headerTagLen = 20
 
static char headerTag [headerTagLen+1] = "AudacityBlockFile112"
 

Macro Definition Documentation

#define BLOCKFILE_DEBUG_OUTPUT (   op,
 
)

Definition at line 67 of file BlockFile.cpp.

Referenced by BlockFile::Lock(), and BlockFile::Unlock().

Function Documentation

static void ComputeMinMax256 ( float *  summary256,
float *  outMin,
float *  outMax,
int *  outBads 
)
static

Definition at line 300 of file BlockFile.cpp.

References min().

Referenced by BlockFile::FixSummary().

302 {
303  float min, max;
304  int i;
305  int bad = 0;
306 
307  min = 1.0;
308  max = -1.0;
309  for(i=0; i<256; i++) {
310  if (summary256[3*i] < min)
311  min = summary256[3*i];
312  else if (!(summary256[3*i] >= min))
313  bad++;
314  if (summary256[3*i+1] > max)
315  max = summary256[3*i+1];
316  else if (!(summary256[3*i+1] <= max))
317  bad++;
318  if (std::isnan(summary256[3*i+2]))
319  bad++;
320  if (summary256[3*i+2] < -1 || summary256[3*i+2] > 1)
321  bad++;
322  }
323 
324  *outMin = min;
325  *outMax = max;
326  *outBads = bad;
327 }
int min(int a, int b)

Variable Documentation

char headerTag[headerTagLen+1] = "AudacityBlockFile112"
static

Definition at line 71 of file BlockFile.cpp.

Referenced by BlockFile::CalcSummary().

const int headerTagLen = 20
static

Definition at line 70 of file BlockFile.cpp.

Referenced by BlockFile::CalcSummary(), and SummaryInfo::SummaryInfo().