cpal/src/wasapi/mod.rs

22 lines
463 B
Rust
Raw Normal View History

2014-12-11 14:22:55 +01:00
extern crate winapi;
2015-03-30 11:06:46 +02:00
extern crate ole32;
2016-08-02 16:13:59 +02:00
extern crate kernel32;
2014-12-11 14:22:55 +01:00
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};
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]
2015-09-01 13:53:54 +02:00
fn check_result(result: winapi::HRESULT) -> Result<(), IoError> {
if result < 0 {
Err(IoError::from_raw_os_error(result))
} else {
Ok(())
}
}