Skip to content

Conversation

@schui
Copy link

@schui schui commented Mar 13, 2025

Fixes #3 Wrong frequency in tone mode when page is left open for a while

@schui
Copy link
Author

schui commented Mar 13, 2025

If you fresh load the page and never change the frequency, Tone mode plays constants.DEFAULT_FREQ instead of the selected frequency. If the tab is left open for a while, and is discarded by the browser, then it also acts like it is a fresh load. You can force a discard with chrome://discards/

Steps:

  1. Open the page, change the frequency to something that isn't 1000hz
  2. Close the page
  3. Reopen the page, click Play Tone
  4. The page plays the wrong tone.

Copy link
Owner

@headphonejames headphonejames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@schui
Copy link
Author

schui commented Mar 13, 2025

Thanks for reviewing the change!

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.

Wrong frequency in tone mode when page is left open for a while

2 participants