diff options
Diffstat (limited to '3rdparty/portaudio/test/patest_timing.c')
-rw-r--r-- | 3rdparty/portaudio/test/patest_timing.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/3rdparty/portaudio/test/patest_timing.c b/3rdparty/portaudio/test/patest_timing.c index ed8a11ad384..2a240b43e4d 100644 --- a/3rdparty/portaudio/test/patest_timing.c +++ b/3rdparty/portaudio/test/patest_timing.c @@ -1,8 +1,8 @@ /** @file patest_timing.c - @ingroup test_src - @brief Play a sine wave for several seconds, and spits out a ton of timing info while it's at it. Based on patest_sine.c - @author Bjorn Roche - @author Ross Bencina <rossb@audiomulch.com> + @ingroup test_src + @brief Play a sine wave for several seconds, and spits out a ton of timing info while it's at it. Based on patest_sine.c + @author Bjorn Roche + @author Ross Bencina <rossb@audiomulch.com> @author Phil Burk <philburk@softsynth.com> */ /* @@ -33,13 +33,13 @@ */ /* - * The text above constitutes the entire PortAudio license; however, + * The text above constitutes the entire PortAudio license; however, * the PortAudio community also makes the following non-binding requests: * * Any person wishing to distribute modifications to the Software is * requested to send the modifications to the original developer so that - * they can be incorporated into the canonical version. It is also - * requested that these non-binding requests be included along with the + * they can be incorporated into the canonical version. It is also + * requested that these non-binding requests be included along with the * license above. */ @@ -90,7 +90,7 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer, timeInfo->outputBufferDacTime ); printf( "getStreamTime() returns: %g\n", Pa_GetStreamTime(data->stream) - data->start ); - + for( i=0; i<framesPerBuffer; i++ ) { *out++ = data->sine[data->left_phase]; /* left */ @@ -100,7 +100,7 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer, data->right_phase += 3; /* higher pitch so we can distinguish left and right. */ if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE; } - + return paContinue; } @@ -114,16 +114,16 @@ int main(void) paTestData data; int i; - + printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER); - + /* initialise sinusoidal wavetable */ for( i=0; i<TABLE_SIZE; i++ ) { data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. ); } data.left_phase = data.right_phase = 0; - + err = Pa_Initialize(); if( err != paNoError ) goto error; @@ -162,11 +162,11 @@ int main(void) Pa_Terminate(); printf("Test finished.\n"); printf("The tone should have been heard for about 5 seconds and all the timing info above should report that about 5 seconds elapsed (except Adc, which is undefined since there was no input device opened).\n"); - + return err; error: Pa_Terminate(); - fprintf( stderr, "An error occured while using the portaudio stream\n" ); + fprintf( stderr, "An error occurred while using the portaudio stream\n" ); fprintf( stderr, "Error number: %d\n", err ); fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) ); return err; |