This pull request aims to improve the codebase's readability by addressing several issues.
Specifically, the following changes were made:
Removed an unused block of code to reduce clutter.
Moved some variables to the method where they are actually used to improve the code's organization.
Added a specific exception for when an audio file is not loaded, which provides informative error messages to developers and users.
The motivation behind these changes is to make the code easier to understand and maintain, which in turn can reduce bugs and improve overall code quality.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
Checklist:
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have added tests that prove my fix is effective or that my feature works
Description
This pull request aims to improve the codebase's readability by addressing several issues.
Specifically, the following changes were made:
The motivation behind these changes is to make the code easier to understand and maintain, which in turn can reduce bugs and improve overall code quality.
Type of change
Checklist: