changeset 843:1cd8716972df trunk

[svn] Sync core with upstream. Also, rename plugin from AdPlug to AdLib synthesizer, by request of Giacomo.
author chainsaw
date Sat, 18 Mar 2006 09:28:08 -0800
parents 3b2b0d68960c
children 87b022bf951c
files Plugins/Input/adplug/adplug-xmms.cc Plugins/Input/adplug/core/rix.cpp Plugins/Input/adplug/core/s3m.cpp
diffstat 3 files changed, 18 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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 <palxex@163.com/palxex.ys168.com>
+ * rix.cpp - Softstar RIX OPL Format Player by palxex <palxex.ys168.com>
+ *                                             BSPAL <BSPAL.ys168.com>
  */
 
 #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;
 	}
     }
--- 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, <dn.tlp@gmx.net>, et al.
+ * Copyright (C) 1999 - 2006 Simon Peter, <dn.tlp@gmx.net>, 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);