Example #1
0
// IsFormatSupported Returns nil if the format is supported, otherwise an error.
// The args parameter has the same meaning as in OpenStream.
func IsFormatSupported(p StreamParameters, args ...interface{}) error {
	s := &Stream{}
	err := s.init(p, args...)
	if err != nil {
		return err
	}
	return newError(C.Pa_IsFormatSupported(s.inParams, s.outParams, C.double(p.SampleRate)))
}
Example #2
0
// IsFormatSupported function as declared in portaudio/portaudio.h:558
func IsFormatSupported(inputParameters *StreamParameters, outputParameters *StreamParameters, sampleRate float64) Error {
	cinputParameters, _ := inputParameters.PassRef()
	coutputParameters, _ := outputParameters.PassRef()
	csampleRate, _ := (C.double)(sampleRate), cgoAllocsUnknown
	__ret := C.Pa_IsFormatSupported(cinputParameters, coutputParameters, csampleRate)
	__v := (Error)(__ret)
	return __v
}