[gruvin9x, sky9x] Issue 64 fixed. It's now possible to have AUDIO=YES and BEEPER=YES
[all] Issue 32 fixed (AUTOSOURCE option added) [all] Issue 226 fixed (Menu in main views / telemetry views) [all] Issue 226 fixed (Imperial bug with playValue) [sky9x] Issue 234 fixed (rotary encoder inverted) [sky9x / Taranis] Bug with AUDIO stopped when selecting Background Music without a file [all except M64] Shift in Telemetry sources when !GVARS
This commit is contained in:
+17
-6
@@ -362,9 +362,14 @@ void AudioQueue::sdWakeup(AudioContext & context)
|
||||
dacStop();
|
||||
memset(&fragment, 0, sizeof(fragment));
|
||||
f_close(&context.wavFile);
|
||||
CoSetTmrCnt(audioTimer, (WAV_BUFFER_SIZE * 1000) / context.pcmFreq, 0);
|
||||
CoStartTmr(audioTimer);
|
||||
CoClearFlag(audioFlag);
|
||||
if (context.pcmFreq) {
|
||||
CoSetTmrCnt(audioTimer, (WAV_BUFFER_SIZE * 1000) / context.pcmFreq, 0);
|
||||
CoStartTmr(audioTimer);
|
||||
CoClearFlag(audioFlag);
|
||||
}
|
||||
else {
|
||||
CoSetFlag(audioFlag);
|
||||
}
|
||||
state = AUDIO_RESUMING;
|
||||
}
|
||||
else {
|
||||
@@ -705,9 +710,15 @@ void audioEvent(uint8_t e, uint8_t f)
|
||||
haptic.event(e); //do this before audio to help sync timings
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.flashBeep && (e <= AU_ERROR || e >= AU_WARNING1)) {
|
||||
if (lightOffCounter < FLASH_DURATION)
|
||||
lightOffCounter = FLASH_DURATION;
|
||||
if (e <= AU_ERROR || e >= AU_WARNING1) {
|
||||
#if defined(BEEPER)
|
||||
beep();
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.alarmsFlash) {
|
||||
if (lightOffCounter < FLASH_DURATION)
|
||||
lightOffCounter = FLASH_DURATION;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_eeGeneral.beeperMode>0 || (g_eeGeneral.beeperMode==0 && e>=AU_TRIM_MOVE) || (g_eeGeneral.beeperMode>=-1 && e<=AU_ERROR)) {
|
||||
|
||||
Reference in New Issue
Block a user