Instead of defaulting the sample rate to 44100, use one of the supported device sample rates as reported by RtAudio (see https://github.com/samplecount/methcla/blob/develop/platform/rtaudio/Methcla/Audio/IO/RtAudioDriver.cpp#L71).
Use the same sample rate for input and output device and throw an exception, when no suitable sample rate can be found.