Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wmedrano committed Jan 14, 2017
1 parent 74cd78a commit a5288b8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ extern crate jack_sys;
extern crate lazy_static;
extern crate libc;

/// Defines callback traits and `ProcessScope`.
pub mod callbacks;

/// Create a connection to a JACK server.
pub mod client;

mod info;
mod jack_enums;
mod jack_utils;

/// Types for interacting with port data from JACK.
pub mod port;
mod primitive_types;

mod primitive_types;
pub use info::{set_info_callback, set_error_callback};
pub use jack_enums::{JackControl, JackErr};
pub use primitive_types::{JackFrames, JackPortId, JackTime};
Expand All @@ -23,19 +29,21 @@ pub fn get_time() -> JackTime {
unsafe { jack_sys::jack_get_time() }
}

/// Contains every trait defined in the jack crate.
pub mod traits {
pub use client::JackClient;
pub use callbacks::JackHandler;
pub use port::PortSpec;
}

/// Contains most functionality to interact with JACK.
pub mod prelude {
pub use callbacks::*;
pub use callbacks::{JackHandler, ProcessScope};
pub use client::*;
pub use port::*;
pub use info::*;
pub use jack_enums::*;
pub use port::*;
pub use primitive_types::*;
pub use info::*;
}

#[cfg(test)]
Expand Down
6 changes: 6 additions & 0 deletions src/primitive_types.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
use jack_sys as j;

/// Type used to represent sample frame counts.
pub type JackFrames = j::jack_nframes_t;

/// Type used to represent the value of free running monotonic clock with units of microseconds.
pub type JackTime = j::jack_time_t;

/// Ports have unique ids. A port registration callback is the only place you ever need to know
/// their value.
pub type JackPortId = j::jack_port_id_t;

0 comments on commit a5288b8

Please sign in to comment.