cpal/src/wasapi/mod.rs

21 lines
450 B
Rust
Raw Normal View History

2014-12-11 14:22:55 +01:00
extern crate winapi;
use std::io::Error as IoError;
2014-12-11 14:22:55 +01:00
pub use self::endpoint::{Endpoint, EndpointsIterator, SupportedFormatsIterator, default_endpoint};
pub use self::voice::{Buffer, EventLoop, VoiceId};
use self::winapi::um::winnt::HRESULT;
2015-09-01 13:53:54 +02:00
mod com;
mod endpoint;
mod voice;
2014-12-11 17:23:33 +01:00
2015-09-11 10:55:29 +02:00
#[inline]
fn check_result(result: HRESULT) -> Result<(), IoError> {
2015-09-01 13:53:54 +02:00
if result < 0 {
Err(IoError::from_raw_os_error(result))
} else {
Ok(())
}
}