Skip to content

Commit

Permalink
GOB: Get rid of unused Audio::mixer references
Browse files Browse the repository at this point in the history
Also remove the unused AdLib::_rate member variable.
  • Loading branch information
fingolfin committed Jul 19, 2015
1 parent b52d48e commit 91e925d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion engines/gob/sound/adlib.cpp
Expand Up @@ -115,7 +115,7 @@ const uint16 AdLib::kHihatParams [kParamCount] = {
0, 1, 0, 15, 11, 0, 7, 5, 0, 0, 0, 0, 0, 0 };


AdLib::AdLib(Audio::Mixer &mixer, int callbackFreq) : _mixer(&mixer), _opl(0),
AdLib::AdLib(int callbackFreq) : _opl(0),
_toPoll(0), _repCount(0), _first(true), _playing(false), _ended(true), _volume(0) {

initFreqs();
Expand Down
5 changes: 1 addition & 4 deletions engines/gob/sound/adlib.h
Expand Up @@ -37,7 +37,7 @@ namespace Gob {
/** Base class for a player of an AdLib music format. */
class AdLib {
public:
AdLib(Audio::Mixer &mixer, int callbackFrequency);
AdLib(int callbackFrequency);
virtual ~AdLib();

bool isPlaying() const; ///< Are we currently playing?
Expand Down Expand Up @@ -225,15 +225,12 @@ class AdLib {
static const uint16 kHihatParams [kParamCount];


Audio::Mixer *_mixer;
OPL::OPL *_opl;

Common::Mutex _mutex;

int _volume;

uint32 _rate;

uint32 _toPoll;

int32 _repCount;
Expand Down
2 changes: 1 addition & 1 deletion engines/gob/sound/adlplayer.cpp
Expand Up @@ -28,7 +28,7 @@

namespace Gob {

ADLPlayer::ADLPlayer(Audio::Mixer &mixer) : AdLib(mixer, 1000),
ADLPlayer::ADLPlayer() : AdLib(1000),
_songData(0), _songDataSize(0), _playPos(0) {

}
Expand Down
2 changes: 1 addition & 1 deletion engines/gob/sound/adlplayer.h
Expand Up @@ -36,7 +36,7 @@ namespace Gob {
/** A player for Coktel Vision's ADL music format. */
class ADLPlayer : public AdLib {
public:
ADLPlayer(Audio::Mixer &mixer);
ADLPlayer();
~ADLPlayer();

bool load(Common::SeekableReadStream &adl);
Expand Down
2 changes: 1 addition & 1 deletion engines/gob/sound/musplayer.cpp
Expand Up @@ -27,7 +27,7 @@

namespace Gob {

MUSPlayer::MUSPlayer(Audio::Mixer &mixer) : AdLib(mixer, 60),
MUSPlayer::MUSPlayer() : AdLib(60),
_songData(0), _songDataSize(0), _playPos(0), _songID(0) {

}
Expand Down
2 changes: 1 addition & 1 deletion engines/gob/sound/musplayer.h
Expand Up @@ -40,7 +40,7 @@ namespace Gob {
*/
class MUSPlayer : public AdLib {
public:
MUSPlayer(Audio::Mixer &mixer);
MUSPlayer();
~MUSPlayer();

/** Load the instruments (.SND or .TBR) */
Expand Down
8 changes: 4 additions & 4 deletions engines/gob/sound/sound.cpp
Expand Up @@ -234,7 +234,7 @@ bool Sound::adlibLoadADL(const char *fileName) {
return false;

if (!_adlPlayer)
_adlPlayer = new ADLPlayer(*_vm->_mixer);
_adlPlayer = new ADLPlayer();

debugC(1, kDebugSound, "AdLib: Loading ADL data (\"%s\")", fileName);

Expand All @@ -256,7 +256,7 @@ bool Sound::adlibLoadADL(byte *data, uint32 size, int index) {
return false;

if (!_adlPlayer)
_adlPlayer = new ADLPlayer(*_vm->_mixer);
_adlPlayer = new ADLPlayer();

debugC(1, kDebugSound, "AdLib: Loading ADL data (%d)", index);

Expand Down Expand Up @@ -749,7 +749,7 @@ void Sound::createMDYPlayer() {
delete _adlPlayer;
_adlPlayer = 0;

_mdyPlayer = new MUSPlayer(*_vm->_mixer);
_mdyPlayer = new MUSPlayer();
}

void Sound::createADLPlayer() {
Expand All @@ -759,7 +759,7 @@ void Sound::createADLPlayer() {
delete _mdyPlayer;
_mdyPlayer= 0;

_adlPlayer = new ADLPlayer(*_vm->_mixer);
_adlPlayer = new ADLPlayer();
}

} // End of namespace Gob

0 comments on commit 91e925d

Please sign in to comment.