Update for rustc
This commit is contained in:
parent
c82d978c59
commit
0fa579d885
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
|
|
||||||
name = "cpal"
|
name = "cpal"
|
||||||
version = "0.0.13"
|
version = "0.0.14"
|
||||||
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
||||||
description = "Cross-platform audio playing library in pure Rust."
|
description = "Cross-platform audio playing library in pure Rust."
|
||||||
repository = "https://github.com/tomaka/cpal"
|
repository = "https://github.com/tomaka/cpal"
|
||||||
|
|
|
@ -140,7 +140,7 @@ impl Drop for Voice {
|
||||||
impl<'a, T> Buffer<'a, T> {
|
impl<'a, T> Buffer<'a, T> {
|
||||||
pub fn get_buffer<'b>(&'b mut self) -> &'b mut [T] {
|
pub fn get_buffer<'b>(&'b mut self) -> &'b mut [T] {
|
||||||
unsafe {
|
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<Voice, String> {
|
||||||
|
|
||||||
fn check_result(result: winapi::HRESULT) -> Result<(), String> {
|
fn check_result(result: winapi::HRESULT) -> Result<(), String> {
|
||||||
if result < 0 {
|
if result < 0 {
|
||||||
return Err(::std::os::error_string(result as usize)); // TODO:
|
return Err(::std::os::error_string(result)); // TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue