This is an EXPERIMENTAL alpha release of a development branch of RC5 containing some BGM- and sound-related changes. Because it's a significant change to the BGM architecture, we'd be interested in any feedback on its stability or functionality before considering folding it into the main RC series.
The changes you will see, in a nutshell:
You MUST use the updated mugen.cfg included in order for BGM to work!
Contents
All the RC5 changes, plus:
New EX + alpha bug fix:
Try turning up the audio buffer size and/or turning down the mixer sample rate in mugen.cfg ([Sound] section). If you can't get it to work right, then please report the issue to us, along with your system specs. In your report, try to distinguish between dropouts (a short period of silence), skips (the music jumps ahead by a small amount), and stutters (the music repeats itself briefly).
For this alpha build, the BGM system tries to keep track of its status. You can find some summary timing statistics for the mixer callback written to the end of mugen.log. You can also see if the system detected a decoder underrun by searching for lines saying "possible read starvation detected!" This information helps us troubleshoot the possible causes of sound corruption.
The following plugins are in the package. See the comments in mugen.cfg for optional parameters and usage.
mpg123
Supports MP3 playback using the libmpg123 decoder, which features several optimized decoding engines written in assembly. Supports looppoints, ReplayGain volume adjustment, and sample-accurate seeking. (Note: seeking will lose an unnoticeable amount of accuracy if the MP3 is at a sample rate different from the mixer sample rate.) mpg123 also fixes the "my MP3 plays slow/fast" problems.
sdlmix
Wrapper plugin for all the BGM services provided by SDL mixer. This means OGG, MIDI, WAV (PCM only), and MODs and other tracker files. You can also play mp3s with sdlmix if you want to, but this is not recommended.
For file types other than MP3, sdlmix performs seamless looping from the end to the beginning of the file. However, arbitrary loopstart and loopend points cannot be specified.
tonegen
Demo plugin that just plays a sine wave. Nothing fancy. This is an example plugin for the plugin SDK.
The volume system has also been revamped. There is now a master volume setting, a voice/sfx volume setting, and a BGM volume setting. That's it. Volume settings are floating-point numbers between 0% and 100%, and multiply together to give the final output volume. Plugins may also have individual volume multipliers.
For sound effects, the product of all volume scales (master volume, wave volume, and any additional scaling factors in the case of CNS) cannot exceed 100%. If the product is too large, it is reduced to 100%. For plugins, the meaning of a volume scale exceeding 100% (after including plugin-specific volume scaling) is dependent on the particular plugin.
[Music] bgmvolume (replaces bgvolume)
bgmvolume is a floating-point multiplier for this stage's volume. 100% is no change. The old parameter, "bgvolume", is deprecated and is ignored.
[Music] bgmloopstart, bgmloopend
Specifies the start and end points of the music to loop. If these are set and looping is on, then the music will play from beginning to loopend, then continue looping from loopstart to loopend indefinitely. The exact specification of these parameters is plugin-dependent. For mpg123, the loop points are specified in terms of samples. No other plugins support loop points at present. bgmloopstart defaults to 0 (beginning) and bgmloopend defaults to -1 (end of file).
[Music] {title, select, vs, victory}.bgm.loopstart (also loopend and volume)
[Demo Mode] fight.stopbgm
If fight.playbgm = 0, then setting fight.stopbgm = 0 allows the title BGM to continue playing during Demo mode.
These are just the ones we remember.
All the RC4 changes, plus:
New EX + alpha bug fixes:
If you use mpg123 for your mp3 files, then the following bugs are fixed: