Skip to content

Commit

Permalink
docs: fixes spatial source & sink description (was wrong & missing)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 16, 2024
1 parent 6bfd840 commit 70c236c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/source/channel_volume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ where

#[inline]
fn next(&mut self) -> Option<I::Item> {
// return value
let ret = self
.current_sample
.map(|sample| sample.amplify(self.channel_volumes[self.current_channel]));
Expand Down
5 changes: 3 additions & 2 deletions src/source/spatial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ use crate::{Sample, Source};

use super::SeekError;

/// Combines channels in input into a single mono source, then plays that mono sound
/// to each channel at the volume given for that channel.
/// A simple spatial audio source. The underlying source is transformed to Mono
/// and then played in stereo. The left and right channel's volume are amplified
/// differently depending on the distance of the left and right ear to the source.
#[derive(Clone)]
pub struct Spatial<I>
where
Expand Down
3 changes: 3 additions & 0 deletions src/spatial_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ use crate::source::{SeekError, Spatial};
use crate::stream::{OutputStreamHandle, PlayError};
use crate::{Sample, Sink, Source};

/// A sink that allows changing the position of the source and the listeners
/// ears while playing. The sources played are then transformed to give a simple
/// spatial effect. See [`Spatial`] for details.
pub struct SpatialSink {
sink: Sink,
positions: Arc<Mutex<SoundPositions>>,
Expand Down

0 comments on commit 70c236c

Please sign in to comment.