cpal/src/wasapi/mod.rs
Tatsuyuki Ishi 4d3fe57fe3 Improved buffer management
- ALSA backend: reuse the buffers
- Make `InputBuffer` and `OutputBuffer` types just a wrapper of slice
  * Buffer is now submitted at the end of callback
2019-05-30 17:45:16 +09:00

21 lines
477 B
Rust

extern crate winapi;
use std::io::Error as IoError;
pub use self::device::{Device, Devices, SupportedInputFormats, SupportedOutputFormats, default_input_device, default_output_device};
pub use self::stream::{EventLoop, StreamId};
use self::winapi::um::winnt::HRESULT;
mod com;
mod device;
mod stream;
#[inline]
fn check_result(result: HRESULT) -> Result<(), IoError> {
if result < 0 {
Err(IoError::from_raw_os_error(result))
} else {
Ok(())
}
}