paqa_devs: limit max number of channels tested (to 4); add a fixed decimal format to the timestamp printout.
This commit is contained in:
parent
c23e362fcb
commit
27c3b518cb
1 changed files with 4 additions and 1 deletions
|
|
@ -59,6 +59,7 @@
|
||||||
/****************************************** Definitions ***********/
|
/****************************************** Definitions ***********/
|
||||||
#define MODE_INPUT (0)
|
#define MODE_INPUT (0)
|
||||||
#define MODE_OUTPUT (1)
|
#define MODE_OUTPUT (1)
|
||||||
|
#define MAX_TEST_CHANNELS 4
|
||||||
|
|
||||||
typedef struct PaQaData
|
typedef struct PaQaData
|
||||||
{
|
{
|
||||||
|
|
@ -235,6 +236,8 @@ static void TestDevices( int mode )
|
||||||
pdi = Pa_GetDeviceInfo( id );
|
pdi = Pa_GetDeviceInfo( id );
|
||||||
/* Try 1 to maxChannels on each device. */
|
/* Try 1 to maxChannels on each device. */
|
||||||
maxChannels = (( mode == MODE_INPUT ) ? pdi->maxInputChannels : pdi->maxOutputChannels);
|
maxChannels = (( mode == MODE_INPUT ) ? pdi->maxInputChannels : pdi->maxOutputChannels);
|
||||||
|
if( maxChannels > MAX_TEST_CHANNELS )
|
||||||
|
maxChannels = MAX_TEST_CHANNELS;
|
||||||
|
|
||||||
for( jc=1; jc<=maxChannels; jc++ )
|
for( jc=1; jc<=maxChannels; jc++ )
|
||||||
{
|
{
|
||||||
|
|
@ -350,7 +353,7 @@ static int TestAdvance( int mode, PaDeviceIndex deviceID, double sampleRate,
|
||||||
oldStamp = Pa_GetStreamTime(stream);
|
oldStamp = Pa_GetStreamTime(stream);
|
||||||
Pa_Sleep(msec);
|
Pa_Sleep(msec);
|
||||||
newStamp = Pa_GetStreamTime(stream);
|
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) );
|
EXPECT( (oldStamp < newStamp) );
|
||||||
/* Check to make sure callback is decrementing framesLeft. */
|
/* Check to make sure callback is decrementing framesLeft. */
|
||||||
oldFrames = myData.framesLeft;
|
oldFrames = myData.framesLeft;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue