Skip to content

Removed unnecessary callback member from Stream, made travis build on stable rather than beta. #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ env:
language: rust
rust:
- nightly
- 1.0.0-beta
- stable
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah!

os:
- linux
- osx
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "portaudio"
version = "0.4.9"
version = "0.4.10"
authors = ["Jeremy Letang <[email protected]>",
"Mitchell Nordine <[email protected]>"]
description = "PortAudio bindings for Rust."
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
//!

#![warn(missing_docs)]
#![allow(dead_code)]

#[macro_use] extern crate bitflags;
extern crate libc;
Expand Down
5 changes: 1 addition & 4 deletions src/pa/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@

//! Device management

use pa::{
DeviceIndex,
DeviceInfo
};
use pa::{DeviceIndex, DeviceInfo};
use pa::error::Error;
use ffi;

Expand Down
2 changes: 0 additions & 2 deletions src/pa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ pub struct Stream<I: Sample, O: Sample> {
c_input : Option<ffi::C_PaStreamParameters>,
c_output : Option<ffi::C_PaStreamParameters>,
unsafe_buffer : *mut c_void,
callback_function : Option<StreamCallbackFn<I, O>>,
num_input_channels : i32,
phantom_data_input : ::std::marker::PhantomData<I>,
phantom_data_output : ::std::marker::PhantomData<O>,
Expand All @@ -277,7 +276,6 @@ impl<I: Sample, O: Sample> Stream<I, O> {
c_input : None,
c_output : None,
unsafe_buffer : ptr::null_mut(),
callback_function : None,
num_input_channels : 0,
phantom_data_input : ::std::marker::PhantomData,
phantom_data_output : ::std::marker::PhantomData,
Expand Down
5 changes: 4 additions & 1 deletion src/pa/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,15 @@ pub type StreamCallbackFn<I, O> =
Box<FnMut(&[I], &mut[O], u32, &StreamCallbackTimeInfo, StreamCallbackFlags)
-> StreamCallbackResult>;

#[doc(hidden)]
/// The result of the StreamCallbackFn.
#[derive(Copy, Clone)]
#[repr(C)]
pub enum StreamCallbackResult {
/// Continue the stream.
Continue = 0,
/// The stream has completed.
Complete = 1,
/// Abort the stream.
Abort = 2
}

Expand Down