PromyLOPh / pianobar

Console-based pandora.com player
http://6xq.net/pianobar/
Other
1.74k stars 321 forks source link

Resample output audio format based on configuration #683

Closed brunosmmm closed 5 years ago

brunosmmm commented 5 years ago

Resample output audio to a constant sampling rate as optionally specified in the configuration file, using libswresample

PromyLOPh commented 5 years ago

I assume this change is required for #684? Do you know if it is possible to do this as part of ffmpeg’s filter chain? As far as I see the aformat filter supports an argument called sample_rates.

brunosmmm commented 5 years ago

You're absolutely right, my oversight. I tested using aformat to resample and it also works. This change is more or less independent of #684 but it does make a lot of sense, since the reader on the other end of the pipe cannot discover the sampling rate of raw data

PromyLOPh commented 5 years ago

Sorry for the delay. For some reason I can’t push commits to your repo, so could you please review this change? https://github.com/PromyLOPh/pianobar/commit/4cf183348402a88ff02e243d2ab082c543b41a5b

brunosmmm commented 5 years ago

I've applied the commit and pushed it to my branch