Skip to content

Commit

Permalink
revise docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tesselode committed Jan 4, 2025
1 parent e365b86 commit 4f405b3
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 37 deletions.
4 changes: 2 additions & 2 deletions crates/kira/src/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Clocks are stopped when you first create them, so be sure to explicitly call
Sounds can be set to only start playing when a clock has ticked a certain
number of times. You can configure this using
[`StaticSoundSettings::start_time`](crate::sound::static_sound::StaticSoundSettings::start_time)
or [`StreamingSoundSettings::start_time`](crate::sound::streaming::StreamingSoundSettings::start_time).
[`StaticSoundData::start_time`](crate::sound::static_sound::StaticSoundData::start_time)
or [`StreamingSoundData::start_time`](crate::sound::streaming::StreamingSoundData::start_time).
```no_run
use kira::{
Expand Down
2 changes: 1 addition & 1 deletion crates/kira/src/effect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub trait EffectBuilder {

/// Receives input audio from a mixer track and outputs modified audio.
///
/// For performance reasons, avoid allocating and deallocating in any methods
/// For performance reasons, avoid allocating and deallocating memory in any methods
/// of this trait besides [`on_change_sample_rate`](Effect::on_change_sample_rate).
#[allow(unused_variables)]
pub trait Effect: Send {
Expand Down
8 changes: 2 additions & 6 deletions crates/kira/src/effect/compressor/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ pub struct CompressorBuilder {
/// dry signal.
pub makeup_gain: Value<Decibels>,
/// How much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means
/// only the dry signal will be heard. `1.0` means
/// only the wet signal will be heard.
/// with the wet (processed) signal.
pub mix: Value<Mix>,
}

Expand Down Expand Up @@ -113,9 +111,7 @@ impl CompressorBuilder {
}

/// Sets how much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means
/// only the dry signal will be heard. `1.0` means
/// only the wet signal will be heard.
/// with the wet (processed) signal.
#[must_use = "This method consumes self and returns a modified CompressorBuilder, so the return value should be used"]
pub fn mix(self, mix: impl Into<Value<Mix>>) -> Self {
Self {
Expand Down
4 changes: 1 addition & 3 deletions crates/kira/src/effect/compressor/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ impl CompressorHandle {
makeup_gain: Decibels,

/// Sets how much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means only the dry
/// signal will be heard. `1.0` means only the wet signal will
/// be heard.
/// with the wet (processed) signal.
mix: Mix,
}
}
4 changes: 1 addition & 3 deletions crates/kira/src/effect/delay/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ pub struct DelayBuilder {
/// Effects that should be applied in the feedback loop.
pub(super) feedback_effects: Vec<Box<dyn Effect>>,
/// How much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means
/// only the dry signal will be heard. `1.0` means
/// only the wet signal will be heard.
/// with the wet (processed) signal.
pub(super) mix: Value<Mix>,
}

Expand Down
4 changes: 1 addition & 3 deletions crates/kira/src/effect/delay/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ impl DelayHandle {
feedback: Decibels,

/// Sets how much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means only the dry
/// signal will be heard. `1.0` means only the wet signal will
/// be heard.
/// with the wet (processed) signal.
mix: Mix,
}
}
4 changes: 1 addition & 3 deletions crates/kira/src/effect/distortion/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ pub struct DistortionBuilder {
/// the distortion.
pub drive: Value<Decibels>,
/// How much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means
/// only the dry signal will be heard. `1.0` means
/// only the wet signal will be heard.
/// with the wet (processed) signal.
pub mix: Value<Mix>,
}

Expand Down
4 changes: 1 addition & 3 deletions crates/kira/src/effect/distortion/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ impl DistortionHandle {
drive: Decibels,

/// Sets how much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means only the dry
/// signal will be heard. `1.0` means only the wet signal will
/// be heard.
/// with the wet (processed) signal.
mix: Mix,
}
}
4 changes: 1 addition & 3 deletions crates/kira/src/effect/filter/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ pub struct FilterBuilder {
/// a distinctive "ringing" sound.
pub resonance: Value<f64>,
/// How much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means
/// only the dry signal will be heard. `1.0` means
/// only the wet signal will be heard.
/// with the wet (processed) signal.
pub mix: Value<Mix>,
}

Expand Down
4 changes: 1 addition & 3 deletions crates/kira/src/effect/filter/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ impl FilterHandle {
resonance: f64,

/// Sets how much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means only the dry
/// signal will be heard. `1.0` means only the wet signal will
/// be heard.
/// with the wet (processed) signal.
mix: Mix,
}
}
4 changes: 1 addition & 3 deletions crates/kira/src/effect/reverb/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ pub struct ReverbBuilder {
/// 1.0 being fully stereo).
pub stereo_width: Value<f64>,
/// How much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means
/// only the dry signal will be heard. `1.0` means
/// only the wet signal will be heard.
/// with the wet (processed) signal.
pub mix: Value<Mix>,
}

Expand Down
4 changes: 1 addition & 3 deletions crates/kira/src/effect/reverb/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ impl ReverbHandle {
stereo_width: f64,

/// Sets how much dry (unprocessed) signal should be blended
/// with the wet (processed) signal. `0.0` means only the dry
/// signal will be heard. `1.0` means only the wet signal will
/// be heard.
/// with the wet (processed) signal.
mix: Mix,
}
}
2 changes: 1 addition & 1 deletion crates/kira/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Kira is a backend-agnostic library to create expressive audio for games. It provides
tweens for smoothly adjusting properties of sounds, a flexible [mixer](track)
for applying [effects](effect) to audio, a [clock] system for precisely timing audio events,
and [spatial audio](listener) support.
and [spatial audio](crate::track#spatial-tracks) support.
To get started, create an [`AudioManager`] and use it to [play](AudioManager::play) a
[`StaticSoundData`](crate::sound::static_sound::StaticSoundData) or
Expand Down

0 comments on commit 4f405b3

Please sign in to comment.