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
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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
it was late yesterday. This is how I run soxr: https://github.com/christf/snapcastc/blob/firstdraft/src/alsaplayer.c#L34
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).