head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.8 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.6 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.4 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.2 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.2.0.18 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.16 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.14 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.12 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.10 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.8 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.6 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.4 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.2 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.1.0.26 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.24 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.22 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.20 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.18 pkgsrc-2008Q1:1.1.0.16 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.14 pkgsrc-2007Q4-base:1.1 pkgsrc-2007Q3:1.1.0.12 pkgsrc-2007Q3-base:1.1 pkgsrc-2007Q2:1.1.0.10 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.8 pkgsrc-2007Q1-base:1.1 pkgsrc-2006Q4:1.1.0.6 pkgsrc-2006Q4-base:1.1 pkgsrc-2006Q3:1.1.0.4 pkgsrc-2006Q3-base:1.1 pkgsrc-2006Q2:1.1.0.2 pkgsrc-2006Q2-base:1.1; locks; strict; comment @# @; 1.3 date 2011.04.05.05.22.52; author rxg; state dead; branches; next 1.2; 1.2 date 2009.01.09.20.43.53; author shattered; state Exp; branches; next 1.1; 1.1 date 2006.06.30.12.54.38; author tron; state Exp; branches; next ; desc @@ 1.3 log @ Updated xmp to 3.3.0. This version includes buffer-overflow bugs fix. Oked by wiz. 3.3.0 (20101002): - change MED BPM mode tempo setting (reported by Lorence Lombardo) - fix OSS driver fragment setting - add interactive loop toggle (requested by Emanuel Haupt) - add filter to prevent loading NoiseRunner modules as Protracker - add NoiseRunner loader (requested by Johan Samuelsson) - add improved Impulse Tracker fingerprinting (from Schism Tracker) - add Archimedes Tracker StasisMod effects support (Tom Hargreaves) - add tarball decompressor (Tom Hargreaves) - limit uncompression recursion (Tom Hargreaves) - fix Tracker Packer 3 loader (Tom Hargreaves) - fix load issue with BoobieSqueezer XMs (reported by Null Vista) - fix modinfo tempo/bpm setting - fix Zip file detection (Tom Hargreaves) - fix Archimedes Tracker effects (Tom Hargreaves) - update Audacious plugin to API 16 - code cleanup 3.2.0 (20100530): - Digital Symphony fixes by Tom Hargreaves - Archimedes Tracker fixes by Tom Hargreaves - add shared logarithmic volume table for Archimedes formats - fix default Archimedes formats pan (RLLR instead of LRRL) - add Coconizer file loader - portability fixes for BeOS and Haiku - code cleanup and optimizations - Android port using NDK - fix time echoback event for MED - fix module time count not reseting at new module - make zipfile detection stricter (by Solomon Peachy) - fix DSMI loader volume event (by Solomon Peachy) - initialize formats only once - fix build with Audacious plugin API 13 - fix seek in Audacious plugin 3.1.0 (20100107): - implement MED4 instrument transposition - fix build with MSVC++ 2008 - fix bogus information in winamp plugin file info display - fix Audacious plugin dialog stacking order (by Michael Schwendt) - add Titanics Player prowizard loader - add SKYT Packer prowizard loader - add Novotrade Packer prowizard loader - add Hornet Packer prowizard loader - fix empty instruments in Digital Illusions loader - fix silent Liquid Tracker module bug - add Magnetic Fields Packer loader - add The Player 6.1a prowizard loader - add StoneCracker S404 decompressor (from amigadepacker) - add extra Funktracker file tests to prevent false positives - add Polly Tracker module loader - code cleanup and optimizations 3.0.1 (20091221): - better handling of corrupted modules - load Real Tracker RTMM 1.12 modules (tested with odyssey.rtm) - fix tuning of Real Tracker modules - fix Real Tracker patern decoding - fix segfault in modules with 0 orders or 0 channels - fix loading of MED4 module patterns with less than 32 lines - fix memory leak when loading corrupt MED4 files 3.0.0 (20091210): 13 years after the 0.09b release - allow parallel build (R.I.P. 1996 buildsystem) - implement the long postponed open player loop - generate win32 project files when packaging distfile - remove callback driver - split unified flags/quirks into separate variables - add elapsed time echoback event - add option to display elapsed and remaining time - implement IT volume column fine effects quirk (Storlek test #6) - fix bmp plugin build - fix FreeBSD build (by swell k) - fix terminal handling in Cygwin (by daniel ċkerud) - add OpenMPT id to S3M loader - add Epic MegaGames MUSE data decompression - add Galaxy Music System (Jazz Jackrabbit 2 J2B) module loader - fix parsing of driver-specific parameters - fix GDM length, number of patterns and number of samples - fix memory access error in MDL sample depacker - fix ProRunner1 samples size - OSS driver resets the DSP device on exit (by Andrew Church) - fix handling of PT portamento+vslide effect (by Andrew Church) - move driver init from player core to main application or plugin - Epic MegaGames MASI loader fixes - add Amiga TuneNet plugin (by Chris Young) - fix Module Protector loader - fix lha depacking in Amiga (reported by Chris Young) - fix clang build (by swell k) - add support for xz decompressor (by swell k) - add built-in LZX decompressor - remove pause-related functions from player core - fix build in Solaris 10 and Sun Studio 12 Update 1 C++ compiler (reported by Douglas Carmichael) - fix plugin to work with Audacious 2.2 (reported by Götz Waschk) - fix invalid and uninitialized data accesses reported by Valgrind - fix memory leaks reported by Valgrind 2.7.1 (20090718): - fix -l option in manpage (debian bug #442147) - fix endianism in MDL sample depacking (reported by Gürkan Sengün) - fix loading of MOD2XM 1.0 modules (reported by Gürkan Sengün) - add some sanity checks in XM module loading - fix IT note cut and delay (Storlek test #22) - increase period resolution for better tuning (reported by Mirko Buffoni and Gürkan Sengün) - allow lower BPM settings (fixes Lemmings 2 circus music) 2.7.0 (20090711): - add StarTrekker packer loader (untested, need samples) - extended key range to IT octave 9 (fixes beek-my_eleventh_year.it, reported by Mirko Buffoni) - ignore tempo/bpm settings to 0 in module scan (fixes albacore.it, reported by Storlek) - implement IT T0x and T1x tempo slides - process effects in IT muted channels (Storlek test #10) - generalized delayed event support (Storlek test #8) - emulate "always store instrument" IT bug (Storlek test #8) - add extra click removal step in mixer routines - fix loop size in GMC loader (reported by Mirko Buffoni) - GMC loader code cleanup - store in-file comments - apply amplification in the final downmix - set sample format to unsigned on 8-bit wav file output - attempt to handle BPM-based MED tempos a bit better - add option to use the IT LPF as a click/noise filter - deprecate $HOME/.xmprc, use $HOME/.xmp/xmp.conf instead - reintroduce modules.conf, move SYSCONFDIR back to /etc/xmp - display checksum for platforms where cksum(1) not readily available - add filter quirk for rn-alone.it - reintroduce manual setting for vblank timing in Amiga modules - add vblank quirk for mod.siedler ii (by Daniel Ċkerud) - don't crash if SoundSmith instruments not found 2.6.2 (20090630): - Promizer 1.8a loader code cleanup - fix portamento to skip first frame of each row - fix periods in instruments with finetune 2.6.1 (20090627): - fix XMMS plugin build (reported by Götz Waschk) - add Chibi Tracker fingerprint to IT loader (info by Storlek) - add Schism Tracker fingerprint to S3M loader (info by Storlek) - fix Modplug Tracker/OpenMPT identification in IT loader - IT instrument and sample modes use same quirks (Storlek test #9) - transposed period scale base down one semitone (Storlek test #1) - remove previous portamento in SpaceDebris.mod fix - add unified pitch slide/portamento memory (Storlek test #3) - no Amiga limits for multichannel mods (fixes Bending CD61) 2.6.0 (20090625): - cleanup: remove rarely used Unix IPC code that difficults porting - cleanup: remove per-module configuration that nobody uses - cleanup: moved Prowizard depacking to loader section - don't abort loading if IT sample magic not found (fixes loading of use-brdg.it and use-funk.it, reported by Mirko Buffoni) - multichannel mods written with Scream Tracker don't use Amiga note limits (fixes Earth Mountains, reported by Samuli Sorvakko) - fix start option in DeusEx's .umx files (by erlk ozlr) - add OpenBSD sndio driver (by Thomas Pfaff) - fix memory leak: free extra pattern allocated by the XM loader - fix memory leak: free temporary pointer arrays in the IT loader - fix memory leak: free temporary pointer arrays in the S3M loader - fix memory leak: free header and filename when file is invalid - fix memory leak: free temporary buffer in MDL loader - fix memory leak: move UNIC check to test section of mod loader - fix memory leak: free Digital Symphony extra empty track - fix memory leak: free Music Module Compressor buffers - fix memory access violation freeing list nodes using list_for_each - fix memory access violation in MDL track allocation - fix memory access violation in MDL sample decompression - fix memory access violation in LIQ pattern loading - fix memory access violation in P18A format test - fix free of unallocated block in IT sample-only mode - fix buffer overflow in OXM/DTT loaders (reported by Luigi Auriemma) - rename oss_mix driver to oss and alsa_mix to alsa - restrict MMD0/MMD1 non-synth instrument note range to 3 octaves (reported by Daniel Ċkerud and Mirko Buffoni) - assume wav driver if output filename ends in .wav - fix volume slides with 00 parameter (by Mirko Buffoni) - fix crash when S3M C2spd is zero (by Mirko Buffoni) - merged Mirko Buffoni's Windows Visual C++ port - don't process tone portamento in first frame of each row, fixes Space Debris.mod (by Mirko Buffoni) - add amplification factor option (by Mirko Buffoni) - improved Winamp plugin (by Mirko Buffoni) - don't unlink open files (for Windows port, by Mirko Buffoni) - add experimental DxF/DFx handling with volume slides in all frames - add better Archimedes .arc compressed file test - reverted to older YM3812 emulator for license compliance - fix byte swap error in HSC to SBI Adlib OPL2 instrument conversion - fix Reality Adlib tracker loader - implement Adlib OPL2 synth volume setting - improve tempo, tuning and envelope of HSC modules - fix scanning of patterns containing short tracks - don't play notes outside the valid 8 octave note range - enable The Player 5.0A loader (tested with Full Moon mods) - enable ProPacker 2.1 loader (tested with Cool World mods) - fix endianism issues in The Player 5.0 and 6.0 loaders - fix AMF track remapping error - enable instrument retriggering quirk in IT loader - configuration file moved back to /etc - fix estimated tempo for S3M/IT modules with BPM changes @ text @$NetBSD: patch-am,v 1.2 2009/01/09 20:43:53 shattered Exp $ --- src/loaders/mdl_load.c.orig 2007-11-12 22:12:40.000000000 +0000 +++ src/loaders/mdl_load.c @@@@ -181,8 +181,9 @@@@ static unsigned int get_bits(char i, uin unsigned int x; if (i == 0) { - b = *((uint32 *)(*buf)); - *buf += 4; *len -= 4; + (void)memcpy(&b, *buf, sizeof(b)); + *buf += sizeof(b); + *len -= sizeof(b); n = 32; return 0; } @ 1.2 log @Update to 2.5.1, from PR 38499. May also solve PR 38712. 6 years passed since 2.0.4, too much changes happened to list here. Most of them seem to fix various playback accuracy issues. Many patches were merged upstream. Major change -- X11 frontend (xxmp) is missing, there's nothing in change log about that. pkgsrc change: pulseaudio support (default on). OK by wiz@@. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Fix a lot of horrible Spaghetti code which prevented this package from building with GCC 4.1.x. While doing this fix some of the portability problems for big endian system. This package needs a lot of work before it will work with either big-endian or LP64. It should probably be removed because it seesm to be unmaintained since 2001. @ text @d3 3 a5 39 --- src/loaders/mdl_load.c.orig 2000-12-29 18:08:33.000000000 +0000 +++ src/loaders/mdl_load.c 2006-06-30 12:57:09.000000000 +0100 @@@@ -35,6 +35,35 @@@@ static struct mdl_envelope *v_env; static struct mdl_envelope *p_env; +static void * +get_uint16_le(void *p, uint16_t *x16) +{ + uint8_t *bp; + + bp = p; + *x16 = bp[0] | (bp[1] << 8); + return bp + sizeof(uint16); +} + +static void * +get_uint16_le_int(void *p, int *ip) +{ + uint8_t *bp; + + bp = p; + *ip = bp[0] | (bp[1] << 8); + return bp + sizeof(uint16); +} + +static void * +get_uint32_le_int(void *p, int *ip) +{ + uint8_t *bp; + + bp = p; + *ip = bp[0] | (bp[1] << 8) | (bp[2] << 16) | (bp[3] << 24); + return bp + sizeof(uint32); +} /* Effects 1-6 (note effects) can only be entered in the first effect * column, G-L (volume-effects) only in the second column. @@@@ -130,7 +159,8 @@@@ d9 2 a10 1 - b = *((uint32 *)(*buf))++; d13 1 a16 105 @@@@ -268,8 +298,7 @@@@ buffer += 16; /* Skip pattern name */ for (j = 0; j < chn; j++) { - x16 = *((uint16 *)buffer)++; - L_ENDIAN16 (x16); + buffer = get_uint16_le(buffer, &x16); xxp[i]->info[j].index = x16; } if (V (0)) @@@@ -297,8 +326,7 @@@@ xxp[i]->rows = 64; for (j = 0; j < 32; j++) { - x16 = *((uint16 *)buffer)++; - L_ENDIAN16 (x16); + buffer = get_uint16_le(buffer, &x16); if (j < xxh->chn) xxp[i]->info[j].index = x16; } @@@@ -315,7 +343,8 @@@@ int i, j, k, row, len; struct xxm_track *track; - xxh->trk = *((uint16 *) buffer)++ + 1; + buffer = get_uint16_le_int(buffer, &xxh->trk); + xxh->trk++; if (V (0)) report ("Stored tracks : %d ", xxh->trk); @@@@ -330,7 +359,7 @@@@ for (i = 1; i < xxh->trk; i++) { /* Length of the track in bytes */ - len = *((uint16 *) buffer)++; + buffer = get_uint16_le_int(buffer, &len); memset (track, 0, sizeof (struct xxm_track) + sizeof (struct xxm_event) * 256); @@@@ -449,7 +478,7 @@@@ xxih[i].rls = *(uint16 *)buffer; L_ENDIAN32 (xxih[i].rls); } - ((uint16 *)buffer)++; + buffer += sizeof(uint16); xxi[i][j].vra = *buffer++; xxi[i][j].vde = *buffer++; @@@@ -498,15 +527,12 @@@@ buffer += 32; /* Sample name */ buffer += 8; /* Sample filename */ - c2spd[i] = *((uint32 *)buffer)++; + (void)memcpy(&c2spd[i], buffer, sizeof(c2spd[i])); + buffer += sizeof(c2spd[i]); - xxs[i].len = *((uint32 *)buffer)++; - xxs[i].lps = *((uint32 *)buffer)++; - xxs[i].lpe = *((uint32 *)buffer)++; - - L_ENDIAN32 (xxs[i].len); - L_ENDIAN32 (xxs[i].lps); - L_ENDIAN32 (xxs[i].lpe); + buffer = get_uint32_le_int(buffer, &xxs[i].len); + buffer = get_uint32_le_int(buffer, &xxs[i].lps); + buffer = get_uint32_le_int(buffer, &xxs[i].lpe); xxs[i].flg = xxs[i].lpe > 0 ? WAVE_LOOPING : 0; xxs[i].lpe = xxs[i].lps + xxs[i].lpe; @@@@ -579,16 +605,11 @@@@ buffer += 32; /* Sample name */ buffer += 8; /* Sample filename */ - c2spd[i] = *((uint16 *)buffer)++; - L_ENDIAN16 (c2spd[i]); + buffer = get_uint16_le_int(buffer, &c2spd[i]); - xxs[i].len = *((uint32 *)buffer)++; - xxs[i].lps = *((uint32 *)buffer)++; - xxs[i].lpe = *((uint32 *)buffer)++; - - L_ENDIAN32 (xxs[i].len); - L_ENDIAN32 (xxs[i].lps); - L_ENDIAN32 (xxs[i].lpe); + buffer = get_uint32_le_int(buffer, &xxs[i].len); + buffer = get_uint32_le_int(buffer, &xxs[i].lps); + buffer = get_uint32_le_int(buffer, &xxs[i].lpe); xxs[i].flg = xxs[i].lpe > 0 ? WAVE_LOOPING : 0; xxs[i].lpe = xxs[i].lps + xxs[i].lpe; @@@@ -648,12 +669,12 @@@@ buffer += xxs[i].len; break; case 1: - len = *((uint32 *)buffer)++; + buffer = get_uint32_le_int(buffer, &len); unpack_sample8 (smpbuf, buffer, xxs[i].len); buffer += len; break; case 2: - len = *((uint32 *)buffer)++; + buffer = get_uint32_le_int(buffer, &len); unpack_sample16 ((uint16 *)smpbuf, buffer, xxs[i].len >> 1); buffer += len; break; @