Skip to content

Mono ogg files on a different sample rate play through wrong channels with ChannelVolume #252

@SpiralP

Description

@SpiralP

When playing a mono ogg file that is a different sample rate than your output device's through ChannelVolume the audio switches between the left and right channels. (I think it has to do with compression because it usually happens on the beat of a song)

I've narrowed the issue down to SampleRateConverter's Iterator.next() function, but I don't know much about converting sample rate so I'm lost as to where the problem actually is.

This issue could be related to the lower level decoding library lewton, but since the ogg plays perfectly fine when the sample rates match, I think it's related to SampleRateConverter in rodio.

I found this issue when using Windows 10 with my output sample rate set to 48000 in the sound settings. I was trying to play a 44100 Hz sound through the SpatialSink, which in turn uses ChannelVolume.

Here's a minimal repro-repo: https://github.com/SpiralP/rust-rodio-samplerate-bug

Thanks!

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