Skip to content
Discussion options

You must be logged in to vote

There are many ways to deal with this:

  • don't change the sample rate yourself. If you connect the I2SStream the A2DPSink the correct sample rate should be set up automatically.
  • Wait for A2DP to be connected before setting up or changing I2S. After hat you can get the real sample rate from the API.
  • Use the set_sample_rate_callback() callback to be notified about sample rate changes and call setAudioInfo on i2s.
  • Use the set_on_connection_state_changed() callback to be notified when the sample rate is available to call setAudioInfo on i2s.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@skyycode-0
Comment options

Answer selected by skyycode-0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants