Skip to content

Sample Rate

Phil Schatzmann edited this page Jun 22, 2026 · 2 revisions

Most A2DP sources (e.g. Mobile Phones) are using 44100 by default. Please note that this is usually configurable and it is not quaranteed to be this value. So follow the following rules

  • If you use an output from the AudioTools (e.g. I2SStream), it will be automatically configured to the sample rate provided by the API
  • Otherwise you can query the sample rate (sample_rate()) after having connected: e.g by waiting for a connnection in setup or by registering a connection state callback.
  • Register a sample rate callback (set_sample_rate_callback) that is called when the sampe rate is defined or changed

Clone this wiki locally