Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media: Overhaul PlatformPlayer in its entirety.
This is a big one... in brief: Rework the entirety of PlatformPlayer, and its surrounding classes to fix a bunch of stuff at once. In detail: VolumeControl, TempoControl, and ToneControl are implemented, although only VolumeControl was truly tested, couldn't find a jar that uses either ToneControl or TempoControl yet. midiControl is partially implemented, but given how non-standard most of it is, maybe it's rarely used, or whenever it's used,there's a fallback for platforms that don't implement it. mediaCache was temporarily disabled, as it will have to influence the player's state handling, and i wanted the reference rewrite to be as correct as possible in regards to the docs and other J2ME simulators. Some duplicate files like ToneControl and VolumeControl were removed from microedition.media, as they're already present in microedition.media.control, which is where they're actually loaded from. Player state handling was completely overhauled to match the official J2ME Player docs, with listeners for END_OF_MEDIA events being added for better conformance as they weren't present before. Most of this housekeeping is relegated to the audioplayer superclass, with actual functionality being handled by the underlying players, such as wavPlayer and midiPlayer. Player creation no longer makes it go from UNREALIZED straight to PREFETCHED. We must follow the standard lifecycle of UNREALIZED->REALIZED->PREFETCHED, and handle each accordingly, which means that all players now have their setup be handled by their realize() and prefetch() calls. Add print messages on most of the critical functions, as we might have problems on them (especially on what was just implemented) Also, set everything up for the future TonePlayer.
- Loading branch information
8e93118
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incredible job!!!
The author of https://github.com/maholator/MahoLator says such games don't exist, and even that no devices implement it!