]> Repos - portaudio/commitdiff
docs: Pa_OpenStream() fails if sampleRate unavailable (#446)
authorPhil Burk <philburk@mobileer.com>
Thu, 21 Jan 2021 16:17:27 +0000 (08:17 -0800)
committerGitHub <noreply@github.com>
Thu, 21 Jan 2021 16:17:27 +0000 (08:17 -0800)
It was not clear in the previous docs.
Fixes #443

include/portaudio.h

index 0c5b6a496545d32965ad3efc55c2a1e16e5427e2..5d847314ae9ba0e57468cccf4cfd52f9e100cf45 100644 (file)
@@ -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.