PortAudio  2.0
Macros | Functions
paqa_dither.c File Reference

Tests the dither scaling and conversion accuracy in pa_converters.c. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "portaudio.h"
#include "pa_converters.h"
#include "pa_dither.h"
#include "pa_types.h"
#include "pa_endianness.h"
#include "paqa_macros.h"

Macros

#define PAQA_SHOW_CHARTS   0
 

Functions

int ShowDitherDistribution (void)
 
double CalculateRSquared (double *xa, double *ya, int numPoints)
 
void linearRegression (double *xa, double *ya, int numPoints, double *a, double *b)
 
int TestAllDitherScaling (void)
 
int TestAllDitherClipping (void)
 
int main (int argc, const char **argv)
 

Detailed Description

Tests the dither scaling and conversion accuracy in pa_converters.c.

Author
Phil Burk philb.nosp@m.urk@.nosp@m.mobil.nosp@m.eer..nosp@m.com

Link with pa_dither.c and pa_converters.c

Macro Definition Documentation

#define PAQA_SHOW_CHARTS   0

Function Documentation

double CalculateRSquared ( double *  xa,
double *  ya,
int  numPoints 
)

Calculate the Coefficient of Determination, "R-squared". You want a value as close to 1.0 as possible.

void linearRegression ( double *  xa,
double *  ya,
int  numPoints,
double *  a,
double *  b 
)
int main ( int  argc,
const char **  argv 
)
int ShowDitherDistribution ( void  )

Show a histogram of the dither values.

References PaUtil_Generate16BitTriangularDither(), and PaUtil_InitializeTriangularDitherState().

Referenced by main().

int TestAllDitherClipping ( void  )

References paFloat32, paInt16, paInt32, paInt8, and paUInt8.

Referenced by main().

int TestAllDitherScaling ( void  )

References paFloat32, paInt16, paInt32, and paInt8.

Referenced by main().