Update for rustc

This commit is contained in:
Pierre Krieger 2015-02-22 10:31:25 +01:00
parent ff63e283d5
commit 28bd368658
4 changed files with 20 additions and 17 deletions

View file

@ -3,6 +3,7 @@ extern crate winapi;
extern crate "ole32-sys" as ole32;
use std::{slice, mem, ptr};
use std::marker::PhantomData;
// TODO: determine if should be NoSend or not
pub struct Voice {
@ -16,11 +17,12 @@ pub struct Voice {
playing: bool,
}
pub struct Buffer<'a, T> {
pub struct Buffer<'a, T: 'a> {
render_client: *mut winapi::IAudioRenderClient,
buffer_data: *mut T,
buffer_len: usize,
frames: winapi::UINT32,
marker: PhantomData<&'a mut T>,
}
impl Voice {
@ -86,6 +88,7 @@ impl Voice {
buffer_data: buffer_data,
buffer_len: buffer_len,
frames: frames_available,
marker: PhantomData,
};
return buffer;