Skip to content

Streaming Bluetooth audio to internal DAC and external I2S DAC at the same time #318

Discussion options

You must be logged in to vote

You would use the callback described in 'Accessing the Sink Data Stream with Callbacks'. From that you would analyse the data by calculating a max value (or avg) over a range to use as volume. Then you would translate the volume into into a range between 0 and 254 and use an analogWrite() to output to the LED.

If you want to minimize the lines of code you can also use the AudioTools library and just write to the VolumePrint audio sink and get the volume from there...

I suggest that you have a look at the following examples to get you started:

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pschatzmann
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #317 on November 16, 2022 20:46.