PortAudio 2.0
patest_converters.c File Reference

Tests the converter functions in pa_converters.c. More...

#include <assert.h>
#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"

Macros

#define M_PI   (3.14159265)
 
#define MAX_PER_CHANNEL_FRAME_COUNT   (2048)
 
#define MAX_CHANNEL_COUNT   (8)
 
#define SAMPLE_FORMAT_COUNT   (6)
 
#define FLAG_COMBINATION_COUNT   (4)
 

Functions

PaError My_Pa_GetSampleSize (PaSampleFormat format)
 
int TestNonZeroPresent (void *buffer, int size)
 
float MaximumAbsDifference (float *sourceBuffer, float *referenceBuffer, int count)
 
int main (int argc, const char **argv)
 

Detailed Description

Tests the converter functions in pa_converters.c.

Author
Ross Bencina rossb.nosp@m.@aud.nosp@m.iomul.nosp@m.ch.c.nosp@m.om

Link with pa_dither.c and pa_converters.c

see http://www.portaudio.com/trac/wiki/V19ConvertersStatus for a discussion of this.

Macro Definition Documentation

◆ FLAG_COMBINATION_COUNT

#define FLAG_COMBINATION_COUNT   (4)

Referenced by main().

◆ M_PI

#define M_PI   (3.14159265)

◆ MAX_CHANNEL_COUNT

#define MAX_CHANNEL_COUNT   (8)

Referenced by main().

◆ MAX_PER_CHANNEL_FRAME_COUNT

#define MAX_PER_CHANNEL_FRAME_COUNT   (2048)

Referenced by main().

◆ SAMPLE_FORMAT_COUNT

#define SAMPLE_FORMAT_COUNT   (6)

Referenced by main().

Function Documentation

◆ main()

◆ MaximumAbsDifference()

float MaximumAbsDifference ( float * sourceBuffer,
float * referenceBuffer,
int count )

Referenced by main().

◆ My_Pa_GetSampleSize()

int My_Pa_GetSampleSize ( PaSampleFormat format)

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

Referenced by main().

◆ TestNonZeroPresent()

int TestNonZeroPresent ( void * buffer,
int size )

References buffer.

Referenced by main().