1
0
Fork 0

Fix broken rustdoc links

This commit is contained in:
Robbert van der Helm 2022-03-27 03:32:45 +02:00
parent 5caca30f83
commit 47a96ee02b
6 changed files with 20 additions and 19 deletions

View file

@ -11,7 +11,7 @@ use super::RawParamEvent;
const GRANULAR_DRAG_MULTIPLIER: f32 = 0.1;
/// A slider that integrates with NIH-plug's [`Param`] types. Use the
/// [`set_style()`][Self::set_style()] method to change how the value gets displayed.
/// [`set_style()`][ParamSliderExt::set_style()] method to change how the value gets displayed.
///
/// TODO: Handle scrolling for steps (and shift+scroll for smaller steps?)
/// TODO: We may want to add a couple dedicated event handlers if it seems like those would be
@ -34,7 +34,7 @@ pub struct ParamSlider {
}
/// How the [`ParamSlider`] should display its values. Set this using
/// [`ParamSliderExt::slider_style()`].
/// [`ParamSliderExt::set_style()`].
#[derive(Debug, Clone, Copy, PartialEq, Eq, Data)]
pub enum ParamSliderStyle {
/// Visualize the offset from the default value for continuous parameters with a default value

View file

@ -39,8 +39,6 @@ where
impl PeakMeter {
/// Creates a new [`PeakMeter`] for the given value in decibel, optionally holding the peak
/// value for a certain amount of time.
///
/// See [`PeakMeterExt`] for additonal options.
pub fn new<L>(
cx: &mut Context,
level_dbfs: L,

View file

@ -8,8 +8,8 @@ use std::simd::{LaneCount, Simd, SupportedLaneCount};
use super::SamplesIter;
/// An iterator over all samples in the buffer, slicing over the sample-dimension with a maximum
/// size of `max_block_size`. See [`Buffer::iter_blocks()`]. Yields both the block and the offset
/// from the start of the buffer.
/// size of `max_block_size`. See [`Buffer::iter_blocks()`][super::Buffer::iter_blocks()]. Yields
/// both the block and the offset from the start of the buffer.
pub struct BlocksIter<'slice, 'sample: 'slice> {
/// The raw output buffers.
pub(super) buffers: *mut [&'sample mut [f32]],
@ -152,7 +152,8 @@ impl<'slice, 'sample> Block<'slice, 'sample> {
}
/// Iterate over this block on a per-sample per-channel basis. This is identical to
/// [`Buffer::iter_samples()`] but for a smaller block instead of the entire buffer
/// [`Buffer::iter_samples()`][super::Buffer::iter_samples()] but for a smaller block instead of
/// the entire buffer
#[inline]
pub fn iter_samples(&mut self) -> SamplesIter<'slice, 'sample> {
SamplesIter {
@ -272,7 +273,8 @@ impl<'slice, 'sample> Block<'slice, 'sample> {
}
/// Write data from a SIMD vector to this sample's channel data for a specific sample in this
/// block. This takes the padding added by [`to_simd()`][Self::to_simd()] into account.
/// block. This takes the padding added by [`to_channel_simd()`][Self::to_channel_simd()] into
/// account.
///
/// Returns `false` if `sample_index` is out of bounds.
#[cfg(feature = "simd")]

View file

@ -19,9 +19,9 @@ pub struct SamplesIter<'slice, 'sample: 'slice> {
}
/// Can construct iterators over actual iterator over the channel data for a sample, yielded by
/// [`SamplesIter`]. Can be turned into an iterator, or [`Channels::iter_mut()`] can be used to
/// iterate over the channel data multiple times, or more efficiently you can use
/// [`Channels::get_unchecked_mut()`] to do the same thing.
/// [`SamplesIter`]. Can be turned into an iterator, or [`ChannelSamples::iter_mut()`] can be used
/// to iterate over the channel data multiple times, or more efficiently you can use
/// [`ChannelSamples::get_unchecked_mut()`] to do the same thing.
pub struct ChannelSamples<'slice, 'sample: 'slice> {
/// The raw output buffers.
pub(self) buffers: *mut [&'sample mut [f32]],
@ -29,7 +29,7 @@ pub struct ChannelSamples<'slice, 'sample: 'slice> {
pub(self) _marker: PhantomData<&'slice mut [&'sample mut [f32]]>,
}
/// The actual iterator over the channel data for a sample, yielded by [`Channels`].
/// The actual iterator over the channel data for a sample, yielded by [`ChannelSamples`].
pub struct ChannelSamplesIter<'slice, 'sample: 'slice> {
/// The raw output buffers.
pub(self) buffers: *mut [&'sample mut [f32]],
@ -123,7 +123,8 @@ impl<'slice, 'sample> ChannelSamples<'slice, 'sample> {
}
/// A resetting iterator. This lets you iterate over the same channels multiple times. Otherwise
/// you don't need to use this function as [`Channels`] already implements [Iterator].
/// you don't need to use this function as [`ChannelSamples`] already implements
/// [`IntoIterator`].
#[inline]
pub fn iter_mut(&mut self) -> ChannelSamplesIter<'slice, 'sample> {
ChannelSamplesIter {

View file

@ -35,7 +35,7 @@ pub fn f32_gain_to_db(digits: usize) -> Arc<dyn Fn(f32) -> String + Send + Sync>
}
/// Parse a decibel value to a linear voltage gain ratio. Handles the `dB` or `dBFS` units for you.
/// Used in conjunction with [`f32_lin_to_db`].
/// Used in conjunction with [`f32_gain_to_db()`].
pub fn from_f32_gain_to_db() -> Arc<dyn Fn(&str) -> Option<f32> + Send + Sync> {
Arc::new(|string| {
string
@ -99,14 +99,14 @@ pub fn from_f32_hz_then_khz() -> Arc<dyn Fn(&str) -> Option<f32> + Send + Sync>
})
}
/// Format an order/power of two. Useful in conjunction with [`from_power_of_two()`] to limit
/// Format an order/power of two. Useful in conjunction with [`from_i32_power_of_two()`] to limit
/// integer parameter ranges to be only powers of two.
pub fn i32_power_of_two() -> Arc<dyn Fn(i32) -> String + Send + Sync> {
Arc::new(|value| format!("{}", 1 << value))
}
/// Parse a parameter input string to a power of two. Useful in conjunction with [`power_of_two()`]
/// to limit integer parameter ranges to be only powers of two.
/// Parse a parameter input string to a power of two. Useful in conjunction with
/// [`i32_power_of_two()`] to limit integer parameter ranges to be only powers of two.
pub fn from_i32_power_of_two() -> Arc<dyn Fn(&str) -> Option<i32> + Send + Sync> {
Arc::new(|string| string.parse().ok().map(|n: i32| (n as f32).log2() as i32))
}

View file

@ -237,8 +237,8 @@ impl<const NUM_SIDECHAIN_INPUTS: usize> StftHelper<NUM_SIDECHAIN_INPUTS> {
/// specified size with the windowing function already applied. The summed reults will then be
/// written back to `main_buffer` exactly one block later, which means that this function will
/// introduce one block of latency. This can be compensated by calling
/// [`ProcessContext::set_latency()`][`crate::prelude::ProcessContext::set_latency()`] in your
/// plugin's initialization function.
/// [`ProcessContext::set_latency()`][`crate::prelude::ProcessContext::set_latency_samples()`]
/// in your plugin's initialization function.
///
/// This function does not apply any gain compensation for the windowing. You will need to do
/// that yoruself depending on your window function and the amount of overlap.