<div dir="ltr"><div>I know I've discussed this before, but apparently not on the mailinglist.</div><div><br></div><div>SDL_Mixer 2 added support for .ogg loop points a couple of years ago. (Strangely it's not in the changelog)<br></div><div></div><div><div><br></div><div>Loop points work as LOOPSTART and LOOPEND or LOOPLENGTH (optional) comments embedded in the .ogg file. LOOPSTART+LOOPLENGTH is RPG Maker-compatible.</div><div><br></div><div>Within the last few days to weeks, more stuff has landed in SDL_mixer hg.</div><div>-loop points in FLAC files (note: I compiled sdl_mixer.dll without FLAC support)<br></div><div>-loop points can now be expressed in hh:mm:ss notation, or named LOOP_START or LOOP-START, for compatibility with Doom source portsĀ  <a href="https://zdoom.org/wiki/Audio_loop">https://zdoom.org/wiki/Audio_loop</a></div><div>-loop points now respect the number of times we asked SDL_mixer to loop the song. I believe after that number of loops, it'll proceed past LOOPEND to the end, and then stop (not loop to beginning). Someone could always submit a patch for another comment controlling a separate loop count.<br></div><div><br></div><div>So I would like to add the ability to edit loop-points right in the music import menu.<br></div><div><br></div><div>We already have code for adding comments to an .ogg file when converting .mp3 to .ogg, but it seems to oggenc can't be used to add comments to an existing ogg file. Instead, the vorbiscomment program (part of vorbis-tools) does that. Another 186kB download<a href="http://www.rarewares.org/files/ogg/vorbiscomment-1.2.0.zip">.<br></a></div></div><div></div><div></div><div><br></div><div>=== SDL_mixer 1.2 ===<br></div><div><br></div><div>Loop points aren't in SDL_mixer 1.2. There hasn't been an update to SDL_mixer 1.2 since 2012, but it looks like they're preparing a bugfix one, including a number of backported loop-related bugfixes. It's certainly not getting any features.<br></div><div><div><br></div><div>There are only a couple bugs that I'm aware of left in gfx_sdl2; I'd like to fix them and switch to it as default on Mac, Linux and Windows after Fufluns is released</div></div><div><br></div><div>However the ogg loop stuff is spread over just a few of commits and should be very easy to backport to SDL_mixer 1.2, for our own build of sdl_mixer.dll (for people who want to stick to gfx_sdl instead of gfx_sdl2 for whatever reason) and also for the android port.<br></div><div><br></div><div>=== SDL_mixer X ===<br></div><div><br></div><div>Loop points were first implemented in SDL_mixer X, which is a fork of SDL_mixer 2, which has a number of interesting features.<br></div><div><a href="https://wohlsoft.github.io/SDL-Mixer-X/">https://wohlsoft.github.io/SDL-Mixer-X/</a></div><div><br></div><div>Most notably, it supports many more module formats and has ADLMIDI (OPL3) and OPNMIDI OPN2 synthesizer-based MIDI players, which could be used to play MIDI on Android or elsewhere without needing soundfonts. Sounds different to MIDI playback with a soundfont, but I think in most case ADLMIDI not bad (except percussion maybe). These both also support controller  111-based loop points (RPG Maker-compatible), just like music_native/native2 do. They could also be used to implement true BAM playback. (ADLMIDI contains at least two OPL3 synthesizers: Nuked and DOSbox)</div><div><br></div><div>But these synths are GPLv3+ licensed, which is a problem (inhibiting relicensing of the engine). So maybe we could use it just on Android for MIDI playback, and not for BAM. iOS has MIDI support builtin.<br></div></div>