Function portaudio::pa::is_format_supported
[-]
[+]
[src]
pub fn is_format_supported(input_parameters: &PaStreamParameters, output_parameters: &PaStreamParameters, sample_rate: f64) -> PaError
Determine whether it would be possible to open a stream with the specified parameters.
Arguments
- input_parameters - A structure that describes the input parameters used to open a stream. The suggestedLatency field is ignored. See PaStreamParameters for a description of these parameters. inputParameters must be None for output-only streams.
- output_parameters - A structure that describes the output parameters used to open a stream. The suggestedLatency field is ignored. See PaStreamParameters for a description of these parameters. outputParameters must be None for input-only streams.
- sample_rate - The required sampleRate. For full-duplex streams it is the sample rate for both input and output.
Return 0 if the format is supported, and an error code indicating why the format is not supported otherwise. The constant PaFormatIsSupported is provided to compare with the return value for success.