This this a build of LunaDLL which will completely replace SMBX's audio engine with SDL2_mixer. SDL2_mixer will give more, faster and flexible audio playback and more supported built-in formats! Also, SDL will play MIDI's correctly unlike default MCI, and will play traker music formats like .MOD, .IT, .XM, .S3M, etc... (you can create them through Mod Plug Tracker with or without using of MIDI-files as sources and with your samples, for example, which you used to build your own .SPC files)
- Floods system tray with codec icons
- Loading slow
- Between loops you will hear clicks
- Supported formats: MP3, WAV and buggy playback of MID
- Supported built-in formats: MP3, WAV, MID, OGG, FLAC, MOD, IT, XX, S3M, etc...
- Will prevent flood of system tray because SDL Mixer play all sounds and musics with built-in decoders!
- Almost instant music/sound loading!
- Faster and better sound playback
- Starting of music playback is faster!
- True and clean loop: you will don't hear clicks between loops if your sound have connected waves on edges
- We have able to implement customization of sounds and musics stuff through LunaDLL without replacing of default content and without re-hexing of smbx.exe!
- SMBX summary will starts FASTER!
Original link: http://www.youtube.com/watch?v=oIBI2aPT0C4
Download level file from this video with used musics:
- You should convert all .MP3 sound effects into .OGG format (put your .ogg files into /sounds dir of SMBX, you can remove old .mp3 stuff, but save them just in case. LunaDLL+SDL will play .OGG sounds instead of original .MP3's).
- All your musics should have 44100 sample rate or you will hear dirty noise. You should re-sample your musics into 44100 Hz. (SDL's real-time re-sampler is buggy yet.). Why? Because SDL mixer plays all sounds and musics in the united stream and all tracks should have a uniform sample rate (SDL trying to re-sample them if they have sample rate which is not equal to sample rate of stream, but this is not giving guaranties for good playback).
How to use:
Simple and easy: just unpack contents of archive and replace LunaDLL.dll with new (smbx.exe should be hexed with LunaDLL!) and your SMBX will have able to play more music formats! If you will don't use autocode or lua scripts, all SMBX's sounds and musics will be played through SDL anyway! You will take able put your .OGG, .FLAC or any tracker musics (.IT, .MOD, XT, etc...) into your "custom" music field and enjoy
But if you wish to use SDL with scripts, you now have a way to play multiple custom musics at one section!
Download official LunaLUA (Already includes SDL2_mixer)
Useful stuff and examples
Download OGG stuff for SMBX 220.127.116.11
To take effects, unpack archive into your SMBX directory (sounds.ini and musics.ini - definition of standard musics and sounds, you can edit them instead of hack EXE!)
Download OGG stuff for A2MBXT
To take effects, unpack archive into your SMBX/A2MBXT directory (sounds.ini and musics.ini - definition of standard musics and sounds, you can edit them instead of hack EXE!)
LUA Example 1 - multiple custom musics in one section!
(You have able use ANY files with formats: WAV, MP3, OGG, MID, IT, MOD, XM, S3M, etc...)
LUA Example 2 - Random music switch and panning stereo SFX loop effects!
Custom sound pack example
Unpack them into root of any your episode and try to play it!
P.S> PGE uses SDL2_mixer to play musics and sounds!
Download software MIDI-driver which plays MIDI like SB16 on Windows 95/95: http://wohlsoft.ru/docs/Sounds/SMBX_OPL/opl3synth.zip
Driver for Windows XP/Vista/7/8. If you have Windows Vista/7/8 You will need a tool which giving able switch MIDI playback device
(I recommends a BASSMIDI http://www.kode54.net/bassmididrv/ ). In the Windows XP you can switch your MIDI device in the "Control Panel" / "Sounds and Audio Devices"
Customization of default sounds and musics WITHOUT replacing! (sounds.ini and music.ini)
There are a special files which redefining music and sounds paths. You can just put them into SMBX root with sound and music fodlers
or you can insert them into your episode (you don't need to customize complete stuff, you can just replace only necessary).
Code: Select all
-|--Folder of musics
In the INI-file all path relative to EPISODE ROOT: If put musics into subfolder "My Music", you should define paths:
Same rule for sounds.ini!
In the "_ini_examples" folder you can take examples of INI-files redefinign of music and sounds stuff.
You have able use ANY music in next formats: MP3, OGG, FLAC, WAV, MID, IT, XM, MOD, S3M, (and other tracker music formats...).
You have able use ANY sounds in next formats: OGG, FLAC, WAV (Note: sounds in MP3 format will NOT work with SDL Mixer!)
SDL Mixer specific LUA API:
Read official LunaLUA references