AudioQueue::stopAll() instead of AudioQueue::reset()
This commit is contained in:
@@ -912,13 +912,13 @@ void AudioQueue::stopPlay(uint8_t id)
|
||||
void AudioQueue::stopSD()
|
||||
{
|
||||
sdAvailableSystemAudioFiles = 0;
|
||||
reset();
|
||||
stopAll();
|
||||
playTone(0, 0, 100, PLAY_NOW); // insert a 100ms pause
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void AudioQueue::reset()
|
||||
void AudioQueue::stopAll()
|
||||
{
|
||||
CoEnterMutexSection(audioMutex);
|
||||
widx = ridx; // clean the queue
|
||||
|
||||
@@ -161,6 +161,8 @@ class AudioQueue {
|
||||
|
||||
void stopPlay(uint8_t id);
|
||||
|
||||
void stopAll();
|
||||
|
||||
void pause(uint16_t tLen);
|
||||
|
||||
void stopSD();
|
||||
@@ -177,8 +179,6 @@ class AudioQueue {
|
||||
return ridx == widx;
|
||||
}
|
||||
|
||||
void reset();
|
||||
|
||||
inline AudioBuffer * getNextFilledBuffer()
|
||||
{
|
||||
if (buffers[bufferRIdx].state == AUDIO_BUFFER_PLAYING) {
|
||||
@@ -322,7 +322,7 @@ void pushPrompt(uint16_t prompt, uint8_t id=0);
|
||||
#define PLAY_VALUE(v, id) playValue((v), (id))
|
||||
#define PLAY_FILE(f, flags, id) audioQueue.playFile((f), (flags), (id))
|
||||
#define STOP_PLAY(id) audioQueue.stopPlay((id))
|
||||
#define AUDIO_RESET() audioQueue.reset()
|
||||
#define AUDIO_RESET() audioQueue.stopAll()
|
||||
|
||||
#if defined(SDCARD)
|
||||
extern tmr10ms_t timeAutomaticPromptsSilence;
|
||||
|
||||
Reference in New Issue
Block a user