Skip to content

Commit dc5b88f

Browse files
committed
Merge pull request #86 from mitchmindtree/master
Removed unnecessary callback member from Stream, made travis build on stable rather than beta.
2 parents f81fa31 + 43f0d83 commit dc5b88f

File tree

6 files changed

+7
-10
lines changed

6 files changed

+7
-10
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ env:
33
language: rust
44
rust:
55
- nightly
6-
- 1.0.0-beta
6+
- stable
77
os:
88
- linux
99
- osx

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "portaudio"
4-
version = "0.4.9"
4+
version = "0.4.10"
55
authors = ["Jeremy Letang <[email protected]>",
66
"Mitchell Nordine <[email protected]>"]
77
description = "PortAudio bindings for Rust."

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
//!
5353
5454
#![warn(missing_docs)]
55-
#![allow(dead_code)]
5655

5756
#[macro_use] extern crate bitflags;
5857
extern crate libc;

src/pa/device.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121

2222
//! Device management
2323
24-
use pa::{
25-
DeviceIndex,
26-
DeviceInfo
27-
};
24+
use pa::{DeviceIndex, DeviceInfo};
2825
use pa::error::Error;
2926
use ffi;
3027

src/pa/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ pub struct Stream<I: Sample, O: Sample> {
260260
c_input : Option<ffi::C_PaStreamParameters>,
261261
c_output : Option<ffi::C_PaStreamParameters>,
262262
unsafe_buffer : *mut c_void,
263-
callback_function : Option<StreamCallbackFn<I, O>>,
264263
num_input_channels : i32,
265264
phantom_data_input : ::std::marker::PhantomData<I>,
266265
phantom_data_output : ::std::marker::PhantomData<O>,
@@ -277,7 +276,6 @@ impl<I: Sample, O: Sample> Stream<I, O> {
277276
c_input : None,
278277
c_output : None,
279278
unsafe_buffer : ptr::null_mut(),
280-
callback_function : None,
281279
num_input_channels : 0,
282280
phantom_data_input : ::std::marker::PhantomData,
283281
phantom_data_output : ::std::marker::PhantomData,

src/pa/types.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,15 @@ pub type StreamCallbackFn<I, O> =
192192
Box<FnMut(&[I], &mut[O], u32, &StreamCallbackTimeInfo, StreamCallbackFlags)
193193
-> StreamCallbackResult>;
194194

195-
#[doc(hidden)]
195+
/// The result of the StreamCallbackFn.
196196
#[derive(Copy, Clone)]
197197
#[repr(C)]
198198
pub enum StreamCallbackResult {
199+
/// Continue the stream.
199200
Continue = 0,
201+
/// The stream has completed.
200202
Complete = 1,
203+
/// Abort the stream.
201204
Abort = 2
202205
}
203206

0 commit comments

Comments
 (0)