Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions libmikmod/include/mikmod_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ typedef struct FILTER {
#define EF_SUSTAIN 2
#define EF_LOOP 4
#define EF_VOLENV 8
#define EF_ITMODE 16

/* New Note Action Flags */
#define NNA_CUT 0
Expand Down Expand Up @@ -470,18 +471,19 @@ typedef struct ENVPR {
UBYTE pts; /* number of envelope points */
UBYTE susbeg; /* envelope sustain index begin */
UBYTE susend; /* envelope sustain index end */
UBYTE beg; /* envelope loop begin */
UBYTE end; /* envelope loop end */
SWORD p; /* current envelope counter */
UWORD a; /* envelope index a */
UWORD b; /* envelope index b */
UBYTE loopbeg; /* envelope loop begin */
UBYTE loopend; /* envelope loop end */
SWORD tick; /* current envelope counter */
UWORD index; /* envelope index for the point after the current one */
SWORD lastval; /* the last calculated value */
BOOL interpolate;/* whether to interpolate */
ENVPT* env; /* envelope points */
} ENVPR;

typedef struct MP_CHANNEL {
INSTRUMENT* i;
SAMPLE *s;
UBYTE sample; /* which sample number */
SBYTE sample; /* which sample number, -1 if illegal instrument has been set */
UBYTE note; /* the audible note as heard, direct rep of period */
SWORD outvolume; /* output volume (vol + sampcol + instvol) */
SBYTE chanvol; /* channel's "global" volume */
Expand Down Expand Up @@ -595,6 +597,8 @@ typedef struct MP_VOICE {
ENVPR penv;
ENVPR cenv;

SWORD envstartpos;/* Start position for envelopes set by XM effect L */

UWORD avibpos; /* autovibrato pos */
UWORD aswppos; /* autovibrato sweep pos */

Expand Down
4 changes: 3 additions & 1 deletion libmikmod/loaders/load_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,9 @@ static BOOL IT_Load(BOOL curious)
return 0;
}

d->volflg|=EF_VOLENV;
d->volflg|=(EF_VOLENV | EF_ITMODE);
d->panflg|=EF_ITMODE;
d->pitflg|=EF_ITMODE;
d->insname = DupStr(ih.name,26,0);
d->nnatype = ih.nna & NNA_MASK;

Expand Down
Loading