EasyBuzzer icon indicating copy to clipboard operation
EasyBuzzer copied to clipboard

Sound does not stop if update() is delayed

Open mvackel opened this issue 5 years ago • 5 comments

If the update() function is delayed, for instance because of a long process, the sound does not stop.

Suggestion: Change, from line 122:

	if (!sequenceDuration || (mSequences != 0 && elapsedTime / sequenceDuration >= mSequences))
	{
		mStartTime = 0;
		if (mFinishedCallbackFunction)
		{
			mFinishedCallbackFunction();
		}
		return;
	};

To:

	if (!sequenceDuration || (mSequences != 0 && elapsedTime / sequenceDuration >= mSequences))
	{
		mStartTime = 0;
		if (mFinishedCallbackFunction)
		{
			mFinishedCallbackFunction();
		}
#if defined ESP32
		ledcDetachPin(mPin);
#else
		noTone(mPin);
#endif
		return;
	};

mvackel avatar Feb 21 '19 04:02 mvackel

Spent two hours trying to debug this until I had the idea to come and check for an existing Issue. I guess the fact that it's more than a year old means that the project is abandoned?

sixtyfive avatar Aug 16 '20 17:08 sixtyfive

Hi @sixtyfive I am not actively working on this repository but in the next few days I will be solving this particular issue.

evert-arias avatar Aug 16 '20 17:08 evert-arias

Thank you for the quick response, Evert, and sorry for the hopefully not too brazen assumption!

sixtyfive avatar Aug 16 '20 19:08 sixtyfive

Thank you for the quick response, Evert, and sorry for the hopefully not too brazen assumption!

Not at all 👍

evert-arias avatar Aug 17 '20 22:08 evert-arias

Hi hii. So have any updates on this issue?

iqfareez avatar Apr 12 '22 13:04 iqfareez