----------------------------------------------------------------------------- MiniFMOD 1.4 Public source code release, Copyright Firelight Multimedia, 1999-2000. ----------------------------------------------------------------------------- MiniFMOD is Microsoft Visual C 5/6 compatible only .. If people want to port it to other compilers go ahead. If you do I am not responsible for it, but i will provide a link to your page. ============== DOCUMENTATION ============== *** Disclaimer and legal *** ---------------------------- - *MiniFMOD is not FMOD*. The code is a complete hack, and does by no way represent the source contained within the main FMOD library. I stripped and copied code around, took out functions and inlined them (ie i put waveout code in the music file!), and generally turned it upside down to try and squeeze some size! - MiniFMOD may not replay XM files 100% as FMOD does, due to some cutting of corners. It seems to be ok so far. - This source is provided as-is. Firelight Multimedia will not support or answer questions about the source provided. (unless there are some REALLY nasty bugs.. remember im NOT going to spend time on this! fix it yourself!) - MiniFMOD Sourcecode is copyright (c) 2000, Firelight Multimedia. - This source must not be redistributed without this text. - The source can be modified, and redistributed as long as no copyright or comment blocks (see at the top of each source file) are remove. AGAIN : DONT NAG ME WITH QUESTIONS ABOUT THE SOURCE, ASK SOMEONE ELSE BECAUSE IT DOES WORK (i recommend #coders on ircnet.) General Usage Instructions just using minifmod.lib IMPORTANT (no source recompile) -------------------------------------------------------------------------- - See MAIN.CPP for an example of how to use MINIFMOD. - You MUST set file IO callbacks for FMOD to use. This is a very flexible way to work, and saves having multiple file routines for file, memory or wad loading! Just rip the sample if you dont know what it is about, or get the full FMOD 3 API and read the documentation entries on the functions in the help file provided. - There are no error codes. All functions return true or false, and it should be obvious why they fail. - FSOUND_Init will fail if no IO callbacks are set. - Compile your exe with SIZE optimizations ON. (like the test example) - Compress your exe with UPX. It is the best exe packer around. It is at http://www.nexus.hu/upx/ - Pass a callback function to FMUSIC_LoadSong or NULL. This will allow you to get a callback when each sample is loaded in a song. Here you can then fill in the data for the sample yourself. Note if you set callbacks, the samples are not loaded from file, and will be just silence if not filled in. - If rewriting C standard libraries you need to supply pow() for fmod music playback routine. Making your exe even smaller with XMEFFECTS.H and FEXP.EXE! ------------------------------------------------------------ - Note all the effects in the xm replay code are wrapped with #ifdef's. They are defined in xmeffects.h. - Have a look in the /lib directory .. There is an executable called FEXP.EXE - Use FEXP.EXE on an xm file and it will generate xmeffects.h for you! - Recompile the minifmod library with the new xmeffects.h - See your exe size go down AGAIN! - (only play the song you fexp'ed or it will screw up on other songs probably :) ..) Greets! :) ----------- Hi's go out to sulphur, gaffer, Nix, gyr, zoon, pheon, and gay russian aktion. Revision History. ------------------ Version 1.4 ----------- * Source code release! + Added FEXP, a tool to generate XMEFFECTS.H, and disregard code that isnt needed for your song! * Now possible to only have 5k footprint!!! Version 1.3 -------------- + New prebuffered output! - this means NO latency and NO jittering/skipping sound! (due to small buffersizes) + GetRow/GetOrder/GetTime are now latency free.. you can sync EXACTLY to when you hear the sound. - FSOUND_SetBufferSize removed.. there is no need for this now! - Fixed click at end of non looping samples - Fixed bug in fine portamento - Fixed normal and instrument vibrato. - Fixed panning/volume bug * Note most xm of these replay bugs were introduced after size optimizations :) Version 1.2 -------------- - Now 7.5k footprint!! - Fixed naughty XM replay bug - accidently left some test code in instrument vibrato! - Load from windows resource example added in main.cpp - I doubt it will get any smaller. If i totally rewrote the XM player i could halve the size maybe, but i dont have the time or courage to do that :). Version 1.1 -------------- - New volume ramping mixer - 8k footprint instead of 8.5k - MSVC 5.0 support added - small harmonic noise removed from mixing routine = clearer sound. - Added sample load callback, when the XM loader loads samples, it calls your callback and you can fill in the data if you like (you might have a better compression algorithm) - XM porta between instrument samples fixed. - removed dependancy on stdlib func strncmp so you dont have to write your own if you are replacing C stdlib. Version 1.0 -------------- - Only 8.5k footprint in exe after being compressed with UPX. (maybe less if you dont call info functions) - Statically linkable .lib. - XM only - Windows Multimedia Wave Out only. (140ms latency) - FPU Interpolating, volume ramping mixer only. - Only the basic API functions needed to play and synchronize a mod. - Tremolo has been disabled - MSVC 6 only - No file routines, you have to supply your own using FSOUND_SetFile ------------------------------- Firelight Multimedia is a registered business name.