You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Firmware/LowLevel/include/soundsystem.h
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -129,6 +129,7 @@ namespace soundSystem {
129
129
voidplaySoundAdHoc(const TrackDef&); // Play sound track number immediately without waiting until the end of sound
130
130
131
131
voidsetDFPis5V(constbool t_dfpis5v); // Set if DFP is set to 5V Vcc
132
+
voidsetEnableBackground(constbool); // Set if background sounds shall get played (true) or not (false)
132
133
133
134
voidsetLanguage(const iso639_1 language_p, constbool quiet = false); // Set language to the pointing ISO639-1 (2 char) language code and announce if changed and not quiet
config_comms_version = min(pkt->comms_version, LL_HIGH_LEVEL_CONFIG_MAX_COMMS_VERSION); // The lower comms_version is leading
613
-
config_bitmask = pkt->config_bitmask; // Take over as sent. HL is leading (for now)
614
-
615
-
// nv_config.Config specific members ...
616
-
// config_bitmask. Do NOT mistake with global config_bitmask (ll_high_level_config.config_bitmask). Similar, but not mandatory the same in future,
617
-
// to ensure that a possible instable/flipping future global config_bitmask bit doesn't wear level our flash, we only add those which are known to be stable
uint8_t volume = VOLUME_DEFAULT; // Last set volume (%)
76
77
std::string language_str = "en"; // Default ISO639-1 language string
77
78
uint8_t play_folder = 1; // Default play folder, has to be related to language_str
@@ -181,6 +182,10 @@ namespace soundSystem
181
182
dfp_is_5v = t_dfpis5v;
182
183
}
183
184
185
+
voidsetEnableBackground(constbool t_bool) {
186
+
enable_background_ = t_bool;
187
+
}
188
+
184
189
voidsetLanguage(const iso639_1 language_p, constbool quiet) { // Set language to the pointing ISO639-1 (2 char) language code and announce if changed && not quiet
185
190
uint8_t last_play_folder = play_folder;
186
191
@@ -244,6 +249,8 @@ namespace soundSystem
244
249
switch (t_track_def.type)
245
250
{
246
251
case TrackTypes::background:
252
+
if(!enable_background_)
253
+
return;
247
254
myMP3.stop();
248
255
delay(50); // (sometimes) required for "MH2024K-24SS"
0 commit comments