Skip to content

Spatial audio is glitchy #369

@nobbele

Description

@nobbele
fn main() {
    let (_stream, handle) = rodio::OutputStream::try_default().unwrap();
    let sink =
        rodio::SpatialSink::try_new(&handle, [-2.0, 0.0, 0.0], [1.0, 0.0, 0.0], [-1.0, 0.0, 0.0])
            .unwrap();

    let file = std::fs::File::open("beep.wav").unwrap();

    let source = rodio::Decoder::new(file).unwrap();
    sink.append(source);

    sink.sleep_until_end();
}

using this code (use any beep.wav file), nearing the end of the audio, it will start to play the sound in the other ear before switching back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions