Hello community, here is the log from the commit of package libxmp for openSUSE:Factory checked in at 2014-08-11 10:07:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libxmp (Old) and /work/SRC/openSUSE:Factory/.libxmp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libxmp" Changes: -------- --- /work/SRC/openSUSE:Factory/libxmp/libxmp.changes 2014-04-20 11:37:06.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libxmp.new/libxmp.changes 2014-08-11 10:08:27.000000000 +0200 @@ -1,0 +2,13 @@ +Mon Aug 11 01:34:12 UTC 2014 - [email protected] + +- Update to new upstream release 4.2.8 +* fix OctaMED decimal volume decoding +* fix MED4 sampled instrument octave range +* fix mishandling of MED4 effect FFD +* fix MED synth waveform command CHD +* fix sequence number reset on player start +* fix stray notes in XM +* limit note number to avoid crash +* disable recursive file decompression + +------------------------------------------------------------------- Old: ---- libxmp-4.2.7.tar.gz New: ---- libxmp-4.2.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libxmp.spec ++++++ --- /var/tmp/diff_new_pack.j4fLBj/_old 2014-08-11 10:08:27.000000000 +0200 +++ /var/tmp/diff_new_pack.j4fLBj/_new 2014-08-11 10:08:27.000000000 +0200 @@ -21,16 +21,14 @@ Summary: Module Player library for MOD, S3M, IT and others License: LGPL-2.1 Group: Development/Libraries/C and C++ -Version: 4.2.7 +Version: 4.2.8 Release: 0 Url: http://xmp.sf.net/ -#Freecode-URL: http://freecode.com/projects/libxmp/ #Git-Clone: git://git.code.sf.net/p/xmp/libxmp Source: http://downloads.sf.net/xmp/%name-%version.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: pkgconfig -BuildRequires: xz %description libxmp is a module player library which supports many module formats, ++++++ libxmp-4.2.7.tar.gz -> libxmp-4.2.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/Makefile.in new/libxmp-4.2.8/Makefile.in --- old/libxmp-4.2.7/Makefile.in 2014-04-09 19:14:54.000000000 +0200 +++ new/libxmp-4.2.8/Makefile.in 2014-07-12 16:40:04.000000000 +0200 @@ -1,6 +1,6 @@ VERSION_MAJOR = 4 VERSION_MINOR = 2 -VERSION_RELEASE = 7 +VERSION_RELEASE = 8 VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/docs/Changelog new/libxmp-4.2.8/docs/Changelog --- old/libxmp-4.2.7/docs/Changelog 2014-04-12 19:54:13.000000000 +0200 +++ new/libxmp-4.2.8/docs/Changelog 2014-07-14 02:17:38.000000000 +0200 @@ -1,6 +1,18 @@ Stable versions --------------- +4.2.8 (20140714): + Fix bugs reported by Sami Jumppanen: + - fix OctaMED decimal volume decoding + - fix MED4 sampled instrument octave range + - fix mishandling of MED4 effect FFD + - fix MED synth waveform command CHD + Other changes: + - fix sequence number reset on player start + - fix stray notes in XM (reported by Andreas Argirakis) + - limit note number to avoid crash (reported by Bastian Pflieger) + - disable recursive file decompression + 4.2.7 (20140412): - add support for XM with ADPCM samples (reported by mk.bikash) - add OctaMED effect 2E (reported by Andreas Argirakis) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/include/xmp.h new/libxmp-4.2.8/include/xmp.h --- old/libxmp-4.2.7/include/xmp.h 2014-04-12 19:58:02.000000000 +0200 +++ new/libxmp-4.2.8/include/xmp.h 2014-07-14 02:17:41.000000000 +0200 @@ -5,11 +5,11 @@ extern "C" { #endif -#define XMP_VERSION "4.2.7" -#define XMP_VERCODE 0x040207 +#define XMP_VERSION "4.2.8" +#define XMP_VERCODE 0x040208 #define XMP_VER_MAJOR 4 #define XMP_VER_MINOR 2 -#define XMP_VER_RELEASE 7 +#define XMP_VER_RELEASE 8 #if defined(_WIN32) && !defined(__CYGWIN__) # if defined(BUILDING_STATIC) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/libxmp.pc.in new/libxmp-4.2.8/libxmp.pc.in --- old/libxmp-4.2.7/libxmp.pc.in 2014-04-12 19:58:02.000000000 +0200 +++ new/libxmp-4.2.8/libxmp.pc.in 2014-07-14 02:17:41.000000000 +0200 @@ -5,7 +5,7 @@ Name: libxmp Description: Xmp module player library -Version: 4.2.7 +Version: 4.2.8 Requires: Libs: -L${libdir} -lxmp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/load.c new/libxmp-4.2.8/src/load.c --- old/libxmp-4.2.7/src/load.c 2014-04-10 15:21:30.000000000 +0200 +++ new/libxmp-4.2.8/src/load.c 2014-07-12 13:28:15.000000000 +0200 @@ -57,10 +57,6 @@ #ifndef LIBXMP_CORE_PLAYER -struct tmpfilename { - char *name; - struct list_head list; -}; int decrunch_arc (FILE *, FILE *); int decrunch_arcfs (FILE *, FILE *); @@ -98,8 +94,7 @@ BUILTIN_COMPRESS, BUILTIN_BZIP2, BUILTIN_XZ, - BUILTIN_LHA, - /* BUILTIN_ZOO, */ + BUILTIN_LHA }; @@ -111,25 +106,22 @@ #define REDIR_STDERR #endif -#define DECRUNCH_MAX 5 /* don't recurse more than this */ #define BUFLEN 16384 -static int decrunch(struct list_head *head, FILE **f, char **s, int ttl) +static int decrunch(FILE **f, char *s, char **temp) { unsigned char b[1024]; char *cmd; FILE *t; int fd, builtin, res; - char *temp2, tmp[PATH_MAX]; -#ifndef LIBXMP_CORE_PLAYER - struct tmpfilename *temp; -#endif + char tmp[PATH_MAX]; int headersize; cmd = NULL; builtin = res = 0; + *temp = NULL; if (get_temp_dir(tmp, PATH_MAX) < 0) return 0; @@ -254,20 +246,12 @@ D_(D_WARN "Depacking file... "); - temp = calloc(sizeof (struct tmpfilename), 1); - if (!temp) { - D_(D_CRIT "calloc failed"); - return -1; - } - - temp->name = strdup(tmp); - if (temp->name == NULL || (fd = mkstemp(temp->name)) < 0) { + *temp = strdup(tmp); + if (*temp == NULL || (fd = mkstemp(*temp)) < 0) { D_(D_CRIT "failed"); return -1; } - list_add_tail(&temp->list, head); - if ((t = fdopen(fd, "w+b")) == NULL) { D_(D_CRIT "failed"); return -1; @@ -279,7 +263,7 @@ char line[1024], buf[BSIZE]; FILE *p; - snprintf(line, 1024, cmd, *s); + snprintf(line, 1024, cmd, s); #ifdef WIN32 /* Note: The _popen function returns an invalid file opaque, if @@ -298,8 +282,9 @@ fclose(t); return -1; } - while ((n = fread(buf, 1, BSIZE, p)) > 0) + while ((n = fread(buf, 1, BSIZE, p)) > 0) { fwrite(buf, 1, n, t); + } pclose (p); } else { switch (builtin) { @@ -345,11 +330,6 @@ case BUILTIN_LHA: res = decrunch_lha(*f, t); break; -#if 0 - case BUILTIN_ZOO: - res = decrunch_zoo(*f, t); - break; -#endif case BUILTIN_OXM: res = decrunch_oxm(*f, t); break; @@ -369,45 +349,22 @@ D_(D_INFO "done"); + fseek(t, 0, SEEK_SET); fclose(*f); *f = t; - - if (!--ttl) { - return -1; - } - - temp2 = strdup(temp->name); - res = decrunch(head, f, &temp->name, ttl); - free(temp2); - /* Mirko: temp is now deallocated in unlink_tempfiles() - * not a problem, since unlink_tempfiles() is called after decrunch - * in loader routines - * - * free(temp); - */ return res; } - /* * Windows doesn't allow you to unlink an open file, so we changed the * temp file cleanup system to remove temporary files after we close it */ -static void unlink_tempfiles(struct list_head *head) +static void unlink_tempfile(char *temp) { - struct tmpfilename *li; - struct list_head *tmp; - - /* can't use list_for_each when freeing the node! */ - for (tmp = head->next; tmp != head; ) { - li = list_entry(tmp, struct tmpfilename, list); - D_(D_INFO "unlink tmpfile %s", li->name); - unlink(li->name); - free(li->name); - list_del(&li->list); - tmp = tmp->next; - free(li); + if (temp) { + unlink(temp); + free(temp); } } @@ -474,8 +431,10 @@ struct stat st; char buf[XMP_NAME_SIZE]; int i; - struct list_head tmpfiles_list; int ret = -XMP_ERROR_FORMAT;; +#ifndef LIBXMP_CORE_PLAYER + char *temp; +#endif if (stat(path, &st) < 0) return -XMP_ERROR_SYSTEM; @@ -490,15 +449,13 @@ if ((h = hio_open_file(path, "rb")) == NULL) return -XMP_ERROR_SYSTEM; - INIT_LIST_HEAD(&tmpfiles_list); - #ifndef LIBXMP_CORE_PLAYER - if (decrunch(&tmpfiles_list, &h->f, &path, DECRUNCH_MAX) < 0) { + if (decrunch(&h->f, path, &temp) < 0) { ret = -XMP_ERROR_DEPACK; goto err; } - if (hio_stat(h, &st) < 0) {/* get size after decrunch */ + if (hio_stat(h, &st) < 0) { /* get size after decrunch */ ret = -XMP_ERROR_DEPACK; goto err; } @@ -530,8 +487,9 @@ fclose(h->f); #ifndef LIBXMP_CORE_PLAYER - unlink_tempfiles(&tmpfiles_list); + unlink_tempfile(temp); #endif + if (info != NULL && !is_prowizard) { strncpy(info->name, buf, XMP_NAME_SIZE); strncpy(info->type, format_loader[i]->name, @@ -544,12 +502,12 @@ err: hio_close(h); #ifndef LIBXMP_CORE_PLAYER - unlink_tempfiles(&tmpfiles_list); + unlink_tempfile(temp); #endif return ret; } -static int load_module(xmp_context opaque, HIO_HANDLE *h, struct list_head *tmpfiles_list) +static int load_module(xmp_context opaque, HIO_HANDLE *h, char *tmpfile) { struct context_data *ctx = (struct context_data *)opaque; struct module_data *m = &ctx->m; @@ -579,8 +537,7 @@ hio_close(h); #ifndef LIBXMP_CORE_PLAYER - if (tmpfiles_list != NULL) - unlink_tempfiles(tmpfiles_list); + unlink_tempfile(tmpfile); #endif if (test_result < 0) { @@ -614,7 +571,7 @@ struct module_data *m = &ctx->m; HIO_HANDLE *h; struct stat st; - struct list_head tmpfiles_list; + char *temp; D_(D_WARN "path = %s", path); @@ -631,19 +588,17 @@ if ((h = hio_open_file(path, "rb")) == NULL) return -XMP_ERROR_SYSTEM; - INIT_LIST_HEAD(&tmpfiles_list); - #ifndef LIBXMP_CORE_PLAYER D_(D_INFO "decrunch"); - if (decrunch(&tmpfiles_list, &h->f, &path, DECRUNCH_MAX) < 0) + if (decrunch(&h->f, path, &temp) < 0) goto err_depack; if (hio_stat(h, &st) < 0) goto err_depack; - if (st.st_size < 256) { /* get size after decrunch */ + if (st.st_size < 256) { /* get size after decrunch */ hio_close(h); - unlink_tempfiles(&tmpfiles_list); + unlink_tempfile(temp); return -XMP_ERROR_FORMAT; } #endif @@ -664,12 +619,12 @@ #endif m->size = st.st_size; - return load_module(opaque, h, &tmpfiles_list); + return load_module(opaque, h, temp); #ifndef LIBXMP_CORE_PLAYER err_depack: hio_close(h); - unlink_tempfiles(&tmpfiles_list); + unlink_tempfile(temp); return -XMP_ERROR_DEPACK; #endif } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/loaders/it_load.c new/libxmp-4.2.8/src/loaders/it_load.c --- old/libxmp-4.2.7/src/loaders/it_load.c 2014-04-11 01:37:48.000000000 +0200 +++ new/libxmp-4.2.8/src/loaders/it_load.c 2014-07-12 13:28:15.000000000 +0200 @@ -517,27 +517,6 @@ if (~ifh.flags & IT_USE_INST) mod->ins = mod->smp; - if (ifh.special & IT_HAS_MSG) { - if ((m->comment = malloc(ifh.msglen + 1)) == NULL) - goto err4; - i = hio_tell(f); - hio_seek(f, start + ifh.msgofs, SEEK_SET); - - D_(D_INFO "Message length : %d", ifh.msglen); - - for (j = 0; j < ifh.msglen; j++) { - b = hio_read8(f); - if (b == '\r') - b = '\n'; - if ((b < 32 || b > 127) && b != '\n' && b != '\t') - b = '.'; - m->comment[j] = b; - } - m->comment[j] = 0; - - hio_seek(f, i, SEEK_SET); - } - if (instrument_init(mod) < 0) goto err4; @@ -893,8 +872,7 @@ if (0 != hio_seek(f, start + ish.sample_ptr, SEEK_SET)) goto err4; - //TODO: use proper unsigned values in xmp_sample structure - if ((unsigned)xxs->lpe > (unsigned)xxs->len || (unsigned)xxs->lps >= (unsigned)xxs->lpe) + if (xxs->lpe > xxs->len || xxs->lps >= xxs->lpe) xxs->flg &= ~XMP_SAMPLE_LOOP; if (~ish.convert & IT_CVT_SIGNED) @@ -1116,6 +1094,27 @@ free(pp_smp); free(pp_ins); + /* Song message */ + + if (ifh.special & IT_HAS_MSG) { + if ((m->comment = malloc(ifh.msglen + 1)) != NULL) { + hio_seek(f, start + ifh.msgofs, SEEK_SET); + + D_(D_INFO "Message length : %d", ifh.msglen); + + for (j = 0; j < ifh.msglen; j++) { + b = hio_read8(f); + if (b == '\r') { + b = '\n'; + } else if ((b < 32 || b > 127) && b != '\n' && b != '\t') { + b = '.'; + } + m->comment[j] = b; + } + m->comment[j] = 0; + } + } + /* Format quirks */ m->quirk |= QUIRKS_IT; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/loaders/med.h new/libxmp-4.2.8/src/loaders/med.h --- old/libxmp-4.2.7/src/loaders/med.h 2014-04-09 20:35:12.000000000 +0200 +++ new/libxmp-4.2.8/src/loaders/med.h 2014-07-12 13:28:15.000000000 +0200 @@ -307,7 +307,7 @@ UBYTE name[20]; /* name of the dump */ }; -void mmd_xlat_fx(struct xmp_event *, int, int, int); +void mmd_xlat_fx(struct xmp_event *, int, int, int, int); int mmd_alloc_tables(struct module_data *, int, struct SynthInstr *); int mmd_load_hybrid_instrument(HIO_HANDLE *, struct module_data *, int, int, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/loaders/med4_load.c new/libxmp-4.2.8/src/loaders/med4_load.c --- old/libxmp-4.2.7/src/loaders/med4_load.c 2014-04-06 16:31:45.000000000 +0200 +++ new/libxmp-4.2.8/src/loaders/med4_load.c 2014-07-12 13:28:15.000000000 +0200 @@ -45,7 +45,7 @@ static int med4_test(HIO_HANDLE *f, char *t, const int start) { - if (hio_read32b(f) != MAGIC_MED4) + if (hio_read32b(f) != MAGIC_MED4) return -1; read_title(f, t, 0); @@ -92,8 +92,6 @@ if (event->fxp == 0xff) { event->fxp = event->fxt = 0; event->vol = 1; - } else if (event->fxp == 0xfe) { - event->fxp = event->fxt = 0; } else if (event->fxp == 0xf1) { event->fxt = FX_EXTENDED; event->fxp = (EX_RETRIG << 4) | 3; @@ -103,6 +101,8 @@ } else if (event->fxp == 0xf3) { event->fxt = FX_EXTENDED; event->fxp = (EX_DELAY << 4) | 3; + } else if (event->fxp > 0xf0) { + event->fxp = event->fxt = 0; } else if (event->fxp > 10) { event->fxt = FX_S3M_BPM; event->fxp = 125 * event->fxp / 33; @@ -129,10 +129,10 @@ { s->has_nibble = !s->has_nibble; if (!s->has_nibble) { - return s->value & 0x0f; + return s->value & 0x0f; } else { - s->value = hio_read8(s->f); - return s->value >> 4; + s->value = hio_read8(s->f); + return s->value >> 4; } } @@ -163,13 +163,13 @@ static inline uint16 stream_read_aligned16(struct stream* s, int bits) { if (bits <= 4) { - return stream_read4(s) << 12; + return stream_read4(s) << 12; } else if (bits <= 8) { - return stream_read8(s) << 8; + return stream_read8(s) << 8; } else if (bits <= 12) { - return stream_read12(s) << 4; + return stream_read12(s) << 4; } else { - return stream_read16(s); + return stream_read16(s); } } @@ -249,7 +249,7 @@ continue; /* read flags */ - c = hio_read8(f); + c = hio_read8(f); /* read instrument name */ size = hio_read8(f); @@ -288,7 +288,7 @@ printf("pat=%x len=%x\n", mod->pat, mod->len); #endif if (mod->len > XMP_MAX_MOD_LENGTH) - return -1; + return -1; hio_read(mod->xxo, 1, mod->len, f); /* From MED V3.00 docs: @@ -305,9 +305,9 @@ } else { mod->bpm = 125 * tempo / 33; } - transp = hio_read8s(f); - hio_read8s(f); - flags = hio_read8s(f); + transp = hio_read8s(f); + hio_read8s(f); + flags = hio_read8s(f); mod->spd = hio_read8(f); if (~flags & 0x20) /* sliding */ @@ -435,7 +435,7 @@ int line = y * 32 + j; if (linemask[y] & 0x80000000) { - chmsk = stream_read_aligned16(&stream, chn); + chmsk = stream_read_aligned16(&stream, chn); for (k = 0; k < chn; k++, chmsk <<= 1) { event = &EVENT(i, k, line); @@ -450,7 +450,7 @@ } if (fxmask[y] & 0x80000000) { - chmsk = stream_read_aligned16(&stream, chn); + chmsk = stream_read_aligned16(&stream, chn); for (k = 0; k < chn; k++, chmsk <<= 1) { event = &EVENT(i, k, line); @@ -495,12 +495,12 @@ */ mask = hio_read32b(f); if (mask == MAGIC4('M','E','D','V')) { - mod->smp = 0; + mod->smp = 0; - if (instrument_init(mod) < 0) - return -1; - hio_seek(f, -4, SEEK_CUR); - goto parse_iff; + if (instrument_init(mod) < 0) + return -1; + hio_seek(f, -4, SEEK_CUR); + goto parse_iff; } mask <<= 32; mask |= hio_read32b(f); @@ -584,7 +584,7 @@ hio_read(synth.voltbl, 1, synth.voltbllen, f);; hio_read(synth.wftbl, 1, synth.wftbllen, f);; - hio_seek(f, pos + hio_read32b(f), SEEK_SET); + hio_seek(f, pos + hio_read32b(f), SEEK_SET); length = hio_read32b(f); type = hio_read16b(f); @@ -705,8 +705,8 @@ continue; } - /* instr type is sample */ - xxi->nsm = 1; + /* instr type is sample */ + xxi->nsm = 1; if (subinstrument_alloc(mod, i, 1) < 0) return -1; @@ -722,7 +722,7 @@ xxs->len = length; xxs->lps = temp_inst[i].loop_start; xxs->lpe = temp_inst[i].loop_end; - xxs->flg = temp_inst[i].loop_end > 2 ? XMP_SAMPLE_LOOP : 0; + xxs->flg = temp_inst[i].loop_end > 2 ? XMP_SAMPLE_LOOP : 0; D_(D_INFO " %04x %04x %04x %c V%02x %+03d", xxs->len, mod->xxs[smp_idx].lps, xxs->lpe, @@ -732,6 +732,20 @@ if (load_sample(m, f, 0, xxs, NULL) < 0) return -1; + /* Limit range to 3 octave (see MED.El toro) */ + for (j = 0; j < 9; j++) { + for (k = 0; k < 12; k++) { + int xpo = 0; + + if (j < 4) + xpo = 12 * (4 - j); + else if (j > 6) + xpo = -12 * (j - 6); + + xxi->map[12 * j + k].xpo = xpo; + } + } + smp_idx++; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/loaders/mmd1_load.c new/libxmp-4.2.8/src/loaders/mmd1_load.c --- old/libxmp-4.2.7/src/loaders/mmd1_load.c 2014-04-09 20:30:58.000000000 +0200 +++ new/libxmp-4.2.8/src/loaders/mmd1_load.c 2014-07-12 13:28:15.000000000 +0200 @@ -90,7 +90,7 @@ uint32 songname_offset; uint32 iinfo_offset; int pos; - int bpm_on, bpmlen, med_8ch; + int bpm_on, bpmlen, med_8ch, hexvol; LOAD_INIT(); @@ -157,6 +157,7 @@ */ m->c4rate = C4_NTSC_RATE; m->quirk |= song.flags & FLAG_STSLIDE ? 0 : QUIRK_VSALL | QUIRK_PBALL; + hexvol = song.flags & FLAG_VOLHEX; med_8ch = song.flags & FLAG_8CHANNEL; bpm_on = song.flags2 & FLAG2_BPM; bpmlen = 1 + (song.flags2 & FLAG2_BMASK); @@ -336,8 +337,8 @@ event->fxt = e[2]; event->fxp = e[3]; - mmd_xlat_fx(event, bpm_on, - bpmlen, med_8ch); + mmd_xlat_fx(event, bpm_on, bpmlen, + med_8ch, hexvol); } } } else { /* MMD0 */ @@ -367,8 +368,8 @@ event->fxt = e[1] & 0x0f; event->fxp = e[2]; - mmd_xlat_fx(event, bpm_on, - bpmlen, med_8ch); + mmd_xlat_fx(event, bpm_on, bpmlen, + med_8ch, hexvol); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/loaders/mmd3_load.c new/libxmp-4.2.8/src/loaders/mmd3_load.c --- old/libxmp-4.2.7/src/loaders/mmd3_load.c 2014-04-09 20:52:48.000000000 +0200 +++ new/libxmp-4.2.8/src/loaders/mmd3_load.c 2014-07-12 13:28:15.000000000 +0200 @@ -90,7 +90,7 @@ int iinfo_offset; int playseq_offset; int pos; - int bpm_on, bpmlen, med_8ch; + int bpm_on, bpmlen, med_8ch, hexvol; LOAD_INIT(); @@ -181,6 +181,7 @@ */ m->c4rate = C4_NTSC_RATE; m->quirk |= song.flags & FLAG_STSLIDE ? 0 : QUIRK_VSALL | QUIRK_PBALL; + hexvol = song.flags & FLAG_VOLHEX; med_8ch = song.flags & FLAG_8CHANNEL; bpm_on = song.flags2 & FLAG2_BPM; bpmlen = 1 + (song.flags2 & FLAG2_BMASK); @@ -345,7 +346,8 @@ event->fxt = e[2]; event->fxp = e[3]; - mmd_xlat_fx(event, bpm_on, bpmlen, med_8ch); + mmd_xlat_fx(event, bpm_on, bpmlen, + med_8ch, hexvol); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/loaders/mmd_common.c new/libxmp-4.2.8/src/loaders/mmd_common.c --- old/libxmp-4.2.7/src/loaders/mmd_common.c 2014-04-12 16:47:21.000000000 +0200 +++ new/libxmp-4.2.8/src/loaders/mmd_common.c 2014-07-12 13:28:15.000000000 +0200 @@ -58,7 +58,8 @@ } } -void mmd_xlat_fx(struct xmp_event *event, int bpm_on, int bpmlen, int med_8ch) +void mmd_xlat_fx(struct xmp_event *event, int bpm_on, int bpmlen, int med_8ch, + int hexvol) { switch (event->fxt) { case 0x00: @@ -150,6 +151,10 @@ /* SET VOLUME 0C * Overrides the default volume of an instrument. */ + if (!hexvol) { + int p = event->fxp; + event->fxp = (p >> 8) * 10 + (p & 0xff); + } break; case 0x0d: /* VOLUME SLIDE 0D diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/loaders/mod_load.c new/libxmp-4.2.8/src/loaders/mod_load.c --- old/libxmp-4.2.7/src/loaders/mod_load.c 2014-04-11 23:41:22.000000000 +0200 +++ new/libxmp-4.2.8/src/loaders/mod_load.c 2014-04-19 22:15:12.000000000 +0200 @@ -220,6 +220,7 @@ char magic[8], idbuffer[32]; int ptkloop = 0; /* Protracker loop */ int tracker_id = TRACKER_PROTRACKER; + int showmagic; LOAD_INIT(); @@ -475,6 +476,8 @@ skip_test: + showmagic = 0; + switch (tracker_id) { case TRACKER_PROTRACKER: tracker = "Protracker"; @@ -507,11 +510,13 @@ break; case TRACKER_SCREAMTRACKER3: tracker = "Scream Tracker"; + showmagic = 1; break; break; case TRACKER_CONVERTEDST: case TRACKER_CONVERTED: - tracker = "converted"; + tracker = "Converted"; + showmagic = 1; break; case TRACKER_CLONE: tracker = "Protracker clone"; @@ -519,13 +524,15 @@ default: case TRACKER_UNKNOWN_CONV: case TRACKER_UNKNOWN: - tracker = "unknown tracker/converted"; + tracker = "Unknown tracker"; + showmagic = 1; break; } mod->trk = mod->chn * mod->pat; - if (!memcmp(magic, "M.K.", 4) || tracker_id == TRACKER_FLEXTRAX) { + if ((!memcmp(magic, "M.K.", 4) && showmagic == 0) + || tracker_id == TRACKER_FLEXTRAX) { snprintf(mod->type, XMP_NAME_SIZE, "%s", tracker); } else { snprintf(mod->type, XMP_NAME_SIZE, "%s %s", tracker, magic); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/loaders/prowizard/ac1d.c new/libxmp-4.2.8/src/loaders/prowizard/ac1d.c --- old/libxmp-4.2.7/src/loaders/prowizard/ac1d.c 2014-03-01 22:38:13.000000000 +0100 +++ new/libxmp-4.2.8/src/loaders/prowizard/ac1d.c 2014-06-07 15:59:50.000000000 +0200 @@ -11,10 +11,10 @@ #include <string.h> #include "prowiz.h" +#define NO_NOTE 0xff static int depack_AC1D(FILE *in, FILE *out) { - uint8 NO_NOTE = 0xff; uint8 c1, c2, c3, c4; uint8 npos; uint8 ntk_byte; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/med_extras.c new/libxmp-4.2.8/src/med_extras.c --- old/libxmp-4.2.7/src/med_extras.c 2014-04-03 19:07:12.000000000 +0200 +++ new/libxmp-4.2.8/src/med_extras.c 2014-07-12 13:28:15.000000000 +0200 @@ -296,6 +296,8 @@ virt_setsmp(ctx, chn, xc->smp); } } + xc->period += ce->wv; + skip_wav: ; /* xc->period += ce->wv; */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/mixer.c new/libxmp-4.2.8/src/mixer.c --- old/libxmp-4.2.7/src/mixer.c 2014-04-06 16:59:06.000000000 +0200 +++ new/libxmp-4.2.8/src/mixer.c 2014-07-12 13:28:15.000000000 +0200 @@ -503,10 +503,11 @@ struct xmp_sample *xxs; int lps; - if (vi->smp < m->mod.smp) + if (vi->smp < m->mod.smp) { xxs = &m->mod.xxs[vi->smp]; - else + } else { xxs = &ctx->smix.xxs[vi->smp - m->mod.smp]; + } if (xxs->flg & XMP_SAMPLE_SYNTH) { return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/player.c new/libxmp-4.2.8/src/player.c --- old/libxmp-4.2.7/src/player.c 2014-04-10 17:14:59.000000000 +0200 +++ new/libxmp-4.2.8/src/player.c 2014-04-18 18:56:47.000000000 +0200 @@ -968,6 +968,7 @@ p->row = 0; p->current_time = 0; p->loop_count = 0; + p->sequence = 0; /* Unmute all channels and set default volume */ for (i = 0; i < XMP_MAX_CHANNELS; i++) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/read_event.c new/libxmp-4.2.8/src/read_event.c --- old/libxmp-4.2.7/src/read_event.c 2014-04-11 01:36:05.000000000 +0200 +++ new/libxmp-4.2.8/src/read_event.c 2014-07-12 14:06:06.000000000 +0200 @@ -340,6 +340,10 @@ */ } + if (e->ins == 0 && !IS_VALID_INSTRUMENT(xc->old_ins - 1)) { + new_invalid_ins = 1; + } + if (new_invalid_ins) { virt_resetchannel(ctx, chn); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libxmp-4.2.7/src/virtual.c new/libxmp-4.2.8/src/virtual.c --- old/libxmp-4.2.7/src/virtual.c 2014-04-06 15:16:22.000000000 +0200 +++ new/libxmp-4.2.8/src/virtual.c 2014-07-12 13:28:15.000000000 +0200 @@ -398,6 +398,13 @@ mixer_setpatch(ctx, voc, smp); + /* FIXME: Workaround for crash on notes that are too high + * see 6nations.it (+114 transposition on instrument 16) + */ + if (note > 149) { + note = 149; + } + mixer_setnote(ctx, voc, note); p->virt.voice_array[voc].ins = ins; p->virt.voice_array[voc].act = nna; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
