mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-18 10:21:42 +00:00
01f59fa85f
heavily customized version of DUMB (Dynamic Universal Music Bibliotheque). It has been slightly modified by me: * Added support for Ogg Vorbis-compressed samples in XM files ala FMOD. * Removed excessive mallocs from the replay core. * Rerolled the loops in resample.c. Unrolling them made the object file ~250k large while providing little benefit. Even at ~100k, I think it's still larger than it ought to be, but I'll live with it for now. Other than that, it's essentially the same thing you'd hear in foobar2000, minus some subsong detection features. Release builds of the library look like they might even be slightly faster than FMOD, which is a plus. - Fixed: Timidity::font_add() did not release the file reader it created. - Fixed: The SF2 loader did not free the sample headers in its destructor. SVN r995 (trunk)
42 lines
1.5 KiB
C
42 lines
1.5 KiB
C
/* _______ ____ __ ___ ___
|
|
* \ _ \ \ / \ / \ \ / / ' ' '
|
|
* | | \ \ | | || | \/ | . .
|
|
* | | | | | | || ||\ /| |
|
|
* | | | | | | || || \/ | | ' ' '
|
|
* | | | | | | || || | | . .
|
|
* | |_/ / \ \__// || | |
|
|
* /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque
|
|
* / \
|
|
* / . \
|
|
* loadasy.c - Code to read an ASYLUM Music Format / / \ \
|
|
* module file, opening and closing it | < / \_
|
|
* for you. | \/ /\ /
|
|
* \_ / > /
|
|
* By Chris Moeller. | \ / /
|
|
* | ' /
|
|
* \__/
|
|
*/
|
|
|
|
#include "dumb.h"
|
|
#include "internal/it.h"
|
|
|
|
|
|
|
|
/* dumb_load_asy_quick(): loads a AMF file into a DUH struct, returning a
|
|
* pointer to the DUH struct. When you have finished with it, you must
|
|
* pass the pointer to unload_duh() so that the memory can be freed.
|
|
*/
|
|
DUH *DUMBEXPORT dumb_load_asy_quick(const char *filename)
|
|
{
|
|
DUH *duh;
|
|
DUMBFILE *f = dumbfile_open(filename);
|
|
|
|
if (!f)
|
|
return NULL;
|
|
|
|
duh = dumb_read_asy_quick(f);
|
|
|
|
dumbfile_close(f);
|
|
|
|
return duh;
|
|
}
|