1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-11 17:13:37 +02:00

Here we go, update portaudio-v19 to current upstream SVN (revision 1541), should all be working ...

This commit is contained in:
richardash1981
2010-10-03 16:11:10 +00:00
parent 5fe0418f71
commit 7bf7f9306e
76 changed files with 71620 additions and 40691 deletions

View File

@@ -6,7 +6,7 @@
@author Ross Bencina <rossb@audiomulch.com>
*/
/*
* $Id: patest_stop_playout.c,v 1.8 2008-12-31 15:38:36 richardash1981 Exp $
* $Id: patest_stop_playout.c 1446 2010-01-24 12:27:31Z rossb $
*
* This program uses the PortAudio Portable Audio Library.
* For more information see: http://www.portaudio.com/
@@ -331,16 +331,14 @@ int main(void)
err = Pa_StartStream( stream );
if( err != paNoError ) goto error;
printf("\nPlaying 'tone-blip' %d times using callback, stops by returning paComplete from callback.\n", NUM_REPEATS );
printf("If final blip is not intact, callback+paComplete implementation may be faulty.\n\n" );
while( (err = Pa_IsStreamActive( stream )) == 1 )
Pa_Sleep( 5 );
Pa_Sleep( 2 );
if( err != 0 ) goto error;
err = Pa_StopStream( stream );
if( err != paNoError ) goto error;
@@ -349,6 +347,45 @@ int main(void)
Pa_Sleep( 500 );
/* test paComplete ---------------------------------------------------------- */
ResetTestSignalGenerator( &data );
err = Pa_OpenStream(
&stream,
NULL, /* no input */
&outputParameters,
SAMPLE_RATE,
FRAMES_PER_BUFFER,
paClipOff, /* we won't output out of range samples so don't bother clipping them */
TestCallback1,
&data );
if( err != paNoError ) goto error;
err = Pa_StartStream( stream );
if( err != paNoError ) goto error;
printf("\nPlaying 'tone-blip' %d times using callback, stops by returning paComplete from callback.\n", NUM_REPEATS );
printf("If final blip is not intact or is followed by garbage, callback+paComplete implementation may be faulty.\n\n" );
while( (err = Pa_IsStreamActive( stream )) == 1 )
Pa_Sleep( 5 );
printf("Waiting 5 seconds after paComplete before stopping the stream. Tests that buffers are flushed correctly.\n");
Pa_Sleep( 5000 );
if( err != 0 ) goto error;
err = Pa_StopStream( stream );
if( err != paNoError ) goto error;
err = Pa_CloseStream( stream );
if( err != paNoError ) goto error;
Pa_Sleep( 500 );
/* test Pa_StopStream() with callback --------------------------------------- */
ResetTestSignalGenerator( &data );
@@ -378,6 +415,8 @@ int main(void)
while( !testCallback2Finished )
Pa_Sleep( 2 );
Pa_Sleep( 500 );
err = Pa_StopStream( stream );
if( err != paNoError ) goto error;