what is the sample rate of spotify stream (libspotify)?

僤鯓⒐⒋嵵緔 提交于 2019-12-05 03:05:24

问题


What is the sample rate of spotify stream?

The call back function "music_delivery" in libspotify example playtrack takes audio format from libspotify directly. Is the audio decoded to be raw wave data already? Is the sample rate 44.1kHz/16bit by default? Does the libspotify convert the original audio sample rate to be 44.1KHz/16bit?

Thanks.


回答1:


The audio you get in the music_delivery callback is indeed raw PCM data. The sample rate and bit depth is described in the sp_audioformat struct given in that callback.

The audio format can change depending on the track being played, so make sure your audio pipeline can deal with that.



来源:https://stackoverflow.com/questions/10760949/what-is-the-sample-rate-of-spotify-stream-libspotify

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!