[][src]Function soundio::have_backend

pub fn have_backend(backend: Backend) -> bool

Return true if libsoundio supports the given Backend.

Although the internal implementation is slightly different, this is effectively the same as using Context::available_backends() to check for backend support.

Both functions only check whether libsoundio was built with support for the given backends. They don't try to connect to them or check they are supported by the host system.

Examples

let backend_list = [
	soundio::Backend::Jack,
	soundio::Backend::PulseAudio,
	soundio::Backend::Alsa,
	soundio::Backend::CoreAudio,
	soundio::Backend::Wasapi,
	soundio::Backend::Dummy,
];

for &backend in backend_list.iter() {
	println!("Backend {} available? {}", backend, soundio::have_backend(backend));
}