Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize hook on record beep #107

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Handballermann
Copy link

@Handballermann Handballermann commented Jul 16, 2023

After building the audio-guestbook and using it on a wedding for the first time, I came across an issue: If you put the hook back, while the beep before the recording is played, the hook press is not recognized. The problem is: while in the wait()-function, button presses are recognized, but not communicated to outside of wait().
I found some issues for this problem, but was not convinced of the solutions (max recording time 120seconds), so I made this one.

I made wait() return boolean instead of void. If the recordButton is pressed, the hook is back on it (raising/falling edge still need to be checked for your specific telephone). If the hook is back on, the wait()-function is interrupted and returns false. If wait() was able to run through, it returns true.
Before starting the record, it's checked if wait() is running through without interrupts (returning true). If so, start recording. If wait() is interrupted and returns false, immediately stop the beep and get into mode Ready.

recordButton press means, the hook is back on it (make sure to have your raising/falling edge right).
If the hook is back on, the wait function is interrupted and returns false. If wait was able to run through, it returns true.
before starting the record, check if while is running through without interrupts (returning true). If so, start recording. If wait is interrupted and returns false, immediately stop the beep and get into ready mode
@h4yn0nnym0u5e
Copy link
Contributor

Also fixed in PR #47 back in May. No point, really: nothing's been pulled since last November... it's not even as if the account is inactive, either.

if the hook is taken of and immediately returned, the greeting will no more be played.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants