From: philburk Date: Tue, 30 Apr 2002 21:21:30 +0000 (+0000) Subject: Add some white space to make it readable. X-Git-Tag: V18~8 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=d96abe7f3c38ccba9d73ae1c08a94ea25117b4c9;p=portaudio Add some white space to make it readable. --- diff --git a/pa_tests/patest_longsine.c b/pa_tests/patest_longsine.c index 3d8bd4c..0e1e337 100644 --- a/pa_tests/patest_longsine.c +++ b/pa_tests/patest_longsine.c @@ -1,7 +1,7 @@ /* * $Id$ * patest_longsine.c - * Play a sine wave using the Portable Audio api forever. + * Play a sine wave using the Portable Audio api until ENTER hit. * * Author: Phil Burk http://www.softsynth.com * @@ -36,10 +36,13 @@ #include #include #include "portaudio.h" + #define SAMPLE_RATE (44100) + #ifndef M_PI #define M_PI (3.14159265) #endif + #define TABLE_SIZE (200) typedef struct { @@ -48,6 +51,7 @@ typedef struct int right_phase; } paTestData; + /* This routine will be called by the PortAudio engine when audio is needed. ** It may called at interrupt level on some machines so don't do anything ** that could mess up the system like calling malloc() or free(). @@ -72,6 +76,7 @@ static int patestCallback( void *inputBuffer, void *outputBuffer, } return 0; } + /*******************************************************************/ int main(void); int main(void) @@ -81,14 +86,17 @@ int main(void) paTestData data; int i; printf("PortAudio Test: output sine wave.\n"); + /* initialise sinusoidal wavetable */ for( i=0; i