Bug 1472001 - Fix cubeb-pulse-rs build with current Rust nightly. r=kamidphish

--HG--
extra : rebase_source : 005e64eb5c73c4ad3bfd1f3553dfb511304648dd
This commit is contained in:
Matthew Gregan 2018-06-29 14:00:12 +12:00
Родитель e3f956cbc6
Коммит 33e0262678
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
The cubeb-pulse-rs git repository is: https://github.com/djg/cubeb-pulse-rs.git
The git commit ID used was f90aecf00ed6e5c67f593b3ecf412a8f3ffc0b1f (2018-04-18 08:06:35 +1000)
The git commit ID used was d0bdf51ebd0a653cc4276d2346db852a3060ade0 (2018-06-29 10:09:52 +1000)

Просмотреть файл

@ -323,8 +323,8 @@ impl Stream {
Ok(unsafe { operation::from_raw_ptr(r) })
}
pub fn get_time(&self) -> Result<(u64)> {
let mut usec: u64 = 0;
pub fn get_time(&self) -> Result<(USec)> {
let mut usec: USec = 0;
let r = unsafe { ffi::pa_stream_get_time(self.raw_mut(), &mut usec) };
error_result!(usec, r)
}

Просмотреть файл

@ -438,7 +438,7 @@ impl<'ctx> StreamOps for PulseStream<'ctx> {
let stm = self.output_stream.as_ref().unwrap();
let r = match stm.get_time() {
Ok(r_usec) => {
let bytes = r_usec.to_bytes(&self.output_sample_spec);
let bytes = USecExt::to_bytes(r_usec, &self.output_sample_spec);
Ok((bytes / self.output_sample_spec.frame_size()) as u64)
}
Err(_) => Err(Error::error()),