From: Phil Burk Date: Thu, 21 Jan 2021 16:17:27 +0000 (-0800) Subject: docs: Pa_OpenStream() fails if sampleRate unavailable (#446) X-Git-Tag: v19.7.0~39 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=f7efb6b53cf134ec9165da7f6a3c0172371b820a;p=portaudio docs: Pa_OpenStream() fails if sampleRate unavailable (#446) It was not clear in the previous docs. Fixes #443 --- diff --git a/include/portaudio.h b/include/portaudio.h index 0c5b6a4..5d84731 100644 --- a/include/portaudio.h +++ b/include/portaudio.h @@ -849,7 +849,10 @@ typedef int PaStreamCallback( outputParameters must be NULL for input-only streams. @param sampleRate The desired sampleRate. For full-duplex streams it is the - sample rate for both input and output + sample rate for both input and output. Note that the actual sampleRate + may differ very slightly from the desired rate because of hardware limitations. + The exact rate can be queried using Pa_GetStreamInfo(). If nothing close + to the desired sampleRate is available then the open will fail and return an error. @param framesPerBuffer The number of frames passed to the stream callback function, or the preferred block granularity for a blocking read/write stream.