mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 20:17:04 +03:00
add plugin and fix loudness = 0 disable equalizer
This commit is contained in:
@@ -115,6 +115,7 @@ sub initPrefs {
|
||||
|
||||
$prefs->client($client)->init( {
|
||||
equalizer => [(0) x 10],
|
||||
loudness => 0,
|
||||
artwork => undef,
|
||||
led_config => 0,
|
||||
led_visualizer => 0,
|
||||
@@ -216,6 +217,14 @@ sub send_equalizer {
|
||||
$client->sendFrame( eqlz => \$data );
|
||||
}
|
||||
|
||||
sub send_loudness {
|
||||
my ($client, $loudness) = @_;
|
||||
|
||||
$loudness ||= $prefs->client($client)->get('loudness') || 0;
|
||||
my $data = pack("c1", $loudness);
|
||||
$client->sendFrame( loud => \$data );
|
||||
}
|
||||
|
||||
sub update_equalizer {
|
||||
my ($client, $value, $index) = @_;
|
||||
return if $client->tone_update;
|
||||
@@ -318,6 +327,7 @@ sub reconnect {
|
||||
$client->pluginData('artwork_md5', '');
|
||||
$client->config_artwork if $client->display->isa("Plugins::SqueezeESP32::Graphics");
|
||||
$client->send_equalizer;
|
||||
$client->send_loudness;
|
||||
}
|
||||
|
||||
# Change the analog output mode between headphone and sub-woofer
|
||||
|
||||
Reference in New Issue
Block a user