Skip to content

Commit

Permalink
Remove rust docs :(
Browse files Browse the repository at this point in the history
  • Loading branch information
wmedrano committed Jan 4, 2017
1 parent 5860d66 commit fd46cae
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 58 deletions.
5 changes: 0 additions & 5 deletions src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ pub struct CycleTimes {
}

/// A client to interact with a JACK server.
///
/// # Example
/// ```
/// // TODO: make example
/// ```
#[derive(Debug)]
pub struct Client {
client: *mut j::jack_client_t,
Expand Down
16 changes: 0 additions & 16 deletions src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ unsafe extern "C" fn info_wrapper(msg: *const i8) {
static IS_INFO_CALLBACK_SET: Once = ONCE_INIT;
/// Set the global JACK info callback. It is recommended to use the [log
/// crate](https://cratse.io/crates/log).
///
/// # Example
/// ```rust
/// fn info_log(msg: &str) {
/// println!("{}", msg);
/// }
/// jack::set_info_callback(info_log);
/// ```
pub fn set_info_callback(info: fn(&str)) {
INFO_FN.lock().unwrap().set(info);
IS_INFO_CALLBACK_SET.call_once(|| unsafe { j::jack_set_info_function(Some(info_wrapper)) })
Expand All @@ -39,14 +31,6 @@ pub fn set_info_callback(info: fn(&str)) {
static IS_ERROR_CALLBACK_SET: Once = ONCE_INIT;
/// Set the global JACK error callback. It is recommended to use the [log
/// crate](https://cratse.io/crates/log).
///
/// # Example
/// ```rust
/// fn error_log(msg: &str) {
/// println!("{}", msg);
/// }
/// jack::set_error_callback(error_log);
/// ```
pub fn set_error_callback(error: fn(&str)) {
ERROR_FN.lock().unwrap().set(error);
IS_ERROR_CALLBACK_SET.call_once(|| unsafe { j::jack_set_error_function(Some(error_wrapper)) })
Expand Down
37 changes: 0 additions & 37 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,40 +1,3 @@
//! ```rust
//! extern crate jack;
//!
//! fn main() {
//! // Create client
//! let (mut client, _status) =
//! jack::Client::open("rust_jack_simple",
//! jack::client_options::NO_START_SERVER)
//! .unwrap();
//!
//! // Register ports. They will be used in a callback when new data is available.
//! let in_a = client.register_port("rust_in_l", jack::AudioInSpec::default()).unwrap();
//! let in_b = client.register_port("rust_in_r", jack::AudioInSpec::default()).unwrap();
//! let mut out_a = client.register_port("rust_out_l", jack::AudioOutSpec::default()).unwrap();
//! let mut out_b = client.register_port("rust_out_r", jack::AudioOutSpec::default()).unwrap();
//! let process_callback = move |ps: &jack::ProcessScope| -> jack::JackControl {
//! let mut out_a_p = jack::AudioOutPort::new(&mut out_a, ps);
//! let mut out_b_p = jack::AudioOutPort::new(&mut out_b, ps);
//! let in_a_p = jack::AudioInPort::new(&in_a, ps);
//! let in_b_p = jack::AudioInPort::new(&in_b, ps);
//! out_a_p.clone_from_slice(&in_a_p);
//! out_b_p.clone_from_slice(&in_b_p);
//! jack::JackControl::Continue
//! };
//!
//! // Activate the client, which starts the processing.
//! let active_client = client.activate(process_callback).unwrap();
//!
//! // Wait for user input to quit
//! use std::io;
//! println!("Press enter/return to quit...");
//! let mut user_input = String::new();
//! io::stdin().read_line(&mut user_input).ok();
//!
//! active_client.deactivate().unwrap();
//! }
//! ```
#[macro_use]
extern crate bitflags;
extern crate jack_sys;
Expand Down

0 comments on commit fd46cae

Please sign in to comment.