tag 530824 patch
thanks

The attached patch removes a dependency on fmopl from src/hardware/adlib.cpp

Regards
Jan

-- 
Jan Dittberner - Debian Developer
GPG-key: 4096R/558FB8DD 2009-05-10
         B2FF 1D95 CE8F 7A22 DF4C  F09B A73E 0055 558F B8DD
http://ddportfolio.debian.net/ - http://people.debian.org/~jandd/
--- a/src/hardware/Makefile.am
+++ b/src/hardware/Makefile.am
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
 
 SUBDIRS = serialport
 
-EXTRA_DIST = opl.cpp opl.h fmopl.c fmopl.h ymf262.h ymf262.c adlib.h dbopl.h
+EXTRA_DIST = opl.cpp opl.h ymf262.h ymf262.c adlib.h dbopl.h
 
 noinst_LIBRARIES = libhardware.a
 
--- a/src/hardware/adlib.cpp
+++ b/src/hardware/adlib.cpp
@@ -112,40 +112,6 @@ namespace OPL3 {
 	};
 }
 
-
-namespace old_OPL2 {
-	#define OPL2_INTERNAL_FREQ    3579545   // The OPL2 operates at ~3.6MHz
-	#define HAS_YM3812 1
-	#include "fmopl.c"
-
-	struct Handler : public Adlib::Handler {
-		virtual void WriteReg( Bit32u reg, Bit8u val ) {
-			OPLWriteReg( OPL_YM3812[ 0 ], reg, val );
-		}
-		virtual Bit32u WriteAddr( Bit32u port, Bit8u val ) {
-			OPL_YM3812[ 0 ]->address = val;
-			return val;
-		}
-
-		virtual void Generate( MixerChannel* chan, Bitu samples ) {
-			Bit16s buf[1024];
-			while( samples > 0 ) {
-				Bitu todo = samples > 1024 ? 1024 : samples;
-				samples -= todo;
-				YM3812UpdateOne( 0, buf, todo );
-				chan->AddSamples_m16( todo, buf );
-			}
-		}
-		virtual void Init( Bitu rate ) {
-			if ( YM3812Init( 1, OPL2_INTERNAL_FREQ, rate )) {
-				E_Exit("Can't create OPL2 Emulator");	
-			};
-		}
-		~Handler() {
-			YM3812Shutdown();
-		}
-	};
-}
 #undef OSD_CPU_H
 #undef TL_TAB_LEN
 
@@ -736,13 +702,7 @@ Module::Module( Section* configuration ) : Module_base(configuration) {
 
 	mixerChan = mixerObject.Install(OPL_CallBack,rate,"FM");
 	mixerChan->SetScale( 2.0 );
-	if (oplemu == "old") {
-		if ( oplmode == OPL_opl2 ) {
-			handler = new old_OPL2::Handler();
-		} else {
-			handler = new old_OPL3::Handler();
-		}
-	} else if (oplemu == "fast") {
+	if (oplemu == "fast") {
 		handler = new DBOPL::Handler();
 	} else if (oplemu == "compat") {
 		if ( oplmode == OPL_opl2 ) {

Attachment: signature.asc
Description: Digital signature

Reply via email to