gzdoom-gles/dumb/src/core/duhlen.c
Randy Heit 01f59fa85f - Added an alternate module replay engine that uses foo_dumb's replayer, a
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)
2008-05-29 23:33:07 +00:00

42 lines
1.7 KiB
C

/* _______ ____ __ ___ ___
* \ _ \ \ / \ / \ \ / / ' ' '
* | | \ \ | | || | \/ | . .
* | | | | | | || ||\ /| |
* | | | | | | || || \/ | | ' ' '
* | | | | | | || || | | . .
* | |_/ / \ \__// || | |
* /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque
* / \
* / . \
* duhlen.c - Functions to set and return the / / \ \
* length of a DUH. | < / \_
* | \/ /\ /
* By entheh. \_ / > /
* | \ / /
* Note that the length of a DUH is a constant | ' /
* stored in the DUH struct and in the DUH disk \__/
* format. It will be calculated on loading for
* other formats in which the length is not explicitly stored. Also note that
* it does not necessarily correspond to the length of time for which the DUH
* will generate samples. Rather it represents a suitable point for a player
* such as Winamp to stop, and in any good DUH it will allow for any final
* flourish to fade out and be appreciated.
*/
#include "dumb.h"
#include "internal/dumb.h"
int32 DUMBEXPORT duh_get_length(DUH *duh)
{
return duh ? duh->length : 0;
}
void DUMBEXPORT duh_set_length(DUH *duh, int32 length)
{
if (duh)
duh->length = length;
}