PortAudio 2.0
patest_stop_playout.c File Reference

Test whether all queued samples are played when Pa_StopStream() is used with a callback or read/write stream, or when the callback returns paComplete. More...

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

Data Structures

struct  TestData
 

Macros

#define SAMPLE_RATE   (44100)
 
#define FRAMES_PER_BUFFER   (1024)
 
#define TONE_SECONDS   (1) /* long tone */
 
#define TONE_FADE_SECONDS   (.04) /* fades at start and end of long tone */
 
#define GAP_SECONDS   (.25) /* gap between long tone and blip */
 
#define BLIP_SECONDS   (.035) /* short blip */
 
#define NUM_REPEATS   (3)
 
#define M_PI   (3.14159265)
 
#define TABLE_SIZE   (2048)
 
#define MIN(a, b)
 

Functions

int main (void)
 

Variables

volatile int testCallback2Finished = 0
 

Detailed Description

Test whether all queued samples are played when Pa_StopStream() is used with a callback or read/write stream, or when the callback returns paComplete.

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

Macro Definition Documentation

◆ BLIP_SECONDS

#define BLIP_SECONDS   (.035) /* short blip */

◆ FRAMES_PER_BUFFER

#define FRAMES_PER_BUFFER   (1024)

Referenced by main().

◆ GAP_SECONDS

#define GAP_SECONDS   (.25) /* gap between long tone and blip */

◆ M_PI

#define M_PI   (3.14159265)

◆ MIN

#define MIN ( a,
b )
Value:
(((a)<(b))?(a):(b))

◆ NUM_REPEATS

#define NUM_REPEATS   (3)

Referenced by main().

◆ SAMPLE_RATE

#define SAMPLE_RATE   (44100)

Referenced by main().

◆ TABLE_SIZE

#define TABLE_SIZE   (2048)

◆ TONE_FADE_SECONDS

#define TONE_FADE_SECONDS   (.04) /* fades at start and end of long tone */

◆ TONE_SECONDS

#define TONE_SECONDS   (1) /* long tone */

Function Documentation

◆ main()

Variable Documentation

◆ testCallback2Finished

volatile int testCallback2Finished = 0

Referenced by main().