jMonkeyEngine / jMonkeyEngine/jmonkeyengine
Make AudioNode constructors less confusing
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 14
Description
Currently we have constructors taking a name, name + boolean, or name + two booleans. There's no need for this complexity. Its best to just have a single constructor specifying the asset manager, the name of the audio file, and whether its buffered or streamed. The documentation should clearly specify what are the differences between buffered or streamed sources and when to use either.
E.g.
audioNode = new AudioNode(assetManager, "Music/Song123.ogg", Type.Streaming)
or
audioNode = new AudioNode(assetManager, "Sound/Misc/Hit.ogg", Type.Buffered)
Also the streamCache option should always be true, since it is unknown whether the user wants the sound to be looping, its best not to guess and assume it should support looping always.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the AudioNode constructors and their call sites, then review the related audio documentation. Consolidate the constructor options around the asset manager, audio filename, and buffered or streaming choice, document when each mode applies, and verify that stream caching always supports looping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- audio-video-rtc, game-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100