arcade
arcade copied to clipboard
Feature: Add passing pyglet encoders and/or automatic Ogg support
Enhancement request:
TL;DR: @DigiDuncan pointed out we can't really load .ogg through arcade
What should be added/changed?
- Add a way to pass a decoder supported by pyglet's
media.loadfunction - (Optional / risky) Smart and helpful
pyogg/PyOggDecoderwarnings
What would passing in a decoder would it help with?
Improve arcade user experience by allowing sound loading to:
- take specific decoders such as pyglet's
PyOggDecoder - avoid subclassing
Soundas in Charm's current code - without having to file tickets for new formats (example: QOA)
Changes needed:
- Add a
decoderkeyword argument toarcade.sound.Sound.__init__ - ~~Add a temp
Decoderprotocol to annotate it before upstreaming matching pyglet's codecs~~ Use the existingMediaDecodertype - Document the change
- Update the sound page in the programming guide
Follow-up Work
- Add an example
- Make upstream pyglet PRs to help with https://github.com/pyglet/pyglet/issues/1084:
- ~~Define a
DecoderProtocoltype matching pyglet's pyglet's codecs~~ - Add argument and return annotations to the codecs
- ~~Define a
Thanks for writeup, pushfoo! +1.
Follow-up from earlier reading tonight:
- There's already a
MediaDecoderbase type in pyglet - Although we could define a
MediaDecoderLikeprotocol, it may be redundant for now