From f7efb6b53cf134ec9165da7f6a3c0172371b820a Mon Sep 17 00:00:00 2001 From: Phil Burk Date: Thu, 21 Jan 2021 08:17:27 -0800 Subject: [PATCH] docs: Pa_OpenStream() fails if sampleRate unavailable (#446) It was not clear in the previous docs. Fixes #443 --- include/portaudio.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- 2.43.0