mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-12 22:52:28 -05:00
mikmod: Upgrade mikmod core from v3.2.0 to v3.3.11
* Get rid of the non-functional GT2 loader * Add the UMX loader * Add HQ mixer routines (and make it configurable) * Allow samplerate to be configured at run/playtime * Support >64KHz mixing/playback * Correctly restore non-boost status (The diff to upstream is much smaller now too!) Change-Id: Iaa4ac901ba9cd4123bb225656976e78271353a72
This commit is contained in:
parent
8c7780bafc
commit
b4e70422a3
43 changed files with 5072 additions and 2802 deletions
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/*==============================================================================
|
||||
|
||||
$Id: load_gdm.c,v 1.3 2005/04/07 19:57:38 realtech Exp $
|
||||
$Id$
|
||||
|
||||
General DigiMusic (GDM) module loader
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ typedef struct GDMSAMPLE {
|
|||
static GDMHEADER *mh=NULL; /* pointer to GDM header */
|
||||
static GDMNOTE *gdmbuf=NULL; /* pointer to a complete GDM pattern */
|
||||
|
||||
CHAR GDM_Version[]="General DigiMusic 1.xx";
|
||||
static CHAR GDM_Version[]="General DigiMusic 1.xx";
|
||||
|
||||
static int GDM_Test(void)
|
||||
{
|
||||
|
|
@ -146,36 +146,45 @@ static void GDM_Cleanup(void)
|
|||
{
|
||||
MikMod_free(mh);
|
||||
MikMod_free(gdmbuf);
|
||||
mh=NULL;
|
||||
gdmbuf=NULL;
|
||||
}
|
||||
|
||||
static int GDM_ReadPattern(void)
|
||||
{
|
||||
int pos,flag,ch,i,maxch;
|
||||
int pos,flag,ch,i;
|
||||
GDMNOTE n;
|
||||
UWORD length,x=0;
|
||||
SLONG length,x=0;
|
||||
|
||||
/* get pattern length */
|
||||
length=_mm_read_I_UWORD(modreader)-2;
|
||||
length=(SLONG)_mm_read_I_UWORD(modreader);
|
||||
length-=2;
|
||||
|
||||
/* clear pattern data */
|
||||
memset(gdmbuf,255,32*64*sizeof(GDMNOTE));
|
||||
pos=0;
|
||||
maxch=0;
|
||||
|
||||
while (x<length) {
|
||||
memset(&n,255,sizeof(GDMNOTE));
|
||||
flag=_mm_read_UBYTE(modreader);
|
||||
x++;
|
||||
|
||||
if (_mm_eof(modreader)) {
|
||||
_mm_errno=MMERR_LOADING_PATTERN;
|
||||
if (_mm_eof(modreader))
|
||||
return 0;
|
||||
}
|
||||
|
||||
ch=flag&31;
|
||||
if (ch>maxch) maxch=ch;
|
||||
if (ch > of.numchn)
|
||||
return 0;
|
||||
|
||||
if (!flag) {
|
||||
pos++;
|
||||
if (x==length) {
|
||||
if (pos > 64)
|
||||
return 0;
|
||||
} else {
|
||||
if (pos >= 64)
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (flag&0x60) {
|
||||
|
|
@ -343,7 +352,7 @@ static int GDM_Load(int curious)
|
|||
SAMPLE *q;
|
||||
GDMSAMPLE s;
|
||||
ULONG position;
|
||||
(void)curious;
|
||||
(void)curious;
|
||||
|
||||
/* read header */
|
||||
_mm_read_string(mh->id1,4,modreader);
|
||||
|
|
@ -390,7 +399,7 @@ static int GDM_Load(int curious)
|
|||
}
|
||||
|
||||
/* now we fill */
|
||||
of.modtype=StrDup(GDM_Version);
|
||||
of.modtype=MikMod_strdup(GDM_Version);
|
||||
of.modtype[18]=mh->majorver+'0';
|
||||
of.modtype[20]=mh->minorver/10+'0';
|
||||
of.modtype[21]=mh->minorver%10+'0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue