# HG changeset patch # User chainsaw # Date 1142702888 28800 # Node ID 1cd8716972dfdd9d4d27f4ccd4d89e4d34b2533f # Parent 3b2b0d68960c15f8305edac7601de41ba9941bf9 [svn] Sync core with upstream. Also, rename plugin from AdPlug to AdLib synthesizer, by request of Giacomo. diff -r 3b2b0d68960c -r 1cd8716972df Plugins/Input/adplug/adplug-xmms.cc --- a/Plugins/Input/adplug/adplug-xmms.cc Sat Mar 18 08:56:03 2006 -0800 +++ b/Plugins/Input/adplug/adplug-xmms.cc Sat Mar 18 09:28:08 2006 -0800 @@ -38,7 +38,7 @@ /***** Defines *****/ // Version string -#define ADPLUG_NAME "AdPlug" +#define ADPLUG_NAME "AdLib synthesizer" // Sound buffer size in samples #define SNDBUFSIZE 512 diff -r 3b2b0d68960c -r 1cd8716972df Plugins/Input/adplug/core/rix.cpp --- a/Plugins/Input/adplug/core/rix.cpp Sat Mar 18 08:56:03 2006 -0800 +++ b/Plugins/Input/adplug/core/rix.cpp Sat Mar 18 09:28:08 2006 -0800 @@ -16,7 +16,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * rix.c - Dayu OPL Format Player by palxex + * rix.cpp - Softstar RIX OPL Format Player by palxex + * BSPAL */ #include "rix.h" @@ -56,8 +57,8 @@ music_on(0),pause_flag(0),band(0),band_low(0),e0_reg_flag(0),bd_modify(0), sustain(0),dro_end(0), mstotal(0), opl3_mode(0) { - memset(dro, 0, 64000); - memset(buf_addr, 0, 655360); + memset(dro, 0, 128000); + memset(buf_addr, 0, 327680); memset(buffer, 0, sizeof(unsigned short) * 300); memset(a0b0_data2, 0, sizeof(unsigned short) * 11); memset(a0b0_data3, 0, 18); @@ -261,7 +262,7 @@ { mutex++; band_sus = rix_proc(); - if(band_sus) sustain += (int)((double)band_sus * 1.06); + if(band_sus) sustain += band_sus; mstotal+=sustain; dro[T++]=(sustain>=0x100?1:0); dro[T++]=sustain&0xff; @@ -276,7 +277,7 @@ } else { - if(band_sus) sustain -= 14; /* aging */ + if(band_sus) sustain -= 1; /* aging */ break; } } diff -r 3b2b0d68960c -r 1cd8716972df Plugins/Input/adplug/core/s3m.cpp --- a/Plugins/Input/adplug/core/s3m.cpp Sat Mar 18 08:56:03 2006 -0800 +++ b/Plugins/Input/adplug/core/s3m.cpp Sat Mar 18 09:28:08 2006 -0800 @@ -1,6 +1,6 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. - * Copyright (C) 1999 - 2003 Simon Peter, , et al. + * Copyright (C) 1999 - 2006 Simon Peter, , et al. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -284,6 +284,16 @@ if(pattern[pattnr][row][chan].info) // set infobyte channel[realchan].info = pattern[pattnr][row][chan].info; + // some commands reset the infobyte memory + switch(channel[realchan].fx) { + case 1: + case 2: + case 3: + case 20: + channel[realchan].info = pattern[pattnr][row][chan].info; + break; + } + // play note if(donote) playnote(realchan);