diff --git a/Cargo.toml b/Cargo.toml index dbac8a9..c16ddf1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cpal" -version = "0.0.13" +version = "0.0.14" authors = ["Pierre Krieger "] description = "Cross-platform audio playing library in pure Rust." repository = "https://github.com/tomaka/cpal" diff --git a/src/wasapi/mod.rs b/src/wasapi/mod.rs index 538cf67..3810eef 100644 --- a/src/wasapi/mod.rs +++ b/src/wasapi/mod.rs @@ -140,7 +140,7 @@ impl Drop for Voice { impl<'a, T> Buffer<'a, T> { pub fn get_buffer<'b>(&'b mut self) -> &'b mut [T] { unsafe { - slice::from_raw_mut_buf(&self.buffer_data, self.buffer_len) + slice::from_raw_parts_mut(self.buffer_data, self.buffer_len) } } @@ -264,7 +264,7 @@ fn init() -> Result { fn check_result(result: winapi::HRESULT) -> Result<(), String> { if result < 0 { - return Err(::std::os::error_string(result as usize)); // TODO: + return Err(::std::os::error_string(result)); // TODO: } Ok(())