Skip to content

streams_generator_i2s_ESP32 generates incorrect bit rate but MCLK is correct. How? #1453

Answered by pschatzmann
groeneba asked this question in Q&A
Discussion options

You must be logged in to vote

I don't understand what you try to do and what your issue is: BlueTooth Sink and Sine Generator and a sample rate of 48000. This does not make any sense to me!

If you think that the frequency is wrong, then I think this would rather be a question for Espressif: The only thing that I can contribute is that you I2S lets you define a fixed_mclk: see https://docs.espressif.com/projects/esp-idf/en/v4.2.2/esp32/api-reference/peripherals/i2s.html

In addition your code is wrong: you generate a 16 bit signal and pretend that it is 24 bits. This does not generate any meaningful output: use 16 bits with int16_t and 24 bits with int24_t:

AudioInfo info(48000, 2, 24);
SineWaveGenerator<int24_t> sineWa…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@groeneba
Comment options

Answer selected by pschatzmann
Comment options

You must be logged in to vote
1 reply
@groeneba
Comment options

Comment options

You must be logged in to vote
2 replies
@groeneba
Comment options

@pschatzmann
Comment options

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