Audio

class spotify.AudioBufferStats[source]

Stats about the application’s audio buffers.

samples

Number of samples currently in the buffer.

stutter

Number of stutters (audio dropouts) since the last query.

class spotify.AudioFormat(sp_audioformat)[source]

A Spotify audio format object.

You’ll never need to create an instance of this class yourself, but you’ll get AudioFormat objects as the audio_format argument to the music_delivery callback.

sample_type

The SampleType, currently always SampleType.INT16_NATIVE_ENDIAN.

sample_rate

The sample rate, typically 44100 Hz.

channels

The number of audio channels, typically 2.

frame_size()[source]

The byte size of a single frame of this format.

class spotify.Bitrate[source]
BITRATE_160k = <Bitrate.BITRATE_160k: 0>
BITRATE_320k = <Bitrate.BITRATE_320k: 1>
BITRATE_96k = <Bitrate.BITRATE_96k: 2>
class spotify.SampleType[source]
INT16_NATIVE_ENDIAN = <SampleType.INT16_NATIVE_ENDIAN: 0>