summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/portaudio/test/patest_maxsines.c
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/portaudio/test/patest_maxsines.c')
-rw-r--r--3rdparty/portaudio/test/patest_maxsines.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/3rdparty/portaudio/test/patest_maxsines.c b/3rdparty/portaudio/test/patest_maxsines.c
index cfac85842a9..49db8d21c74 100644
--- a/3rdparty/portaudio/test/patest_maxsines.c
+++ b/3rdparty/portaudio/test/patest_maxsines.c
@@ -5,7 +5,7 @@
@author Phil Burk <philburk@softsynth.com>
*/
/*
- * $Id: patest_maxsines.c 1368 2008-03-01 00:38:27Z rossb $
+ * $Id$
*
* This program uses the PortAudio Portable Audio Library.
* For more information see: http://www.portaudio.com
@@ -46,8 +46,8 @@
#include <math.h>
#include "portaudio.h"
-#define MAX_SINES (500)
-#define MAX_USAGE (0.8)
+#define MAX_SINES (2000)
+#define MAX_USAGE (0.5)
#define SAMPLE_RATE (44100)
#define FREQ_TO_PHASE_INC(freq) (freq/(float)SAMPLE_RATE)
@@ -60,7 +60,7 @@
#endif
#define TWOPI (M_PI * 2.0)
-#define TABLE_SIZE (512)
+#define TABLE_SIZE (1024)
typedef struct paTestData
{
@@ -70,7 +70,7 @@ typedef struct paTestData
}
paTestData;
-/* Convert phase between and 1.0 to sine value
+/* Convert phase between 0.0 and 1.0 to sine value
* using linear interpolation.
*/
float LookupSine( paTestData *data, float phase );
@@ -187,14 +187,14 @@ int main(void)
/* Play an increasing number of sine waves until we hit MAX_USAGE */
do {
- data.numSines++;
+ data.numSines += 10;
Pa_Sleep(200);
load = Pa_GetStreamCpuLoad(stream);
printf("numSines = %d, CPU load = %f\n", data.numSines, load );
fflush(stdout);
} while((load < MAX_USAGE) && (data.numSines < MAX_SINES));
- Pa_Sleep(2000); /* Stay for 2 seconds around 80% CPU. */
+ Pa_Sleep(2000); /* Stay for 2 seconds at max CPU. */
err = Pa_StopStream( stream );
if( err != paNoError )