1
Author: Jan Dittberner <jandd@debian.org>
2
Subject: Remove dependencies on non-free ymf262.c and ymf262.h
3
Bug: http://sourceforge.net/tracker/?func=detail&aid=2905763&group_id=52551&atid=467232
4
Debian-Bug: http://bugs.debian.org/559443
5
Last-Update: 2009-12-05
9
Pstring->Set_values(oplmodes);
10
Pstring->Set_help("Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'.");
12
- const char* oplemus[]={ "default", "compat", "fast", "old", 0};
13
+ const char* oplemus[]={ "default", "compat", "fast", 0};
14
Pstring = secprop->Add_string("oplemu",Property::Changeable::WhenIdle,"default");
15
Pstring->Set_values(oplemus);
16
- Pstring->Set_help("Provider for the OPL emulation. compat or old might provide better quality (see oplrate as well).");
17
+ Pstring->Set_help("Provider for the OPL emulation. compat might provide better quality (see oplrate as well).");
19
Pint = secprop->Add_int("oplrate",Property::Changeable::WhenIdle,22050);
20
Pint->Set_values(oplrates);
21
--- a/src/hardware/Makefile.am
22
+++ b/src/hardware/Makefile.am
27
-EXTRA_DIST = opl.cpp opl.h ymf262.h ymf262.c adlib.h dbopl.h
28
+EXTRA_DIST = opl.cpp opl.h adlib.h dbopl.h
30
noinst_LIBRARIES = libhardware.a
32
--- a/src/hardware/adlib.cpp
33
+++ b/src/hardware/adlib.cpp
39
- #define OPL3_INTERNAL_FREQ 14318180 // The OPL3 operates at ~14.3MHz
40
- #define HAS_YMF262 1
43
- struct Handler : public Adlib::Handler {
44
- virtual void WriteReg( Bit32u reg, Bit8u val ) {
45
- OPL3WriteReg( YMF262[0], reg, val );
47
- virtual Bit32u WriteAddr( Bit32u port, Bit8u val ) {
48
- OPL3Write( YMF262[0], port, val );
49
- return YMF262[0]->address;
51
- virtual void Generate( MixerChannel* chan, Bitu samples ) {
52
- Bit16s buf[2][1024];
53
- while( samples > 0 ) {
54
- Bitu todo = samples > 1024 ? 1024 : samples;
56
- YMF262UpdateOne( 0, buf[0], todo );
57
- chan->AddSamples_s16( todo, buf[0] );
60
- virtual void Init( Bitu rate ) {
61
- if ( YMF262Init( 1, OPL3_INTERNAL_FREQ, rate )) {
62
- E_Exit("Can't create OPL3 Emulator");