mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 15:48:35 -07:00
Fix some sound issues
This commit is contained in:
@@ -102,11 +102,16 @@ static void tama_p1_hal_set_lcd_icon(u8_t icon, bool_t val) {
|
||||
}
|
||||
|
||||
static void tama_p1_hal_play_frequency(bool_t en) {
|
||||
if(en)
|
||||
furi_hal_speaker_start(g_ctx->frequency, 0.5f);
|
||||
else
|
||||
furi_hal_speaker_stop();
|
||||
|
||||
if(en) {
|
||||
if(furi_hal_speaker_acquire(30)) {
|
||||
furi_hal_speaker_start(g_ctx->frequency, 0.5f);
|
||||
}
|
||||
} else {
|
||||
if(furi_hal_speaker_is_mine()) {
|
||||
furi_hal_speaker_stop();
|
||||
furi_hal_speaker_release();
|
||||
}
|
||||
}
|
||||
g_ctx->buzzer_on = en;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user