[RTTTL] add Gain volume control (#3644)

This commit is contained in:
NP v/d Spek 2024-02-27 23:31:36 +01:00 committed by GitHub
parent 3d2defde69
commit 19876e886b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,7 @@ The tone generator needs a PWM capable output to work with, currently only the
rtttl: rtttl:
output: rtttl_out output: rtttl_out
id: my_rtttl id: my_rtttl
gain: 60%
Overview Using the I2S speaker Overview Using the I2S speaker
------------------------------ ------------------------------
@ -54,6 +55,7 @@ The tone generator can instead be used with a :doc:`Speaker </components/speaker
rtttl: rtttl:
speaker: my_speaker speaker: my_speaker
id: my_rtttl id: my_rtttl
gain: 0.8
Configuration variables: Configuration variables:
------------------------ ------------------------
@ -62,6 +64,7 @@ Configuration variables:
this buzzer. this buzzer.
- **speaker** (**Exclusive**, :ref:`config-id`): The id of the :ref:`speaker <i2s_audio>` to play the song on. - **speaker** (**Exclusive**, :ref:`config-id`): The id of the :ref:`speaker <i2s_audio>` to play the song on.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **gain** (*Optional*, Percentage): With this value you can set the volume of the sound.
- **on_finished_playback** (*Optional*, :ref:`Automation <automation>`): An action to be - **on_finished_playback** (*Optional*, :ref:`Automation <automation>`): An action to be
performed when playback is finished. performed when playback is finished.