Commit c3fed377 authored by gineera's avatar gineera

paqa_devs: limit max number of channels tested (to 4); add a fixed decimal...

paqa_devs: limit max number of channels tested (to 4); add a fixed decimal format to the timestamp printout.

git-svn-id: https://subversion.assembla.com/svn/portaudio/portaudio/trunk@1910 0f58301d-fd10-0410-b4af-bbb618454e57
parent 380acd17
......@@ -59,6 +59,7 @@
/****************************************** Definitions ***********/
#define MODE_INPUT (0)
#define MODE_OUTPUT (1)
#define MAX_TEST_CHANNELS 4
typedef struct PaQaData
{
......@@ -235,6 +236,8 @@ static void TestDevices( int mode )
pdi = Pa_GetDeviceInfo( id );
/* Try 1 to maxChannels on each device. */
maxChannels = (( mode == MODE_INPUT ) ? pdi->maxInputChannels : pdi->maxOutputChannels);
if( maxChannels > MAX_TEST_CHANNELS )
maxChannels = MAX_TEST_CHANNELS;
for( jc=1; jc<=maxChannels; jc++ )
{
......@@ -350,7 +353,7 @@ static int TestAdvance( int mode, PaDeviceIndex deviceID, double sampleRate,
oldStamp = Pa_GetStreamTime(stream);
Pa_Sleep(msec);
newStamp = Pa_GetStreamTime(stream);
printf("oldStamp = %g, newStamp = %g\n", oldStamp, newStamp ); /**/
printf("oldStamp = %9.6f, newStamp = %9.6f\n", oldStamp, newStamp ); /**/
EXPECT( (oldStamp < newStamp) );
/* Check to make sure callback is decrementing framesLeft. */
oldFrames = myData.framesLeft;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment