Clean up whitespace in test/ in preparation for .editorconfig. (#417)

* Clean up whitespace in test/ in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF.
This commit is contained in:
Ross Bencina 2021-01-21 23:45:10 +11:00 committed by GitHub
commit f58b69dc36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 998 additions and 998 deletions

View file

@ -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 );