AUDIO: Added override keywords

This commit is contained in:
Eugene Sandulenko 2020-03-09 16:08:19 +01:00
parent 464c3ef0bf
commit 4da444f238
10 changed files with 59 additions and 59 deletions

View File

@ -933,21 +933,21 @@ class MidiDriver_ADLIB : public MidiDriver {
public:
MidiDriver_ADLIB();
int open();
void close();
int open() override;
void close() override;
void send(uint32 b) override;
void send(byte channel, uint32 b); // Supports higher than channel 15
uint32 property(int prop, uint32 param);
bool isOpen() const { return _isOpen; }
uint32 getBaseTempo() { return 1000000 / OPL::OPL::kDefaultCallbackFrequency; }
uint32 property(int prop, uint32 param) override;
bool isOpen() const override { return _isOpen; }
uint32 getBaseTempo() override { return 1000000 / OPL::OPL::kDefaultCallbackFrequency; }
void setPitchBendRange(byte channel, uint range);
void sysEx_customInstrument(byte channel, uint32 type, const byte *instr);
void setPitchBendRange(byte channel, uint range) override;
void sysEx_customInstrument(byte channel, uint32 type, const byte *instr) override;
MidiChannel *allocateChannel();
MidiChannel *getPercussionChannel() { return &_percussion; } // Percussion partially supported
MidiChannel *allocateChannel() override;
MidiChannel *getPercussionChannel() override { return &_percussion; } // Percussion partially supported
virtual void setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc);
virtual void setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc) override;
private:
bool _scummSmallHeader; // FIXME: This flag controls a special mode for SCUMM V3 games

View File

