Driver re-initialising on MP3 (helix) rate change #4
-
I am streaming from a URLStream to an AudioBoardStream via MP3DecoderHelix. At startup, after a couple of copies, the helix decoder sends out a rate change (i.e., MP3DecoderHelix::infoCallback) which leads to the audio boards I2SCodecStream being reset. Unfortunately, this re-initializes all the pins and the volume, PA setting etc. thereby overwriting any changes. Is this intended behavior, or is it possible to update the library so that only the relevant parts of info are updated on a rate change? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
I extended the logic a bit:
Can you help me to test this change ? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your fast action. For some reason the volume is being set now to maximum. I can reset it normally in my loop(), but would still like to ask why it is necessary to make such a complete reset following a rate change? Here is what I believe to be the relevant part of the log. You will see that the driver makes a full reset after the rate change. I would expect that only some registers in the 8388 need resetting, but I don't know if this part is generalized to work with lots of other drivers. Search for *** in the log for my comments.
|
Beta Was this translation helpful? Give feedback.
-
My mistake: I was saving the volume in an int value instead of a float. Feel free to provide an implementation for all supported drivers to set only the sample rate and bits per sample! |
Beta Was this translation helpful? Give feedback.
-
I added a new method setConfig() in the driver library which does not touch the volume and PA! |
Beta Was this translation helpful? Give feedback.
I extended the logic a bit:
Can you help me to test this change ?