chmorgan / esp-audio-player

Apache License 2.0
14 stars 5 forks source link

feature request: How to control playback speed #12

Open imliubo opened 8 months ago

imliubo commented 8 months ago

This is a very newbie-friendly and easy-to-use library (compared to adf). However, there is currently no control interface for playback speed. Is this possible to be implemented in the future? Or if I want to implement this function, where should I start from?

Related: sonic docs sonic code sonic demo

chmorgan commented 8 months ago

Hi @imliubo.

I'm glad to see you are having an easy time of using it. This is an interesting idea. I think you could use the write function, pass that data to the sonic library for resampling, and then only when the data from sonic is accepted into the i2s buffer you'd return from the write function and the audio player would continue decoding.

So you'd need a little bit of intermediate code to manage the flow of data.

imliubo commented 8 months ago

Hi @chmorgan

Thanks for reply. You are right! I need time to figure out how to make it work.

Have a nice day.