2014-12-11 14:22:55 +01:00
|
|
|
extern crate winapi;
|
|
|
|
|
2015-09-01 11:23:41 +02:00
|
|
|
use std::io::Error as IoError;
|
2014-12-11 14:22:55 +01:00
|
|
|
|
2017-10-23 16:41:38 +02:00
|
|
|
pub use self::endpoint::{Endpoint, EndpointsIterator, SupportedFormatsIterator, default_endpoint};
|
2017-10-18 20:24:05 +02:00
|
|
|
pub use self::voice::{Buffer, EventLoop, VoiceId};
|
2018-02-08 03:36:59 +11:00
|
|
|
use self::winapi::um::winnt::HRESULT;
|
2015-09-01 13:53:54 +02:00
|
|
|
|
2015-09-01 11:23:41 +02:00
|
|
|
mod com;
|
2017-10-18 20:24:05 +02:00
|
|
|
mod endpoint;
|
2015-09-01 11:23:41 +02:00
|
|
|
mod voice;
|
2014-12-11 17:23:33 +01:00
|
|
|
|
2015-09-11 10:55:29 +02:00
|
|
|
#[inline]
|
2018-02-08 03:36:59 +11:00
|
|
|
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(())
|
|
|
|
}
|
|
|
|
}
|