Audio ersky9x bugs fixed
This commit is contained in:
@@ -182,7 +182,7 @@ void AudioQueue::wakeup()
|
|||||||
static FIL wavFile;
|
static FIL wavFile;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (prioIdx >= 0) {
|
if (prioIdx >= 0 && prioIdx != ridx) {
|
||||||
ridx = prioIdx;
|
ridx = prioIdx;
|
||||||
prioIdx = -1;
|
prioIdx = -1;
|
||||||
toneStop();
|
toneStop();
|
||||||
@@ -304,6 +304,7 @@ void AudioQueue::wakeup()
|
|||||||
CoStartTmr(audioTimer);
|
CoStartTmr(audioTimer);
|
||||||
}
|
}
|
||||||
else if (current.pause > 0) {
|
else if (current.pause > 0) {
|
||||||
|
state = AUDIO_PLAYING_TONE;
|
||||||
CoSetTmrCnt(audioTimer, current.pause*2, 0);
|
CoSetTmrCnt(audioTimer, current.pause*2, 0);
|
||||||
current.pause = 0;
|
current.pause = 0;
|
||||||
toneStop();
|
toneStop();
|
||||||
@@ -332,6 +333,9 @@ void AudioQueue::wakeup()
|
|||||||
CoStartTmr(audioTimer);
|
CoStartTmr(audioTimer);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
#ifndef SIMU
|
||||||
|
CoEnterMutexSection(audioMutex);
|
||||||
|
#endif
|
||||||
state = AUDIO_SLEEPING;
|
state = AUDIO_SLEEPING;
|
||||||
#ifndef SIMU
|
#ifndef SIMU
|
||||||
CoLeaveMutexSection(audioMutex);
|
CoLeaveMutexSection(audioMutex);
|
||||||
|
|||||||
Reference in New Issue
Block a user