earlephilhower / ESP8266Audio

Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
GNU General Public License v3.0
2.01k stars 432 forks source link

Sound volume #495

Closed ahreenah closed 2 years ago

ahreenah commented 2 years ago

Hello, I have one more question on how can I change current volume of sound, it seems to be something simple? Is it supported by AudioOutputI2S or I should customize it myself?

earlephilhower commented 2 years ago

Use the .SetGain(f) (where f=0...4.0) method of the AudioOutput class you're using.