diff --git a/app/gui/oven_control/autocook.cpp b/app/gui/oven_control/autocook.cpp index 6459875..0ecf7c6 100644 --- a/app/gui/oven_control/autocook.cpp +++ b/app/gui/oven_control/autocook.cpp @@ -1,4 +1,5 @@ #include "autocook.h" +#include "soundplayer.h" AutoCook::AutoCook() : currentStepIndex(0), done_(false), doorOpened(false), checkingCoreTemp(false) { @@ -314,6 +315,8 @@ bool AutoCook::advance() { done_ = true; + SoundPlayer::playStop(); + if (currentStep.dehumidification) { if (currentStep.dehumidificationRepeatDelay) @@ -357,6 +360,8 @@ bool AutoCook::advance() { done_ = true; + SoundPlayer::playStop(); + if (currentStep.dehumidification) { if (currentStep.dehumidificationRepeatDelay) diff --git a/app/gui/oven_control/autocookwindow.cpp b/app/gui/oven_control/autocookwindow.cpp index 8317691..b640075 100644 --- a/app/gui/oven_control/autocookwindow.cpp +++ b/app/gui/oven_control/autocookwindow.cpp @@ -64,6 +64,8 @@ AutoCookWindow::AutoCookWindow(QWidget *parent, Cook cook) : connect(&updateViewTimer, SIGNAL(timeout()), SLOT(updateView())); updateViewTimer.start(100); + + SoundPlayer::playStart(); } AutoCookWindow::~AutoCookWindow() @@ -601,6 +603,9 @@ void AutoCookWindow::startProcess(int process) oven->startCooking(); checkProcessTimer.start(100); + + SoundPlayer::playStart(); + break; } case Define::KeepWarm: @@ -630,6 +635,7 @@ void AutoCookWindow::checkProcess() Oven *oven = Oven::getInstance(); if (oven->currentTemp() >= oven->temp()) { + SoundPlayer::playStop(); oven->stopCooking(); checkProcessTimer.stop(); processSelected = false; diff --git a/app/gui/oven_control/manualcookwindow.cpp b/app/gui/oven_control/manualcookwindow.cpp index f5c3719..7e46fb7 100644 --- a/app/gui/oven_control/manualcookwindow.cpp +++ b/app/gui/oven_control/manualcookwindow.cpp @@ -351,10 +351,10 @@ void ManualCookWindow::start() if (oven->cooking()) return; - SoundPlayer::playStart(); - if (oven->time() > 0) { + SoundPlayer::playStart(); + if (startCookingTimer.isActive()) startCookingTimer.stop();