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.
The audio you get in the
music_delivery
callback is indeed raw PCM data. The sample rate and bit depth is described in thesp_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.