Skip to content

Commit

Permalink
doc: fix the documentation following API changes (#30)
Browse files Browse the repository at this point in the history
* doc: fix the documentation following API changes
* lint: fix new lint errors
  • Loading branch information
hfiguiere authored Jan 15, 2023
1 parent 615e63b commit ec37409
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl LV2AtomSequence {
std::mem::size_of_val(&sequence.atom) as u32 + sequence.atom.size;
if (self.buffer.len() as u32) < current_sequence_size + event_size {
return Err(EventError::SequenceFull {
capacity: self.capacity() as usize,
capacity: self.capacity(),
requested: (current_sequence_size + event_size) as usize,
});
}
Expand Down
10 changes: 0 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! let world = livi::World::new();
//! const SAMPLE_RATE: f64 = 44100.0;
//! let features = world.build_features(livi::FeaturesBuilder::default());
//! let worker_manager = features.worker_manager().clone();
//! let plugin = world
//! // This is the URI for mda EPiano. You can use the `lv2ls` command line
//! // utility to see all available LV2 plugins.
Expand Down Expand Up @@ -36,15 +35,6 @@
//! .with_atom_sequence_inputs(std::iter::once(&input))
//! .with_audio_outputs(outputs.iter_mut().map(|output| output.as_mut_slice()));
//! unsafe { instance.run(features.max_block_length(), ports).unwrap() };
//!
//! // Plugins may push asynchronous works to the worker. When operating in
//! // Realtime, `run_workers` should be run in a separate thread.
//! std::thread::spawn(move || loop {
//! worker_manager.run_workers();
//! // Add some sleep to avoid busy looping.
//! // Busy looping may lead to increased CPU usage.
//! std::thread::sleep(std::time::Duration::from_millis(100));
//! });
//! ```
use log::{debug, error, info, warn};
use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ fn node_to_value(maybe_node: &Option<lilv::node::Node>) -> f32 {
None => return 0.0,
};
if n.is_float() {
n.as_float().map(|f| f as f32).unwrap_or(0.0)
n.as_float().unwrap_or(0.0)
} else if n.is_int() {
n.as_int().unwrap_or(0) as f32
} else if n.as_bool().unwrap_or(false) {
Expand Down

0 comments on commit ec37409

Please sign in to comment.