@ -116,7 +116,7 @@ public:
// MidiDriver_BASE implementation
virtual void send(uint32 b) override;
virtual void metaEvent(byte type, byte *data, uint16 length);
virtual void metaEvent(byte type, byte *data, uint16 length) override;
protected:
/**

View File

@ -121,19 +121,19 @@ public:
virtual ~MidiDriver_Miles_AdLib();
// MidiDriver
int open();
void close();
int open() override;
void close() override;
void send(uint32 b) override;
MidiChannel *allocateChannel() { return NULL; }
MidiChannel *getPercussionChannel() { return NULL; }
MidiChannel *allocateChannel() override { return NULL; }
MidiChannel *getPercussionChannel() override { return NULL; }
bool isOpen() const { return _isOpen; }
uint32 getBaseTempo() { return 1000000 / OPL::OPL::kDefaultCallbackFrequency; }
bool isOpen() const override { return _isOpen; }
uint32 getBaseTempo() override { return 1000000 / OPL::OPL::kDefaultCallbackFrequency; }
void setVolume(byte volume);
virtual uint32 property(int prop, uint32 param);
virtual uint32 property(int prop, uint32 param) override;
void setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc);
void setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc) override;
private:
bool _modeOPL3;

View File

@ -75,29 +75,29 @@ public:
virtual ~MidiDriver_Miles_MT32();
// MidiDriver
int open();
void close();
bool isOpen() const { return _isOpen; }
int open() override;
void close() override;
bool isOpen() const override { return _isOpen; }
void send(uint32 b) override;
MidiChannel *allocateChannel() {
MidiChannel *allocateChannel() override {
if (_driver)
return _driver->allocateChannel();
return NULL;
}
MidiChannel *getPercussionChannel() {
MidiChannel *getPercussionChannel() override {
if (_driver)
return _driver->getPercussionChannel();
return NULL;
}
void setTimerCallback(void *timer_param, Common::TimerManager::TimerProc timer_proc) {
void setTimerCallback(void *timer_param, Common::TimerManager::TimerProc timer_proc) override {
if (_driver)
_driver->setTimerCallback(timer_param, timer_proc);
}
uint32 getBaseTempo() {
uint32 getBaseTempo() override {
if (_driver) {
return _driver->getBaseTempo();
}

View File

@ -57,21 +57,21 @@ protected:
void setNum(const char *name, double num);
void setStr(const char *name, const char *str);
void generateSamples(int16 *buf, int len);
void generateSamples(int16 *buf, int len) override;
public:
MidiDriver_FluidSynth(Audio::Mixer *mixer);
int open();
void close();
int open() override;
void close() override;
void send(uint32 b) override;
MidiChannel *allocateChannel();
MidiChannel *getPercussionChannel();
MidiChannel *allocateChannel() override;
MidiChannel *getPercussionChannel() override;
// AudioStream API
bool isStereo() const { return true; }
int getRate() const { return _outputRate; }
bool isStereo() const override { return true; }
int getRate() const override { return _outputRate; }
};
// MidiDriver method implementations

View File

@ -114,25 +114,25 @@ private:
int _outputRate;
protected:
void generateSamples(int16 *buf, int len);
void generateSamples(int16 *buf, int len) override;
public:
MidiDriver_MT32(Audio::Mixer *mixer);
virtual ~MidiDriver_MT32();
int open();
void close();
int open() override;
void close() override;
void send(uint32 b) override;
void setPitchBendRange(byte channel, uint range);
void sysEx(const byte *msg, uint16 length);
void setPitchBendRange(byte channel, uint range) override;
void sysEx(const byte *msg, uint16 length) override;
uint32 property(int prop, uint32 param);
MidiChannel *allocateChannel();
MidiChannel *getPercussionChannel();
uint32 property(int prop, uint32 param) override;
MidiChannel *allocateChannel() override;
MidiChannel *getPercussionChannel() override;
// AudioStream API
bool isStereo() const { return true; }
int getRate() const { return _outputRate; }
bool isStereo() const override { return true; }
int getRate() const override { return _outputRate; }
};
////////////////////////////////////////

View File

@ -96,11 +96,11 @@ class MidiDriver_CORE : public MidiDriver_MPU401 {
public:
MidiDriver_CORE();
~MidiDriver_CORE();
int open();
bool isOpen() const { return _auGraph != 0; }
void close();
int open() override;
bool isOpen() const override { return _auGraph != 0; }
void close() override;
void send(uint32 b) override;
void sysEx(const byte *msg, uint16 length);
void sysEx(const byte *msg, uint16 length) override;
private:
void loadSoundFont(const char *soundfont);

View File

@ -55,11 +55,11 @@ class MidiDriver_CoreMIDI : public MidiDriver_MPU401 {
public:
MidiDriver_CoreMIDI(ItemCount device);
~MidiDriver_CoreMIDI();
int open();
bool isOpen() const { return mOutPort != 0 && mDest != 0; }
void close();
int open() override;
bool isOpen() const override { return mOutPort != 0 && mDest != 0; }
void close() override;
void send(uint32 b) override;
void sysEx(const byte *msg, uint16 length);
void sysEx(const byte *msg, uint16 length) override;
private:
ItemCount mDevice;

View File

@ -54,11 +54,11 @@
class MidiDriver_SEQ : public MidiDriver_MPU401 {
public:
MidiDriver_SEQ();
int open();
bool isOpen() const { return _isOpen; }
void close();
int open() override;
bool isOpen() const override { return _isOpen; }
void close() override;
void send(uint32 b) override;
void sysEx(const byte *msg, uint16 length);
void sysEx(const byte *msg, uint16 length) override;
private:
bool _isOpen;

View File

@ -84,11 +84,11 @@ class MidiDriver_TIMIDITY : public MidiDriver_MPU401 {
public:
MidiDriver_TIMIDITY();
int open();
bool isOpen() const { return _isOpen; }
void close();
int open() override;
bool isOpen() const override { return _isOpen; }
void close() override;
void send(uint32 b) override;
void sysEx(const byte *msg, uint16 length);
void sysEx(const byte *msg, uint16 length) override;
private:
/* creates a tcp connection to TiMidity server, returns filedesc (like open()) */