summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/portaudio/test/patest_hang.c
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/portaudio/test/patest_hang.c')
-rw-r--r--3rdparty/portaudio/test/patest_hang.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/3rdparty/portaudio/test/patest_hang.c b/3rdparty/portaudio/test/patest_hang.c
index 6bda6294389..501b47d6844 100644
--- a/3rdparty/portaudio/test/patest_hang.c
+++ b/3rdparty/portaudio/test/patest_hang.c
@@ -1,8 +1,8 @@
/** @file patest_hang.c
- @ingroup test_src
- @brief Play a sine then hang audio callback to test watchdog.
- @author Ross Bencina <rossb@audiomulch.com>
- @author Phil Burk <philburk@softsynth.com>
+ @ingroup test_src
+ @brief Play a sine then hang audio callback to test watchdog.
+ @author Ross Bencina <rossb@audiomulch.com>
+ @author Phil Burk <philburk@softsynth.com>
*/
/*
* $Id$
@@ -32,13 +32,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.
*/
@@ -77,7 +77,7 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer,
int finished = 0;
double phaseInc = 0.02;
double phase = data->phase;
-
+
(void) inputBuffer; /* Prevent unused argument warning. */
for( i=0; i<framesPerBuffer; i++ )
@@ -87,12 +87,12 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer,
/* This is not a very efficient way to calc sines. */
*out++ = (float) sin( phase ); /* mono */
}
-
+
if( data->sleepFor > 0 )
{
Pa_Sleep( data->sleepFor );
}
-
+
data->phase = phase;
return finished;
}
@@ -106,7 +106,7 @@ int main(void)
PaError err;
int i;
paTestData data = {0};
-
+
printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n",
SAMPLE_RATE, FRAMES_PER_BUFFER );
@@ -115,8 +115,8 @@ int main(void)
outputParameters.device = Pa_GetDefaultOutputDevice(); /* Default output device. */
if (outputParameters.device == paNoDevice) {
- fprintf(stderr,"Error: No default output device.\n");
- goto error;
+ fprintf(stderr,"Error: No default output device.\n");
+ goto error;
}
outputParameters.channelCount = 1; /* Mono output. */
outputParameters.sampleFormat = paFloat32; /* 32 bit floating point. */
@@ -132,7 +132,7 @@ int main(void)
patestCallback,
&data);
if (err != paNoError) goto error;
-
+
err = Pa_StartStream( stream );
if( err != paNoError ) goto error;
@@ -144,10 +144,10 @@ int main(void)
data.sleepFor = i;
Pa_Sleep( ((i<1000) ? 1000 : i) );
}
-
+
printf("Suffer for 10 seconds.\n");
Pa_Sleep( 10000 );
-
+
err = Pa_StopStream( stream );
if( err != paNoError ) goto error;
err = Pa_CloseStream( stream );
@@ -157,7 +157,7 @@ int main(void)
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;