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

Pass input directly to output. More...

#include <stdio.h>
#include <math.h>
#include "portaudio.h"

Data Structures

struct  WireConfig_s
 

Macros

#define SAMPLE_RATE   (44100)
 
#define USE_FLOAT_INPUT   (1)
 
#define USE_FLOAT_OUTPUT   (1)
 
#define INPUT_FORMAT   paFloat32
 
#define OUTPUT_FORMAT   paFloat32
 
#define CONVERT_IN_TO_OUT(in)   ((OUTPUT_SAMPLE) ((in) * gInOutScaler))
 
#define INPUT_DEVICE   (Pa_GetDefaultInputDevice())
 
#define OUTPUT_DEVICE   (Pa_GetDefaultOutputDevice())
 
#define CHECK_FLAG_COUNT(member)   if( config->member > 0 ) printf("FLAGS SET: " #member " = %d\n", config->member );
 

Typedefs

typedef struct WireConfig_s WireConfig_t
 
typedef float INPUT_SAMPLE
 
typedef float OUTPUT_SAMPLE
 

Functions

int main (void)
 

Variables

double gInOutScaler = 1.0
 

Detailed Description

Pass input directly to output.

Note that some HW devices, for example many ISA audio cards on PCs, do NOT support full duplex! For a PC, you normally need a PCI based audio card such as the SBLive.

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

While adapting to V19-API, I excluded configs with framesPerCallback=0 because of an assert in file pa_common/pa_process.c. Pieter, Oct 9, 2003.

Macro Definition Documentation

#define CHECK_FLAG_COUNT (   member)    if( config->member > 0 ) printf("FLAGS SET: " #member " = %d\n", config->member );
#define CONVERT_IN_TO_OUT (   in)    ((OUTPUT_SAMPLE) ((in) * gInOutScaler))
#define INPUT_DEVICE   (Pa_GetDefaultInputDevice())
#define INPUT_FORMAT   paFloat32
#define OUTPUT_DEVICE   (Pa_GetDefaultOutputDevice())
#define OUTPUT_FORMAT   paFloat32
#define SAMPLE_RATE   (44100)
#define USE_FLOAT_INPUT   (1)
#define USE_FLOAT_OUTPUT   (1)

Typedef Documentation

typedef float INPUT_SAMPLE
typedef float OUTPUT_SAMPLE
typedef struct WireConfig_s WireConfig_t

Function Documentation

int main ( void  )

Variable Documentation

double gInOutScaler = 1.0