From: rbencina Date: Tue, 4 Dec 2012 18:39:48 +0000 (+0000) Subject: increase upper limit for absurd sample rates from 200000 to 384000 Hz. via Richard... X-Git-Tag: pa_stable_v19_20140130_r1919~24 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=33df37a804bb45049af940093c8120f5a0296441;p=portaudio increase upper limit for absurd sample rates from 200000 to 384000 Hz. via Richard from Audacity --- diff --git a/src/common/pa_front.c b/src/common/pa_front.c index 03b5fcf..4e4bb68 100644 --- a/src/common/pa_front.c +++ b/src/common/pa_front.c @@ -824,7 +824,7 @@ static int SampleFormatIsValid( PaSampleFormat format ) - if supplied its hostApi field matches the output device's host Api double sampleRate - - is not an 'absurd' rate (less than 1000. or greater than 200000.) + - is not an 'absurd' rate (less than 1000. or greater than 384000.) - sampleRate is NOT validated against device capabilities PaStreamFlags streamFlags @@ -965,7 +965,7 @@ static PaError ValidateOpenStreamParameters( /* Check for absurd sample rates. */ - if( (sampleRate < 1000.0) || (sampleRate > 200000.0) ) + if( (sampleRate < 1000.0) || (sampleRate > 384000.0) ) return paInvalidSampleRate; if( ((streamFlags & ~paPlatformSpecificFlags) & ~(paClipOff | paDitherOff | paNeverDropInput | paPrimeOutputBuffersUsingStreamCallback ) ) != 0 ) diff --git a/src/common/pa_hostapi.h b/src/common/pa_hostapi.h index 658ad5d..54b527e 100644 --- a/src/common/pa_hostapi.h +++ b/src/common/pa_hostapi.h @@ -264,7 +264,7 @@ typedef struct PaUtilHostApiRepresentation { - if supplied its hostApi field matches the output device's host Api double sampleRate - - is not an 'absurd' rate (less than 1000. or greater than 200000.) + - is not an 'absurd' rate (less than 1000. or greater than 384000.) - sampleRate is NOT validated against device capabilities PaStreamFlags streamFlags