what is the sample rate of spotify stream (libspot

2019-03-31 23:36发布

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.

标签: spotify
1条回答
Emotional °昔
2楼-- · 2019-04-01 00:05

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.

查看更多
登录 后发表回答