cpal/src/wasapi/mod.rs
tomaka 6ae01f437c RFC: Rework the API [WIP] (#165)
* Rework the API to not use futures anymore

* Add some comments

* Update the MacOS backend

* Restore the null implementation

* Add an emscripten backend

* Remove erroneously added feature

* Fix to_f32 formula

* [WIP] Alsa backend

* Alsa backend compiling

* Working ALSA backend

* Fix tests

* Move WASAPI endpoint to endpoint module

* Fix WASAPI warnings

* Rework the WASAPI backend

* Check overflows for voice ID

* Add comments and minor fixes to WASAPI backend

* Add a changelog
2017-10-18 20:24:05 +02:00

21 lines
463 B
Rust

extern crate winapi;
extern crate ole32;
extern crate kernel32;
use std::io::Error as IoError;
pub use self::endpoint::{Endpoint, EndpointsIterator, default_endpoint, SupportedFormatsIterator};
pub use self::voice::{Buffer, EventLoop, VoiceId};
mod com;
mod endpoint;
mod voice;
#[inline]
fn check_result(result: winapi::HRESULT) -> Result<(), IoError> {
if result < 0 {
Err(IoError::from_raw_os_error(result))
} else {
Ok(())
}
}