Menu

soxr_oneshot - change in pitch when resampling

2019-01-20
2019-02-18
  • Christof Schulze

    Hello everyone,

    I am writing a piece of software that is playing audio synchronously
    over the network - similar to what snapcast is doing. To achieve
    synchronous output libsoxr is used to resample the data. So far I am
    using soxr_oneshot() and resampling is working, however there is a
    noticable change in pitch when it is applied.

    Small chunks of audio data are tagged with a time stamp at which they
    are to be played back and delivered from a server to all clients using
    UDP. On the client chunks can be dropped, stretched or compressed to
    achieve synchronous output. This does work in a sense that playback is
    synchronous. How can I get rid of the change of pitch when resampling?

    This is observed on a debian system using:
    libsoxr-dev:amd64 0.1.2-2

    Christof

    --
    () ascii ribbon campaign - against html e-mail
    /\ against proprietary attachments

     
  • robs

    robs - 2019-02-18

    I don't think that resampling is what you need in this case. Try perhaps using the tempo effect from the sox library, or using the soundtouch library (which is similar).

     

Log in to post a comment.