aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJohannes Schickel2009-05-05 22:18:26 +0000
committerJohannes Schickel2009-05-05 22:18:26 +0000
commit625f41c135a2dc9b242443a874370e5273ecb638 (patch)
tree1a5f679307eeb527bbac54ab78d0848daa38df08 /sound
parent5cc44292a2d47faa418651169f5a66cf99419e78 (diff)
downloadscummvm-rg350-625f41c135a2dc9b242443a874370e5273ecb638.tar.gz
scummvm-rg350-625f41c135a2dc9b242443a874370e5273ecb638.tar.bz2
scummvm-rg350-625f41c135a2dc9b242443a874370e5273ecb638.zip
Cleanup:
- Rename OPL_DOSBox to OPL, since it's inside a seperate namespace anyway - Reanme MAME_OPL to OPL, since it's inside a seperate namespace anyway svn-id: r40338
Diffstat (limited to 'sound')
-rw-r--r--sound/fmopl.cpp4
-rw-r--r--sound/softsynth/opl/dosbox.cpp20
-rw-r--r--sound/softsynth/opl/dosbox.h6
-rw-r--r--sound/softsynth/opl/mame.cpp14
-rw-r--r--sound/softsynth/opl/mame.h6
5 files changed, 25 insertions, 25 deletions
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp
index 8d52b688cb..eb84d37366 100644
--- a/sound/fmopl.cpp
+++ b/sound/fmopl.cpp
@@ -42,9 +42,9 @@ OPL *OPL::create(kOplType type) {
if (type != kOpl2)
return 0;
else
- return new MAME::OPL_MAME();
+ return new MAME::OPL();
#else
- return new DOSBox::OPL_DOSBox(type);
+ return new DOSBox::OPL(type);
#endif
}
diff --git a/sound/softsynth/opl/dosbox.cpp b/sound/softsynth/opl/dosbox.cpp
index 60bc417cdd..6e2177a843 100644
--- a/sound/softsynth/opl/dosbox.cpp
+++ b/sound/softsynth/opl/dosbox.cpp
@@ -189,19 +189,19 @@ struct Handler : public DOSBox::Handler {
};
} // end of namespace OPL3
-OPL_DOSBox::OPL_DOSBox(kOplType type) : _type(type), _rate(0), _handler(0) {
+OPL::OPL(kOplType type) : _type(type), _rate(0), _handler(0) {
}
-OPL_DOSBox::~OPL_DOSBox() {
+OPL::~OPL() {
free();
}
-void OPL_DOSBox::free() {
+void OPL::free() {
delete _handler;
_handler = 0;
}
-bool OPL_DOSBox::init(int rate) {
+bool OPL::init(int rate) {
free();
memset(&_reg, 0, sizeof(_reg));
@@ -226,11 +226,11 @@ bool OPL_DOSBox::init(int rate) {
return true;
}
-void OPL_DOSBox::reset() {
+void OPL::reset() {
init(_rate);
}
-void OPL_DOSBox::write(int port, int val) {
+void OPL::write(int port, int val) {
if (port&1) {
switch (_type) {
case kOpl2:
@@ -274,7 +274,7 @@ void OPL_DOSBox::write(int port, int val) {
}
}
-byte OPL_DOSBox::read(int port) {
+byte OPL::read(int port) {
switch (_type) {
case kOpl2:
if (!(port & 1))
@@ -295,7 +295,7 @@ byte OPL_DOSBox::read(int port) {
return 0;
}
-void OPL_DOSBox::writeReg(int r, int v) {
+void OPL::writeReg(int r, int v) {
byte tempReg = 0;
switch (_type) {
case kOpl2:
@@ -316,7 +316,7 @@ void OPL_DOSBox::writeReg(int r, int v) {
};
}
-void OPL_DOSBox::dualWrite(uint8 index, uint8 reg, uint8 val) {
+void OPL::dualWrite(uint8 index, uint8 reg, uint8 val) {
// Make sure you don't use opl3 features
// Don't allow write to disable opl3
if (reg == 5)
@@ -340,7 +340,7 @@ void OPL_DOSBox::dualWrite(uint8 index, uint8 reg, uint8 val) {
_handler->writeReg(fullReg, val);
}
-void OPL_DOSBox::readBuffer(int16 *buffer, int length) {
+void OPL::readBuffer(int16 *buffer, int length) {
// For stereo OPL cards, we divide the sample count by 2,
// to match stereo AudioStream behavior.
if (_type != kOpl2)
diff --git a/sound/softsynth/opl/dosbox.h b/sound/softsynth/opl/dosbox.h
index f09ddf85e4..68a53276f0 100644
--- a/sound/softsynth/opl/dosbox.h
+++ b/sound/softsynth/opl/dosbox.h
@@ -83,7 +83,7 @@ public:
virtual void init(uint rate) = 0;
};
-class OPL_DOSBox : public OPL {
+class OPL : public ::OPL::OPL {
private:
kOplType _type;
uint _rate;
@@ -98,8 +98,8 @@ private:
void free();
void dualWrite(uint8 index, uint8 reg, uint8 val);
public:
- OPL_DOSBox(kOplType type);
- ~OPL_DOSBox();
+ OPL(kOplType type);
+ ~OPL();
bool init(int rate);
void reset();
diff --git a/sound/softsynth/opl/mame.cpp b/sound/softsynth/opl/mame.cpp
index 6427469a59..c44abd16f9 100644
--- a/sound/softsynth/opl/mame.cpp
+++ b/sound/softsynth/opl/mame.cpp
@@ -40,12 +40,12 @@
namespace OPL {
namespace MAME {
-OPL_MAME::~OPL_MAME() {
+OPL::~OPL() {
MAME::OPLDestroy(_opl);
_opl = 0;
}
-bool OPL_MAME::init(int rate) {
+bool OPL::init(int rate) {
if (_opl)
MAME::OPLDestroy(_opl);
@@ -53,23 +53,23 @@ bool OPL_MAME::init(int rate) {
return (_opl != 0);
}
-void OPL_MAME::reset() {
+void OPL::reset() {
MAME::OPLResetChip(_opl);
}
-void OPL_MAME::write(int a, int v) {
+void OPL::write(int a, int v) {
MAME::OPLWrite(_opl, a, v);
}
-byte OPL_MAME::read(int a) {
+byte OPL::read(int a) {
return MAME::OPLRead(_opl, a);
}
-void OPL_MAME::writeReg(int r, int v) {
+void OPL::writeReg(int r, int v) {
MAME::OPLWriteReg(_opl, r, v);
}
-void OPL_MAME::readBuffer(int16 *buffer, int length) {
+void OPL::readBuffer(int16 *buffer, int length) {
MAME::YM3812UpdateOne(_opl, buffer, length);
}
diff --git a/sound/softsynth/opl/mame.h b/sound/softsynth/opl/mame.h
index a9835f3b97..75008f59dd 100644
--- a/sound/softsynth/opl/mame.h
+++ b/sound/softsynth/opl/mame.h
@@ -176,12 +176,12 @@ void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length);
FM_OPL *makeAdlibOPL(int rate);
// OPL API implementation
-class OPL_MAME : public OPL {
+class OPL : public ::OPL::OPL {
private:
FM_OPL *_opl;
public:
- OPL_MAME() : _opl(0) {}
- ~OPL_MAME();
+ OPL() : _opl(0) {}
+ ~OPL();
bool init(int rate);
void reset();