pub struct DspProfile {Show 19 fields
pub name: String,
pub devices: Vec<String>,
pub preamp_db: Option<f64>,
pub filters: Vec<DspFilter>,
pub impulses: Vec<PathBuf>,
pub source: Vec<String>,
pub target: Option<DspTarget>,
pub layers: Vec<DspLayer>,
pub group: bool,
pub preset: bool,
pub filters_only: bool,
pub scope: Option<DspScope>,
pub uid: Option<String>,
pub origin: Option<String>,
pub role: Option<DspRole>,
pub measurement: Option<DspMeasurement>,
pub fitted: Option<DspMeasurement>,
pub tuned_for: Option<String>,
pub original: Option<DspOriginal>,
}Fields§
§name: String§devices: Vec<String>Output devices, by name, that play through this profile.
preamp_db: Option<f64>Gain before the filters. Unset, it is derived from the filters’ peak gain, so that no boost can push a sample past full scale.
filters: Vec<DspFilter>Run in order, at the output rate, ahead of the impulse responses.
impulses: Vec<PathBuf>Impulse responses as WAV files, one per sample rate the correction was exported at; a relative path is read from beside the config. Each file’s own rate is the rate it applies to.
source: Vec<String>The files it was imported from, by name, for showing where it came from. Nothing reads them again.
target: Option<DspTarget>For a correction installed from AutoEQ: the target it was made for,
and another to move it to. See audio::dsp::targets.
layers: Vec<DspLayer>Other profiles played first, in order: a headphone’s correction and
then taste on top of it, each switched on or off. A profile with
layers is a stack. See audio::dsp::Setup::load.
group: boolA group rather than a stack of layers: exactly one of its layers plays, the one switched on, chosen as one picks a radio button. Whole presets imported together are a group: alternatives, not taste to play together.
preset: boolA preset: a correction and its tuning saved together, its layers the correction first and then the tuning’s EQs, each on or off. What an output is set from, and what the quick EQ menu lists.
filters_only: boolFor a preset: the output plays its filters alone, with no correction
(DspConfig::filters_only).
scope: Option<DspScope>Whether it is the account’s, kept on every device signed in to its
kōan server, or this device’s alone. Unset, it follows from what the
profile is: see audio::dsp::profiles::scope.
uid: Option<String>What every device calls it, made when it is first shared. Its name may change; this does not.
origin: Option<String>The device that first shared it, by name: what tells two different profiles of one name apart when they meet.
role: Option<DspRole>What it is for: correcting a headphone, or tuning on top of one.
Unset, it follows from what the profile is: see
audio::dsp::profiles::role.
measurement: Option<DspMeasurement>A correction built from a headphone’s measurement, kept as
measurement.csv in the profile’s folder, to target, as kōan
saved one before it fitted bands: played as the bands squig.link’s
auto-EQ fits to it, which are not written back. See fitted.
fitted: Option<DspMeasurement>A correction fitted to a headphone’s measurement, kept as
measurement.csv in the profile’s folder, and target: its filters
and preamp are the bands squig.link’s auto-EQ fits, refitted when the
target changes. A key of its own rather than measurement, so a
build that knows only measurement plays the bands alone and not a
correction of its own after them.
tuned_for: Option<String>For a tuning: the target it was made against, by id. On a correction to another target, the difference between the two plays first, so the tuning sounds as it was made to.
original: Option<DspOriginal>What an import made it, kept so an edit can be undone.
Implementations§
Source§impl DspProfile
impl DspProfile
Sourcepub fn measured(&self) -> Option<&DspMeasurement>
pub fn measured(&self) -> Option<&DspMeasurement>
The measurement and target a correction is built from: fitted, or saved before kōan fitted bands.
Source§impl DspProfile
impl DspProfile
Sourcepub fn sanitize(&mut self) -> Vec<String>
pub fn sanitize(&mut self) -> Vec<String>
Bring the profile within dsp_bounds, saying what was changed: values
past a bound are clamped to it, ones that are not finite are dropped
with what holds them, and filters, bands, layers and points past a
cap are cut off at it. Every profile is played as this leaves it,
wherever it came from, so one that would deafen a listener, starve
the decode thread or exhaust memory still plays, adjusted, and its
page says how.
Trait Implementations§
Source§impl Clone for DspProfile
impl Clone for DspProfile
Source§impl Debug for DspProfile
impl Debug for DspProfile
Source§impl Default for DspProfile
impl Default for DspProfile
Source§impl<'de> Deserialize<'de> for DspProfilewhere
DspProfile: Default,
impl<'de> Deserialize<'de> for DspProfilewhere
DspProfile: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DspProfile
impl PartialEq for DspProfile
Source§impl Serialize for DspProfile
impl Serialize for DspProfile
impl StructuralPartialEq for DspProfile
Auto Trait Implementations§
impl Freeze for DspProfile
impl RefUnwindSafe for DspProfile
impl Send for DspProfile
impl Sync for DspProfile
impl Unpin for DspProfile
impl UnsafeUnpin for DspProfile
impl UnwindSafe for DspProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);