Support endless loop for BRSTM files
Currently VLC does not support looping of a region of a .brstm audio file as described in its header. The primary usecase for this format is seamless looping of game audio, particularly in relation to GC/Wii games, so this would be very nice to have (if only to keep folks from having to look up flaky extension videos of game OSTs on YouTube).
I'm not super familiar with this project, but I did a little research to see if I could handle this myself - correct me if I'm wrong anywhere here - this is all libav under the hood, and it seems like their demuxer for BRSTMs does provide "loop_start" metadata, so I think VLC has (or can get) the info it needs to do this, it just might not have the actual groundwork for this kind of thing. Some thoughts, again I'm new here so take all this with a grain of salt:
- Don't the GME/MOD containers technically support this? Is there a best practice for implementing this kind of looping functionality in VLC?
- There's another format in libav that supports this loop_start metadata (as well as loop_end) - MCA. Could possibly implement this such that it works for both of those formats & paves the way for any future libav codecs that provide that kind of metadata.
- I know there is an A/B looping feature in the advanced player controls, at least on the desktop client I use; would it be sensible to hook into that system for this (i.e. populating the A/B loop points based on this provided metadata and allowing the user to turn it on based on that)?
Would appreciate some guidance on this, it's a weird ask and not a particularly important one, but if someone closer to the project can confirm this isn't a huge/hacky change I would be willing to give the code a shot myself.