Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Fixed some comments
Browse files Browse the repository at this point in the history
askeksa committed Nov 5, 2019
1 parent 50bc47f commit 7ffe280
Showing 4 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions src/buffer.rs
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ impl<'a, T> Inputs<'a, T> {
self.len() == 0
}

/// Access channel at the given index, unchecked
/// Access channel at the given index
pub fn get(&self, i: usize) -> &'a [T] {
unsafe { slice::from_raw_parts(self.bufs[i], self.samples) }
}
@@ -217,12 +217,12 @@ impl<'a, T> Outputs<'a, T> {
self.len() == 0
}

/// Access channel at the given index, unchecked
/// Access channel at the given index
pub fn get(&self, i: usize) -> &'a [T] {
unsafe { slice::from_raw_parts(self.bufs[i], self.samples) }
}

/// Mutably access channel at the given index, unchecked
/// Mutably access channel at the given index
pub fn get_mut(&mut self, i: usize) -> &'a mut [T] {
unsafe { slice::from_raw_parts_mut(self.bufs[i], self.samples) }
}
@@ -295,7 +295,9 @@ impl<'a, 'b, T: Sized> IntoIterator for &'b mut Outputs<'a, T> {

use event::{Event, MidiEvent, SysExEvent};

/// This is used as a placeholder to pre-allocate space for a fixed number of midi events in the re-useable `SendEventBuffer`, because `SysExEvent` is larger than `MidiEvent`, so either one can be stored in a `SysExEvent`.
/// This is used as a placeholder to pre-allocate space for a fixed number of
/// midi events in the re-useable `SendEventBuffer`, because `SysExEvent` is
/// larger than `MidiEvent`, so either one can be stored in a `SysExEvent`.
pub type PlaceholderEvent = api::SysExEvent;

/// This trait is used by `SendEventBuffer::send_events` to accept iterators over midi events
4 changes: 3 additions & 1 deletion src/plugin.rs
Original file line number Diff line number Diff line change
@@ -677,7 +677,9 @@ pub trait Plugin {
}

/// Called one time before the start of process call.
/// This indicates that the process call will be interrupted (due to Host reconfiguration or bypass state when the plug-in doesn't support softBypass).
///
/// This indicates that the process call will be interrupted (due to Host reconfiguration
/// or bypass state when the plug-in doesn't support softBypass).
///
/// This method is only called while the plugin is in the *resumed* state.
fn start_process(&mut self) {}
1 change: 0 additions & 1 deletion src/util/atomic_float.rs
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ use std::sync::atomic::{AtomicU32, Ordering};
/// multiple threads when no synchronization or change notification
/// is needed.
pub struct AtomicFloat {
// TODO: Change atomic to AtomicU32 when stabilized (expected in 1.34).
atomic: AtomicU32,
}

1 change: 0 additions & 1 deletion src/util/parameter_transfer.rs
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ fn word_and_bit(index: usize) -> (usize, usize) {
/// Supports efficient iteration over parameters that changed since last iteration.
#[derive(Default)]
pub struct ParameterTransfer {
// TODO: Change values to AtomicU32 when stabilized (expected in 1.34).
values: Vec<AtomicU32>,
changed: Vec<AtomicUsize>,
}

0 comments on commit 7ffe280

Please sign in to comment.