Skip to content

fix : stop infinite game-over audio looping in snake game#764

Merged
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
siri-004:fix/snake-audio-loop
May 25, 2026
Merged

fix : stop infinite game-over audio looping in snake game#764
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
siri-004:fix/snake-audio-loop

Conversation

@siri-004
Copy link
Copy Markdown
Contributor

📝 Description

Fixes the issue where snake_die audio was looping or re-triggering multiple times during game over. Added a lock mechanism inside AudioManager to ensure critical sounds play only once per trigger cycle. Also introduced a reset() method to clear sound state during game restart, preventing audio persistence across sessions.

🔗 Linked Issue

Closes #749


📋 Contribution Checklist

  • My code strictly adheres to the project guidelines (Standard library only, procedural code, clean spacing).
  • I have verified that my files are placed in the correct directory.
  • I have tested my changes thoroughly on my local machine.
  • I have included interactive emojis and clean console/UI outputs.
  • GSSoC 2026: I have been formally assigned to this issue and noted it above.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

@siri-004 is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@steam-bell-92 steam-bell-92 merged commit 35d00fe into steam-bell-92:main May 25, 2026
6 of 10 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution!

Your Pull Request has been merged successfully.

We appreciate the time and effort you put into improving this project. Contributions like yours help the repository grow and stay useful for everyone.

If you'd like to contribute again, please check the open issues and make sure you are assigned before opening another Pull Request.

Thanks again for your support! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [Bug]: Snake game over audio loops indefinitely on game over screen

2 participants