PortAudio  2.0
Data Structures | Macros | Typedefs | Functions | Variables
paqa_devs.c File Reference

Self Testing Quality Assurance app for PortAudio Try to open devices and run through all possible configurations. By default, open only the default devices. Command line options support opening every device, or all input devices, or all output devices. This test does not verify that the configuration works well. It just verifies that it does not crash. It requires a human to listen to the sine wave outputs. More...

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "portaudio.h"
#include "pa_trace.h"
#include "paqa_macros.h"

Data Structures

struct  PaSineOscillator
 
struct  PaQaTestParameters
 
struct  PaQaData
 

Macros

#define _USE_MATH_DEFINES
 
#define RUN_TIME_SECONDS   (1.2)
 
#define BYPASS_TESTS   (0) /* If 1 then skip actual tests and just iterate. */
 
#define MODE_INPUT   (0)
 
#define MODE_OUTPUT   (1)
 
#define MAX_TEST_CHANNELS   (4)
 
#define LOWEST_FREQUENCY   (300.0)
 
#define SINE_AMPLITUDE   (0.2)
 
#define MILLIS_PER_SECOND   (1000.0)
 
#define DEFAULT_FRAMES_PER_BUFFER   (128)
 
#define TEST_LEVEL_QUICK   (0)
 
#define TEST_LEVEL_NORMAL   (1)
 
#define TEST_LEVEL_EXHAUSTIVE   (2)
 
#define SETUP_BUFFERS(_data_type)
 

Typedefs

typedef
PAQA_INSTANTIATE_GLOBALS
struct PaSineOscillator 
PaSineOscillator
 
typedef struct PaQaTestParameters PaQaTestParameters
 
typedef struct PaQaData PaQaData
 

Functions

int main (int argc, char **argv)
 

Variables

PaQaTestParameters kDefaultTestParameters
 

Detailed Description

Self Testing Quality Assurance app for PortAudio Try to open devices and run through all possible configurations. By default, open only the default devices. Command line options support opening every device, or all input devices, or all output devices. This test does not verify that the configuration works well. It just verifies that it does not crash. It requires a human to listen to the sine wave outputs.

Author
Phil Burk http://www.softsynth.com

Pieter adapted to V19 API. Test now relies heavily on Pa_IsFormatSupported(). Uses same 'standard' sample rates as in test pa_devs.c.

Macro Definition Documentation

#define _USE_MATH_DEFINES
#define BYPASS_TESTS   (0) /* If 1 then skip actual tests and just iterate. */
#define DEFAULT_FRAMES_PER_BUFFER   (128)
#define LOWEST_FREQUENCY   (300.0)
#define MAX_TEST_CHANNELS   (4)
#define MILLIS_PER_SECOND   (1000.0)
#define MODE_INPUT   (0)
#define MODE_OUTPUT   (1)
#define RUN_TIME_SECONDS   (1.2)
#define SETUP_BUFFERS (   _data_type)
Value:
_data_type *out; \
int stride; \
if (parameters->useNonInterleaved) { \
/* outputData points to an array of pointers to the buffers. */ \
void **buffers = (void **)outputData; \
out = (_data_type *)buffers[channelIndex]; \
stride = 1; \
} else { \
out = &((_data_type *) outputData)[channelIndex]; \
stride = parameters->numOutputChannels; \
}
#define SINE_AMPLITUDE   (0.2)
#define TEST_LEVEL_EXHAUSTIVE   (2)
#define TEST_LEVEL_NORMAL   (1)
#define TEST_LEVEL_QUICK   (0)

Typedef Documentation

typedef struct PaQaData PaQaData

Function Documentation

int main ( int  argc,
char **  argv 
)

Variable Documentation

PaQaTestParameters kDefaultTestParameters
Initial value:
= {
0,
44100,
0.020,
0,
1,
1,
0,
}
#define RUN_TIME_SECONDS
Definition: paqa_devs.c:66
#define MODE_OUTPUT
Definition: paqa_devs.c:70
#define paFloat32
Definition: portaudio.h:491
#define DEFAULT_FRAMES_PER_BUFFER
Definition: paqa_devs.c:75