patest_maxsines.c File Reference

How many sine waves can we calculate and play in less than 80% CPU Load. More...

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

Data Structures

struct  paTestData

Defines

#define MAX_SINES   (500)
#define MAX_USAGE   (0.8)
#define SAMPLE_RATE   (44100)
#define FREQ_TO_PHASE_INC(freq)   (freq/(float)SAMPLE_RATE)
#define MIN_PHASE_INC   FREQ_TO_PHASE_INC(200.0f)
#define MAX_PHASE_INC   (MIN_PHASE_INC * (1 << 5))
#define FRAMES_PER_BUFFER   (512)
#define TWOPI   (M_PI * 2.0)
#define TABLE_SIZE   (512)

Functions

float LookupSine (paTestData *data, float phase)
int main (void)

Detailed Description

How many sine waves can we calculate and play in less than 80% CPU Load.

Author:
Ross Bencina <rossb@audiomulch.com>
Phil Burk <philburk@softsynth.com>

Define Documentation

#define FRAMES_PER_BUFFER   (512)
#define FREQ_TO_PHASE_INC ( freq   )     (freq/(float)SAMPLE_RATE)
#define MAX_PHASE_INC   (MIN_PHASE_INC * (1 << 5))
#define MAX_SINES   (500)
#define MAX_USAGE   (0.8)

Referenced by main().

#define MIN_PHASE_INC   FREQ_TO_PHASE_INC(200.0f)
#define SAMPLE_RATE   (44100)
#define TABLE_SIZE   (512)
#define TWOPI   (M_PI * 2.0)

Function Documentation

float LookupSine ( paTestData data,
float  phase 
)

References paTestData::sine, and TABLE_SIZE.

int main ( void   ) 

Generated for PortAudio by  doxygen1.6.1