AUDIO: Use override

Using clang-tidy modernize-use-override
This commit is contained in:
Orgad Shaneh 2021-11-13 22:26:42 +02:00 committed by Filippos Karapetis
parent faca58b346
commit 2bd0347968
42 changed files with 289 additions and 289 deletions

View file

@ -130,33 +130,33 @@ public:
#endif #endif
} }
MidiDriver *device(); MidiDriver *device() override;
byte getNumber() { return _channel; } byte getNumber() override { return _channel; }
void release() { _allocated = false; } void release() override { _allocated = false; }
void send(uint32 b); void send(uint32 b) override;
// Regular messages // Regular messages
void noteOff(byte note); void noteOff(byte note) override;
void noteOn(byte note, byte velocity); void noteOn(byte note, byte velocity) override;
void programChange(byte program); void programChange(byte program) override;
void pitchBend(int16 bend); void pitchBend(int16 bend) override;
// Control Change messages // Control Change messages
void controlChange(byte control, byte value); void controlChange(byte control, byte value) override;
void modulationWheel(byte value); void modulationWheel(byte value) override;
void volume(byte value); void volume(byte value) override;
void panPosition(byte value); void panPosition(byte value) override;
void pitchBendFactor(byte value); void pitchBendFactor(byte value) override;
void detune(byte value); void detune(byte value) override;
void priority(byte value); void priority(byte value) override;
void sustain(bool value); void sustain(bool value) override;
void effectLevel(byte value) { return; } // Not supported void effectLevel(byte value) override { return; } // Not supported
void chorusLevel(byte value) { return; } // Not supported void chorusLevel(byte value) override { return; } // Not supported
void allNotesOff(); void allNotesOff() override;
// SysEx messages // SysEx messages
void sysEx_customInstrument(uint32 type, const byte *instr); void sysEx_customInstrument(uint32 type, const byte *instr) override;
}; };
// FYI (Jamieson630) // FYI (Jamieson630)
@ -173,19 +173,19 @@ protected:
public: public:
~AdLibPercussionChannel(); ~AdLibPercussionChannel();
void noteOff(byte note); void noteOff(byte note) override;
void noteOn(byte note, byte velocity); void noteOn(byte note, byte velocity) override;
void programChange(byte program) { } void programChange(byte program) override { }
// Control Change messages // Control Change messages
void modulationWheel(byte value) { } void modulationWheel(byte value) override { }
void pitchBendFactor(byte value) { } void pitchBendFactor(byte value) override { }
void detune(byte value) { } void detune(byte value) override { }
void priority(byte value) { } void priority(byte value) override { }
void sustain(bool value) { } void sustain(bool value) override { }
// SysEx messages // SysEx messages
void sysEx_customInstrument(uint32 type, const byte *instr); void sysEx_customInstrument(uint32 type, const byte *instr) override;
private: private:
byte _notes[256]; byte _notes[256];
@ -947,7 +947,7 @@ public:
MidiChannel *allocateChannel() override; MidiChannel *allocateChannel() override;
MidiChannel *getPercussionChannel() override { return &_percussion; } // Percussion partially supported MidiChannel *getPercussionChannel() override { return &_percussion; } // Percussion partially supported
virtual void setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc) override; void setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc) override;
private: private:
bool _scummSmallHeader; // FIXME: This flag controls a special mode for SCUMM V3 games bool _scummSmallHeader; // FIXME: This flag controls a special mode for SCUMM V3 games
@ -2291,16 +2291,16 @@ void MidiDriver_ADLIB::adlibNoteOnEx(int chan, byte note, int mod) {
class AdLibEmuMusicPlugin : public MusicPluginObject { class AdLibEmuMusicPlugin : public MusicPluginObject {
public: public:
const char *getName() const { const char *getName() const override {
return _s("AdLib emulator"); return _s("AdLib emulator");
} }
const char *getId() const { const char *getId() const override {
return "adlib"; return "adlib";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const; Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
}; };
MusicDevices AdLibEmuMusicPlugin::getDevices() const { MusicDevices AdLibEmuMusicPlugin::getDevices() const {

View file

@ -331,29 +331,29 @@ public:
~QueuingAudioStreamImpl(); ~QueuingAudioStreamImpl();
// Implement the AudioStream API // Implement the AudioStream API
virtual int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
virtual bool isStereo() const { return _stereo; } bool isStereo() const override { return _stereo; }
virtual int getRate() const { return _rate; } int getRate() const override { return _rate; }
virtual bool endOfData() const { bool endOfData() const override {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
return _queue.empty() || _queue.front()._stream->endOfData(); return _queue.empty() || _queue.front()._stream->endOfData();
} }
virtual bool endOfStream() const { bool endOfStream() const override {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
return _finished && _queue.empty(); return _finished && _queue.empty();
} }
// Implement the QueuingAudioStream API // Implement the QueuingAudioStream API
virtual void queueAudioStream(AudioStream *stream, DisposeAfterUse::Flag disposeAfterUse); void queueAudioStream(AudioStream *stream, DisposeAfterUse::Flag disposeAfterUse) override;
virtual void finish() { void finish() override {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
_finished = true; _finished = true;
} }
uint32 numQueuedStreams() const { uint32 numQueuedStreams() const override {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
return _queue.size(); return _queue.size();
} }
@ -443,17 +443,17 @@ public:
delete _parentStream; delete _parentStream;
} }
int readBuffer(int16 *buffer, const int numSamples) { int readBuffer(int16 *buffer, const int numSamples) override {
// Cap us off so we don't read past _totalSamples // Cap us off so we don't read past _totalSamples
int samplesRead = _parentStream->readBuffer(buffer, MIN<int>(numSamples, _totalSamples - _samplesRead)); int samplesRead = _parentStream->readBuffer(buffer, MIN<int>(numSamples, _totalSamples - _samplesRead));
_samplesRead += samplesRead; _samplesRead += samplesRead;
return samplesRead; return samplesRead;
} }
bool endOfData() const { return _parentStream->endOfData() || reachedLimit(); } bool endOfData() const override { return _parentStream->endOfData() || reachedLimit(); }
bool endOfStream() const { return _parentStream->endOfStream() || reachedLimit(); } bool endOfStream() const override { return _parentStream->endOfStream() || reachedLimit(); }
bool isStereo() const { return _parentStream->isStereo(); } bool isStereo() const override { return _parentStream->isStereo(); }
int getRate() const { return _parentStream->getRate(); } int getRate() const override { return _parentStream->getRate(); }
private: private:
int getChannels() const { return isStereo() ? 2 : 1; } int getChannels() const { return isStereo() ? 2 : 1; }
@ -474,10 +474,10 @@ AudioStream *makeLimitingAudioStream(AudioStream *parentStream, const Timestamp
*/ */
class NullAudioStream : public AudioStream { class NullAudioStream : public AudioStream {
public: public:
bool isStereo() const { return false; } bool isStereo() const override { return false; }
int getRate() const; int getRate() const override;
int readBuffer(int16 *data, const int numSamples) { return 0; } int readBuffer(int16 *data, const int numSamples) override { return 0; }
bool endOfData() const { return true; } bool endOfData() const override { return true; }
}; };
int NullAudioStream::getRate() const { int NullAudioStream::getRate() const {

View file

@ -44,7 +44,7 @@ public:
DisposeAfterUse::Flag disposeExtraData); DisposeAfterUse::Flag disposeExtraData);
~AACDecoder(); ~AACDecoder();
AudioStream *decodeFrame(Common::SeekableReadStream &stream); AudioStream *decodeFrame(Common::SeekableReadStream &stream) override;
private: private:
NeAACDecHandle _handle; NeAACDecHandle _handle;

View file

@ -45,15 +45,15 @@ public:
void deinit(); void deinit();
// AudioStream API // AudioStream API
int readBuffer(int16 *buffer, const int numSamples) { return _audStream->readBuffer(buffer, numSamples); } int readBuffer(int16 *buffer, const int numSamples) override { return _audStream->readBuffer(buffer, numSamples); }
bool isStereo() const { return _audStream->isStereo(); } bool isStereo() const override { return _audStream->isStereo(); }
int getRate() const { return _audStream->getRate(); } int getRate() const override { return _audStream->getRate(); }
bool endOfData() const { return _audStream->endOfData(); } bool endOfData() const override { return _audStream->endOfData(); }
bool endOfStream() const { return _audStream->endOfStream(); } bool endOfStream() const override { return _audStream->endOfStream(); }
// PacketizedAudioStream API // PacketizedAudioStream API
void queuePacket(Common::SeekableReadStream *data); void queuePacket(Common::SeekableReadStream *data) override;
void finish() { _audStream->finish(); } void finish() override { _audStream->finish(); }
private: private:
Common::ScopedPtr<QueuingAudioStream> _audStream; Common::ScopedPtr<QueuingAudioStream> _audStream;

View file

@ -590,7 +590,7 @@ public:
StatelessPacketizedAudioStream(rate, channels), _type(type), _blockAlign(blockAlign) {} StatelessPacketizedAudioStream(rate, channels), _type(type), _blockAlign(blockAlign) {}
protected: protected:
AudioStream *makeStream(Common::SeekableReadStream *data); AudioStream *makeStream(Common::SeekableReadStream *data) override;
private: private:
ADPCMType _type; ADPCMType _type;

View file

@ -75,14 +75,14 @@ public:
DisposeAfterUse::Flag disposeAfterUse); DisposeAfterUse::Flag disposeAfterUse);
~ASFStream(); ~ASFStream();
int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
bool endOfData() const; bool endOfData() const override;
bool isStereo() const { return _channels == 2; } bool isStereo() const override { return _channels == 2; }
int getRate() const { return _sampleRate; } int getRate() const override { return _sampleRate; }
Timestamp getLength() const { return Audio::Timestamp(_duration / 10000, _sampleRate); } Timestamp getLength() const override { return Audio::Timestamp(_duration / 10000, _sampleRate); }
bool seek(const Timestamp &where); bool seek(const Timestamp &where) override;
bool rewind(); bool rewind() override;
private: private:
// Packet data // Packet data

View file

@ -127,18 +127,18 @@ public:
FLACStream(Common::SeekableReadStream *inStream, bool dispose); FLACStream(Common::SeekableReadStream *inStream, bool dispose);
virtual ~FLACStream(); virtual ~FLACStream();
int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
bool isStereo() const { return _streaminfo.channels >= 2; } bool isStereo() const override { return _streaminfo.channels >= 2; }
int getRate() const { return _streaminfo.sample_rate; } int getRate() const override { return _streaminfo.sample_rate; }
bool endOfData() const { bool endOfData() const override {
// End of data is reached if there either is no valid stream data available, // End of data is reached if there either is no valid stream data available,
// or if we reached the last sample and completely emptied the sample cache. // or if we reached the last sample and completely emptied the sample cache.
return _streaminfo.channels == 0 || (_lastSampleWritten && _sampleCache.bufFill == 0); return _streaminfo.channels == 0 || (_lastSampleWritten && _sampleCache.bufFill == 0);
} }
bool seek(const Timestamp &where); bool seek(const Timestamp &where) override;
Timestamp getLength() const { return _length; } Timestamp getLength() const override { return _length; }
bool isStreamDecoderReady() const { return getStreamDecoderState() == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; } bool isStreamDecoderReady() const { return getStreamDecoderState() == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; }
protected: protected:

View file

@ -56,7 +56,7 @@ public:
_channels(channels) { _channels(channels) {
} }
virtual int readBuffer(int16 *buffer, const int numSamples) override { int readBuffer(int16 *buffer, const int numSamples) override {
int samples; int samples;
for (samples = 0; samples < numSamples; samples++) { for (samples = 0; samples < numSamples; samples++) {
@ -69,20 +69,20 @@ public:
return samples; return samples;
} }
virtual bool isStereo() const override { return (_channels == 2); } bool isStereo() const override { return (_channels == 2); }
virtual int getRate() const override { return _rate; } int getRate() const override { return _rate; }
virtual bool endOfData() const override { return _stream->eos(); } bool endOfData() const override { return _stream->eos(); }
virtual bool seek(const Timestamp &where) override { bool seek(const Timestamp &where) override {
const uint32 seekSample = convertTimeToStreamPos(where, getRate(), isStereo()).totalNumberOfFrames(); const uint32 seekSample = convertTimeToStreamPos(where, getRate(), isStereo()).totalNumberOfFrames();
return _stream->seek(seekSample, SEEK_SET); return _stream->seek(seekSample, SEEK_SET);
} }
virtual Timestamp getLength() const override { Timestamp getLength() const override {
return Timestamp(0, _stream->size() / _channels, _rate); return Timestamp(0, _stream->size() / _channels, _rate);
} }
}; };
class G711ALawStream : public G711AudioStream { class G711ALawStream : public G711AudioStream {
virtual int16 decodeSample(uint8 val) override { int16 decodeSample(uint8 val) override {
val ^= 0x55; val ^= 0x55;
int t = val & QUANT_MASK; int t = val & QUANT_MASK;
@ -106,7 +106,7 @@ SeekableAudioStream *makeALawStream(Common::SeekableReadStream *stream, DisposeA
} }
class G711MuLawStream : public G711AudioStream { class G711MuLawStream : public G711AudioStream {
virtual int16 decodeSample(uint8 val) override { int16 decodeSample(uint8 val) override {
val = ~val; val = ~val;
int t = ((val & QUANT_MASK) << 3) + BIAS; int t = ((val & QUANT_MASK) << 3) + BIAS;

View file

@ -53,9 +53,9 @@ public:
BaseMP3Stream(); BaseMP3Stream();
virtual ~BaseMP3Stream(); virtual ~BaseMP3Stream();
bool endOfData() const { return _state == MP3_STATE_EOS; } bool endOfData() const override { return _state == MP3_STATE_EOS; }
bool isStereo() const { return _channels == 2; } bool isStereo() const override { return _channels == 2; }
int getRate() const { return _rate; } int getRate() const override { return _rate; }
protected: protected:
void decodeMP3Data(Common::ReadStream &stream); void decodeMP3Data(Common::ReadStream &stream);
@ -98,9 +98,9 @@ public:
MP3Stream(Common::SeekableReadStream *inStream, MP3Stream(Common::SeekableReadStream *inStream,
DisposeAfterUse::Flag dispose); DisposeAfterUse::Flag dispose);
int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
bool seek(const Timestamp &where); bool seek(const Timestamp &where) override;
Timestamp getLength() const { return _length; } Timestamp getLength() const override { return _length; }
protected: protected:
Common::ScopedPtr<Common::SeekableReadStream> _inStream; Common::ScopedPtr<Common::SeekableReadStream> _inStream;
@ -118,13 +118,13 @@ public:
~PacketizedMP3Stream(); ~PacketizedMP3Stream();
// AudioStream API // AudioStream API
int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
bool endOfData() const; bool endOfData() const override;
bool endOfStream() const; bool endOfStream() const override;
// PacketizedAudioStream API // PacketizedAudioStream API
void queuePacket(Common::SeekableReadStream *packet); void queuePacket(Common::SeekableReadStream *packet) override;
void finish(); void finish() override;
private: private:
Common::Mutex _mutex; Common::Mutex _mutex;

View file

@ -48,14 +48,14 @@ class SilentAudioStream : public AudioStream {
public: public:
SilentAudioStream(int rate, bool stereo) : _rate(rate), _isStereo(stereo) {} SilentAudioStream(int rate, bool stereo) : _rate(rate), _isStereo(stereo) {}
int readBuffer(int16 *buffer, const int numSamples) { int readBuffer(int16 *buffer, const int numSamples) override {
memset(buffer, 0, numSamples * 2); memset(buffer, 0, numSamples * 2);
return numSamples; return numSamples;
} }
bool endOfData() const { return false; } // it never ends! bool endOfData() const override { return false; } // it never ends!
bool isStereo() const { return _isStereo; } bool isStereo() const override { return _isStereo; }
int getRate() const { return _rate; } int getRate() const override { return _rate; }
private: private:
int _rate; int _rate;
@ -76,7 +76,7 @@ public:
delete _parentStream; delete _parentStream;
} }
int readBuffer(int16 *buffer, const int numSamples) { int readBuffer(int16 *buffer, const int numSamples) override {
if (!_parentStream->isStereo()) if (!_parentStream->isStereo())
return _parentStream->readBuffer(buffer, numSamples); return _parentStream->readBuffer(buffer, numSamples);
@ -92,9 +92,9 @@ public:
return samples; return samples;
} }
bool endOfData() const { return _parentStream->endOfData(); } bool endOfData() const override { return _parentStream->endOfData(); }
bool isStereo() const { return false; } bool isStereo() const override { return false; }
int getRate() const { return _parentStream->getRate(); } int getRate() const override { return _parentStream->getRate(); }
private: private:
AudioStream *_parentStream; AudioStream *_parentStream;
@ -690,7 +690,7 @@ public:
} }
// AudioStream API // AudioStream API
int readBuffer(int16 *buffer, const int numSamples) { int readBuffer(int16 *buffer, const int numSamples) override {
int samples = 0; int samples = 0;
while (samples < numSamples && !endOfData()) { while (samples < numSamples && !endOfData()) {
@ -702,13 +702,13 @@ public:
return samples; return samples;
} }
bool isStereo() const { return _audioTracks[0]->isStereo(); } bool isStereo() const override { return _audioTracks[0]->isStereo(); }
int getRate() const { return _audioTracks[0]->getRate(); } int getRate() const override { return _audioTracks[0]->getRate(); }
bool endOfData() const { return _audioTracks[0]->endOfData(); } bool endOfData() const override { return _audioTracks[0]->endOfData(); }
// SeekableAudioStream API // SeekableAudioStream API
bool seek(const Timestamp &where) { return _audioTracks[0]->seek(where); } bool seek(const Timestamp &where) override { return _audioTracks[0]->seek(where); }
Timestamp getLength() const { return _audioTracks[0]->getLength(); } Timestamp getLength() const override { return _audioTracks[0]->getLength(); }
}; };
SeekableAudioStream *makeQuickTimeStream(const Common::String &filename) { SeekableAudioStream *makeQuickTimeStream(const Common::String &filename) {

View file

@ -54,15 +54,15 @@ public:
delete[] _buffer; delete[] _buffer;
} }
int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
bool isStereo() const { return _isStereo; } bool isStereo() const override { return _isStereo; }
bool endOfData() const { return _endOfData; } bool endOfData() const override { return _endOfData; }
int getRate() const { return _rate; } int getRate() const override { return _rate; }
Timestamp getLength() const { return _playtime; } Timestamp getLength() const override { return _playtime; }
bool seek(const Timestamp &where); bool seek(const Timestamp &where) override;
private: private:
const int _rate; ///< Sample rate of stream const int _rate; ///< Sample rate of stream
const bool _isStereo; ///< Whether this is an stereo stream const bool _isStereo; ///< Whether this is an stereo stream
@ -229,7 +229,7 @@ public:
StatelessPacketizedAudioStream(rate, ((flags & FLAG_STEREO) != 0) ? 2 : 1), _flags(flags) {} StatelessPacketizedAudioStream(rate, ((flags & FLAG_STEREO) != 0) ? 2 : 1), _flags(flags) {}
protected: protected:
AudioStream *makeStream(Common::SeekableReadStream *data); AudioStream *makeStream(Common::SeekableReadStream *data) override;
private: private:
byte _flags; byte _flags;

View file

@ -79,17 +79,17 @@ public:
VocStream(Common::SeekableReadStream *stream, bool isUnsigned, DisposeAfterUse::Flag disposeAfterUse); VocStream(Common::SeekableReadStream *stream, bool isUnsigned, DisposeAfterUse::Flag disposeAfterUse);
~VocStream(); ~VocStream();
virtual int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
virtual bool isStereo() const { return false; } bool isStereo() const override { return false; }
virtual int getRate() const { return _rate; } int getRate() const override { return _rate; }
virtual bool endOfData() const { return (_curBlock == _blocks.end()) && (_blockLeft == 0); } bool endOfData() const override { return (_curBlock == _blocks.end()) && (_blockLeft == 0); }
virtual bool seek(const Timestamp &where); bool seek(const Timestamp &where) override;
virtual Timestamp getLength() const { return _length; } Timestamp getLength() const override { return _length; }
private: private:
void preProcess(); void preProcess();

View file

@ -108,14 +108,14 @@ public:
VorbisStream(Common::SeekableReadStream *inStream, DisposeAfterUse::Flag dispose); VorbisStream(Common::SeekableReadStream *inStream, DisposeAfterUse::Flag dispose);
~VorbisStream(); ~VorbisStream();
int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
bool endOfData() const { return _pos >= _bufferEnd; } bool endOfData() const override { return _pos >= _bufferEnd; }
bool isStereo() const { return _isStereo; } bool isStereo() const override { return _isStereo; }
int getRate() const { return _rate; } int getRate() const override { return _rate; }
bool seek(const Timestamp &where); bool seek(const Timestamp &where) override;
Timestamp getLength() const { return _length; } Timestamp getLength() const override { return _length; }
protected: protected:
bool refill(); bool refill();
}; };

View file

@ -31,12 +31,12 @@ public:
XAStream(Common::SeekableReadStream *stream, int rate, DisposeAfterUse::Flag disposeAfterUse); XAStream(Common::SeekableReadStream *stream, int rate, DisposeAfterUse::Flag disposeAfterUse);
~XAStream(); ~XAStream();
bool isStereo() const { return false; } bool isStereo() const override { return false; }
bool endOfData() const { return _endOfData && _samplesRemaining == 0; } bool endOfData() const override { return _endOfData && _samplesRemaining == 0; }
int getRate() const { return _rate; } int getRate() const override { return _rate; }
int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
bool rewind(); bool rewind() override;
private: private:
Common::SeekableReadStream *_stream; Common::SeekableReadStream *_stream;
DisposeAfterUse::Flag _disposeAfterUse; DisposeAfterUse::Flag _disposeAfterUse;

View file

@ -47,7 +47,7 @@ public:
_shift[1] = 4; _shift[1] = 4;
}; };
virtual int readBuffer(int16 *buffer, const int numSamples) override { int readBuffer(int16 *buffer, const int numSamples) override {
int i = 0; int i = 0;
for (; i < numSamples; i++) { for (; i < numSamples; i++) {
int32 *pshift = ((_channels == 2 && (i % 2)) ? _shift + 1 : _shift); int32 *pshift = ((_channels == 2 && (i % 2)) ? _shift + 1 : _shift);
@ -74,15 +74,15 @@ public:
return i; return i;
} }
virtual bool isStereo() const override { bool isStereo() const override {
return _channels == 2; return _channels == 2;
} }
virtual int getRate() const override { int getRate() const override {
return _rate; return _rate;
} }
virtual bool endOfData() const override { bool endOfData() const override {
return _data->eos(); return _data->eos();
} }

View file

@ -57,7 +57,7 @@ public:
XanDPCMStream(int rate, int channels); XanDPCMStream(int rate, int channels);
protected: protected:
virtual AudioStream *makeStream(Common::SeekableReadStream *data) override; AudioStream *makeStream(Common::SeekableReadStream *data) override;
}; };

View file

@ -83,7 +83,7 @@ protected:
void parseNextEvent(EventInfo &info) override; void parseNextEvent(EventInfo &info) override;
virtual void resetTracking() override { void resetTracking() override {
MidiParser::resetTracking(); MidiParser::resetTracking();
_loopCount = -1; _loopCount = -1;
} }

View file

@ -123,8 +123,8 @@ public:
bool hasNativeMT32() const { return _nativeMT32; } bool hasNativeMT32() const { return _nativeMT32; }
// MidiDriver_BASE implementation // MidiDriver_BASE implementation
virtual void send(uint32 b) override; void send(uint32 b) override;
virtual void metaEvent(byte type, byte *data, uint16 length) override; void metaEvent(byte type, byte *data, uint16 length) override;
protected: protected:
/** /**

View file

@ -162,10 +162,10 @@ public:
bool loadSuccess() const { return _loadSuccess; } bool loadSuccess() const { return _loadSuccess; }
// Implement virtual functions // Implement virtual functions
virtual int readBuffer(int16 *buffer, const int numSamples) override; int readBuffer(int16 *buffer, const int numSamples) override;
virtual bool isStereo() const override { return true; } bool isStereo() const override { return true; }
virtual int getRate() const override { return _sampleRate; } int getRate() const override { return _sampleRate; }
virtual bool endOfData() const override { return _dataLeft <= 0; } bool endOfData() const override { return _dataLeft <= 0; }
ModXmS3mStream(Common::SeekableReadStream *stream, int initialPos, int rate, int interpolation); ModXmS3mStream(Common::SeekableReadStream *stream, int initialPos, int rate, int interpolation);
~ModXmS3mStream(); ~ModXmS3mStream();

View file

@ -300,15 +300,15 @@ float Paula::filterCalculateA0(int rate, int cutoff) {
class AmigaMusicPlugin : public NullMusicPlugin { class AmigaMusicPlugin : public NullMusicPlugin {
public: public:
const char *getName() const { const char *getName() const override {
return _s("Amiga Audio emulator"); return _s("Amiga Audio emulator");
} }
const char *getId() const { const char *getId() const override {
return "amiga"; return "amiga";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
}; };
MusicDevices AmigaMusicPlugin::getDevices() const { MusicDevices AmigaMusicPlugin::getDevices() const {

View file

@ -98,7 +98,7 @@ public:
} }
private: private:
void interrupt(); void interrupt() override;
void doPorta(int track) { void doPorta(int track) {
if (_track[track].portaToNote && _track[track].portaToNoteSpeed) { if (_track[track].portaToNote && _track[track].portaToNoteSpeed) {

View file

@ -117,7 +117,7 @@ protected:
void stopPaulaChannel(uint8 channel); void stopPaulaChannel(uint8 channel);
void setupPaulaChannel(uint8 channel, const int8 *waveData, uint16 offset, uint16 len, uint16 repeatPos, uint16 repeatLen); void setupPaulaChannel(uint8 channel, const int8 *waveData, uint16 offset, uint16 len, uint16 repeatPos, uint16 repeatLen);
virtual void interrupt(); void interrupt() override;
Vars _vars; Vars _vars;
Rjp1Channel _channelsTable[4]; Rjp1Channel _channelsTable[4];

View file

@ -62,7 +62,7 @@ protected:
void disablePaulaChannel(uint8 channel); void disablePaulaChannel(uint8 channel);
void setupPaulaChannel(uint8 channel, const int8 *data, uint16 len, uint16 repeatPos, uint16 repeatLen); void setupPaulaChannel(uint8 channel, const int8 *data, uint16 len, uint16 repeatPos, uint16 repeatLen);
virtual void interrupt(); void interrupt() override;
uint8 _ticks; uint8 _ticks;
uint16 _delay; uint16 _delay;

View file

@ -37,14 +37,14 @@ MusicDevices NullMusicPlugin::getDevices() const {
class AutoMusicPlugin : public NullMusicPlugin { class AutoMusicPlugin : public NullMusicPlugin {
public: public:
const char *getName() const { const char *getName() const override {
return _s("<default>"); return _s("<default>");
} }
const char *getId() const { const char *getId() const override {
return "auto"; return "auto";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
}; };
MusicDevices AutoMusicPlugin::getDevices() const { MusicDevices AutoMusicPlugin::getDevices() const {

View file

@ -79,8 +79,8 @@ protected:
public: public:
SimpleRateConverter(st_rate_t inrate, st_rate_t outrate); SimpleRateConverter(st_rate_t inrate, st_rate_t outrate);
int flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r); int flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) override;
int drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol) { int drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol) override {
return ST_SUCCESS; return ST_SUCCESS;
} }
}; };
@ -185,8 +185,8 @@ protected:
public: public:
LinearRateConverter(st_rate_t inrate, st_rate_t outrate); LinearRateConverter(st_rate_t inrate, st_rate_t outrate);
int flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r); int flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) override;
int drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol) { int drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol) override {
return ST_SUCCESS; return ST_SUCCESS;
} }
}; };
@ -290,7 +290,7 @@ public:
free(_buffer); free(_buffer);
} }
virtual int flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) { int flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) override {
assert(input.isStereo() == stereo); assert(input.isStereo() == stereo);
st_sample_t *ptr; st_sample_t *ptr;
@ -332,7 +332,7 @@ public:
return (obuf - ostart) / 2; return (obuf - ostart) / 2;
} }
virtual int drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol) { int drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol) override {
return ST_SUCCESS; return ST_SUCCESS;
} }
}; };

View file

@ -29,15 +29,15 @@
class AppleIIGSMusicPlugin : public NullMusicPlugin { class AppleIIGSMusicPlugin : public NullMusicPlugin {
public: public:
const char *getName() const { const char *getName() const override {
return _s("Apple II GS emulator (NOT IMPLEMENTED)"); return _s("Apple II GS emulator (NOT IMPLEMENTED)");
} }
const char *getId() const { const char *getId() const override {
return "appleIIgs"; return "appleIIgs";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
}; };
MusicDevices AppleIIGSMusicPlugin::getDevices() const { MusicDevices AppleIIGSMusicPlugin::getDevices() const {

View file

@ -347,15 +347,15 @@ void CMSEmulator::portWriteIntern(int chip, int offset, int data) {
class CMSMusicPlugin : public NullMusicPlugin { class CMSMusicPlugin : public NullMusicPlugin {
public: public:
const char *getName() const { const char *getName() const override {
return _s("Creative Music System emulator"); return _s("Creative Music System emulator");
} }
const char *getId() const { const char *getId() const override {
return "cms"; return "cms";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
}; };
MusicDevices CMSMusicPlugin::getDevices() const { MusicDevices CMSMusicPlugin::getDevices() const {

View file

@ -67,20 +67,20 @@ public:
virtual ~MidiDriver_EAS(); virtual ~MidiDriver_EAS();
// MidiDriver // MidiDriver
virtual int open(); int open() override;
virtual bool isOpen() const; bool isOpen() const override;
virtual void close(); void close() override;
virtual void send(uint32 b) override; void send(uint32 b) override;
virtual void sysEx(const byte *msg, uint16 length); void sysEx(const byte *msg, uint16 length) override;
virtual void setTimerCallback(void *timerParam, void setTimerCallback(void *timerParam,
Common::TimerManager::TimerProc timerProc); Common::TimerManager::TimerProc timerProc) override;
virtual uint32 getBaseTempo(); uint32 getBaseTempo() override;
// AudioStream // AudioStream
virtual int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
virtual bool isStereo() const; bool isStereo() const override;
virtual int getRate() const; int getRate() const override;
virtual bool endOfData() const; bool endOfData() const override;
private: private:
struct EASLibConfig { struct EASLibConfig {

View file

@ -459,16 +459,16 @@ void MidiDriver_FluidSynth::setEngineSoundFont(Common::SeekableReadStream *sound
class FluidSynthMusicPlugin : public MusicPluginObject { class FluidSynthMusicPlugin : public MusicPluginObject {
public: public:
const char *getName() const { const char *getName() const override {
return "FluidSynth"; return "FluidSynth";
} }
const char *getId() const { const char *getId() const override {
return "fluidsynth"; return "fluidsynth";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const; Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
}; };
MusicDevices FluidSynthMusicPlugin::getDevices() const { MusicDevices FluidSynthMusicPlugin::getDevices() const {

View file

@ -33,7 +33,7 @@ public:
static PC98AudioCoreInternal *addNewRef(Audio::Mixer *mixer, PC98AudioCore *owner, PC98AudioPluginDriver *driver, PC98AudioPluginDriver::EmuType type); static PC98AudioCoreInternal *addNewRef(Audio::Mixer *mixer, PC98AudioCore *owner, PC98AudioPluginDriver *driver, PC98AudioPluginDriver::EmuType type);
static void releaseRef(PC98AudioCore *owner); static void releaseRef(PC98AudioCore *owner);
bool init(); bool init() override;
void writePort(uint16 port, uint8 value); void writePort(uint16 port, uint8 value);
uint8 readPort(uint16 port); uint8 readPort(uint16 port);
@ -53,8 +53,8 @@ private:
bool assignPluginDriver(PC98AudioCore *owner, PC98AudioPluginDriver *driver, bool externalMutexHandling = false); bool assignPluginDriver(PC98AudioCore *owner, PC98AudioPluginDriver *driver, bool externalMutexHandling = false);
void removePluginDriver(PC98AudioCore *owner); void removePluginDriver(PC98AudioCore *owner);
void timerCallbackA(); void timerCallbackA() override;
void timerCallbackB(); void timerCallbackB() override;
uint16 _musicVolume; uint16 _musicVolume;
uint16 _sfxVolume; uint16 _sfxVolume;

View file

@ -125,7 +125,7 @@ public:
static TownsAudioInterfaceInternal *addNewRef(Audio::Mixer *mixer, TownsAudioInterface *owner, TownsAudioInterfacePluginDriver *driver, bool externalMutex); static TownsAudioInterfaceInternal *addNewRef(Audio::Mixer *mixer, TownsAudioInterface *owner, TownsAudioInterfacePluginDriver *driver, bool externalMutex);
static void releaseRef(TownsAudioInterface *owner); static void releaseRef(TownsAudioInterface *owner);
bool init(); bool init() override;
int callback(int command, ...); int callback(int command, ...);
int processCommand(int command, va_list &args); int processCommand(int command, va_list &args);
@ -140,10 +140,10 @@ private:
bool assignPluginDriver(TownsAudioInterface *owner, TownsAudioInterfacePluginDriver *driver); bool assignPluginDriver(TownsAudioInterface *owner, TownsAudioInterfacePluginDriver *driver);
void removePluginDriver(TownsAudioInterface *owner); void removePluginDriver(TownsAudioInterface *owner);
void nextTickEx(int32 *buffer, uint32 bufferSize); void nextTickEx(int32 *buffer, uint32 bufferSize) override;
void timerCallbackA(); void timerCallbackA() override;
void timerCallbackB(); void timerCallbackB() override;
typedef int (TownsAudioInterfaceInternal::*TownsAudioIntfCallback)(va_list &); typedef int (TownsAudioInterfaceInternal::*TownsAudioIntfCallback)(va_list &);
const TownsAudioIntfCallback *_intfOpcodes; const TownsAudioIntfCallback *_intfOpcodes;

View file

@ -121,15 +121,15 @@ public:
TownsPC98_MusicChannelSSG(TownsPC98_AudioDriver *driver, uint8 regOffs, uint8 flgs, uint8 num, uint8 key, uint8 prt, uint8 id); TownsPC98_MusicChannelSSG(TownsPC98_AudioDriver *driver, uint8 regOffs, uint8 flgs, uint8 num, uint8 key, uint8 prt, uint8 id);
virtual ~TownsPC98_MusicChannelSSG(); virtual ~TownsPC98_MusicChannelSSG();
virtual void reset(); void reset() override;
virtual void loadData(uint8 *data); void loadData(uint8 *data) override;
void processEvents(); void processEvents() override;
void processFrequency(); void processFrequency() override;
void protect(); void protect();
void restore(); void restore();
void fadeStep(); void fadeStep() override;
protected: protected:
void keyOn(); void keyOn();
@ -166,8 +166,8 @@ public:
TownsPC98_MusicChannelSSG(driver, regOffs, flgs, num, key, prt, id) {} TownsPC98_MusicChannelSSG(driver, regOffs, flgs, num, key, prt, id) {}
virtual ~TownsPC98_SfxChannel() {} virtual ~TownsPC98_SfxChannel() {}
void reset(); void reset() override;
void loadData(uint8 *data); void loadData(uint8 *data) override;
}; };
#ifndef DISABLE_PC98_RHYTHM_CHANNEL #ifndef DISABLE_PC98_RHYTHM_CHANNEL
@ -176,8 +176,8 @@ public:
TownsPC98_MusicChannelPCM(TownsPC98_AudioDriver *driver, uint8 regOffs, uint8 flgs, uint8 num, uint8 key, uint8 prt, uint8 id); TownsPC98_MusicChannelPCM(TownsPC98_AudioDriver *driver, uint8 regOffs, uint8 flgs, uint8 num, uint8 key, uint8 prt, uint8 id);
virtual ~TownsPC98_MusicChannelPCM(); virtual ~TownsPC98_MusicChannelPCM();
void loadData(uint8 *data); void loadData(uint8 *data) override;
void processEvents(); void processEvents() override;
private: private:
bool processControlEvent(uint8 cmd); bool processControlEvent(uint8 cmd);

View file

@ -28,16 +28,16 @@
class TownsEmuMusicPlugin : public MusicPluginObject { class TownsEmuMusicPlugin : public MusicPluginObject {
public: public:
const char *getName() const { const char *getName() const override {
return _s("FM-Towns Audio"); return _s("FM-Towns Audio");
} }
const char *getId() const { const char *getId() const override {
return "towns"; return "towns";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const; Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
}; };
MusicDevices TownsEmuMusicPlugin::getDevices() const { MusicDevices TownsEmuMusicPlugin::getDevices() const {
@ -53,16 +53,16 @@ Common::Error TownsEmuMusicPlugin::createInstance(MidiDriver **mididriver, MidiD
class PC98EmuMusicPlugin : public MusicPluginObject { class PC98EmuMusicPlugin : public MusicPluginObject {
public: public:
const char *getName() const { const char *getName() const override {
return _s("PC-98 Audio"); return _s("PC-98 Audio");
} }
const char *getId() const { const char *getId() const override {
return "pc98"; return "pc98";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const; Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
}; };
MusicDevices PC98EmuMusicPlugin::getDevices() const { MusicDevices PC98EmuMusicPlugin::getDevices() const {
@ -78,16 +78,16 @@ Common::Error PC98EmuMusicPlugin::createInstance(MidiDriver **mididriver, MidiDr
class SegaCDSoundPlugin : public MusicPluginObject { class SegaCDSoundPlugin : public MusicPluginObject {
public: public:
const char *getName() const { const char *getName() const override {
return _s("SegaCD Audio"); return _s("SegaCD Audio");
} }
const char *getId() const { const char *getId() const override {
return "segacd"; return "segacd";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const; Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
}; };
MusicDevices SegaCDSoundPlugin::getDevices() const { MusicDevices SegaCDSoundPlugin::getDevices() const {

View file

@ -60,23 +60,23 @@ namespace MT32Emu {
class ScummVMReportHandler : public MT32Emu::IReportHandler { class ScummVMReportHandler : public MT32Emu::IReportHandler {
public: public:
// Callback for debug messages, in vprintf() format // Callback for debug messages, in vprintf() format
void printDebug(const char *fmt, va_list list) { void printDebug(const char *fmt, va_list list) override {
Common::String out = Common::String::vformat(fmt, list); Common::String out = Common::String::vformat(fmt, list);
debug(4, "%s", out.c_str()); debug(4, "%s", out.c_str());
} }
// Callbacks for reporting various errors and information // Callbacks for reporting various errors and information
void onErrorControlROM() { void onErrorControlROM() override {
GUI::MessageDialog dialog("MT32Emu: Init Error - Missing or invalid Control ROM image", "OK"); GUI::MessageDialog dialog("MT32Emu: Init Error - Missing or invalid Control ROM image", "OK");
dialog.runModal(); dialog.runModal();
error("MT32emu: Init Error - Missing or invalid Control ROM image"); error("MT32emu: Init Error - Missing or invalid Control ROM image");
} }
void onErrorPCMROM() { void onErrorPCMROM() override {
GUI::MessageDialog dialog("MT32Emu: Init Error - Missing PCM ROM image", "OK"); GUI::MessageDialog dialog("MT32Emu: Init Error - Missing PCM ROM image", "OK");
dialog.runModal(); dialog.runModal();
error("MT32emu: Init Error - Missing PCM ROM image"); error("MT32emu: Init Error - Missing PCM ROM image");
} }
void showLCDMessage(const char *message) { void showLCDMessage(const char *message) override {
// Don't show messages that are only spaces, e.g. the first // Don't show messages that are only spaces, e.g. the first
// message in Operation Stealth. // message in Operation Stealth.
for (const char *ptr = message; *ptr; ptr++) { for (const char *ptr = message; *ptr; ptr++) {
@ -88,16 +88,16 @@ public:
} }
// Unused callbacks // Unused callbacks
virtual void onMIDIMessagePlayed() {} void onMIDIMessagePlayed() override {}
virtual bool onMIDIQueueOverflow() { return false; } bool onMIDIQueueOverflow() override { return false; }
virtual void onMIDISystemRealtime(Bit8u /* system_realtime */) {} void onMIDISystemRealtime(Bit8u /* system_realtime */) override {}
virtual void onDeviceReset() {} void onDeviceReset() override {}
virtual void onDeviceReconfig() {} void onDeviceReconfig() override {}
virtual void onNewReverbMode(Bit8u /* mode */) {} void onNewReverbMode(Bit8u /* mode */) override {}
virtual void onNewReverbTime(Bit8u /* time */) {} void onNewReverbTime(Bit8u /* time */) override {}
virtual void onNewReverbLevel(Bit8u /* level */) {} void onNewReverbLevel(Bit8u /* level */) override {}
virtual void onPolyStateChanged(Bit8u /* part_num */) {} void onPolyStateChanged(Bit8u /* part_num */) override {}
virtual void onProgramChanged(Bit8u /* part_num */, const char * /* sound_group_name */, const char * /* patch_name */) {} void onProgramChanged(Bit8u /* part_num */, const char * /* sound_group_name */, const char * /* patch_name */) override {}
virtual ~ScummVMReportHandler() {} virtual ~ScummVMReportHandler() {}
}; };
@ -105,8 +105,8 @@ public:
} // end of namespace MT32Emu } // end of namespace MT32Emu
class MidiChannel_MT32 : public MidiChannel_MPU401 { class MidiChannel_MT32 : public MidiChannel_MPU401 {
void effectLevel(byte value) { } void effectLevel(byte value) override { }
void chorusLevel(byte value) { } void chorusLevel(byte value) override { }
}; };
class MidiDriver_MT32 : public MidiDriver_Emulated { class MidiDriver_MT32 : public MidiDriver_Emulated {
@ -433,17 +433,17 @@ void MidiDriver_ThreadedMT32::onTimer() {
class MT32EmuMusicPlugin : public MusicPluginObject { class MT32EmuMusicPlugin : public MusicPluginObject {
public: public:
const char *getName() const { const char *getName() const override {
return _s("MT-32 emulator"); return _s("MT-32 emulator");
} }
const char *getId() const { const char *getId() const override {
return "mt32"; return "mt32";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
bool checkDevice(MidiDriver::DeviceHandle) const; bool checkDevice(MidiDriver::DeviceHandle) const override;
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const; Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
}; };
MusicDevices MT32EmuMusicPlugin::getDevices() const { MusicDevices MT32EmuMusicPlugin::getDevices() const {

View file

@ -127,7 +127,7 @@ public:
template <class SampleEx> template <class SampleEx>
class NullLowPassFilter : public AbstractLowPassFilter<SampleEx> { class NullLowPassFilter : public AbstractLowPassFilter<SampleEx> {
public: public:
SampleEx process(const SampleEx sample) { SampleEx process(const SampleEx sample) override {
return sample; return sample;
} }
}; };
@ -150,7 +150,7 @@ public:
Synth::muteSampleBuffer(ringBuffer, COARSE_LPF_DELAY_LINE_LENGTH); Synth::muteSampleBuffer(ringBuffer, COARSE_LPF_DELAY_LINE_LENGTH);
} }
SampleEx process(const SampleEx inSample) { SampleEx process(const SampleEx inSample) override {
static const unsigned int DELAY_LINE_MASK = COARSE_LPF_DELAY_LINE_LENGTH - 1; static const unsigned int DELAY_LINE_MASK = COARSE_LPF_DELAY_LINE_LENGTH - 1;
SampleEx sample = lpfTaps[COARSE_LPF_DELAY_LINE_LENGTH] * ringBuffer[ringBufferPosition]; SampleEx sample = lpfTaps[COARSE_LPF_DELAY_LINE_LENGTH] * ringBuffer[ringBufferPosition];
@ -179,12 +179,12 @@ private:
public: public:
AccurateLowPassFilter(const bool oldMT32AnalogLPF, const bool oversample); AccurateLowPassFilter(const bool oldMT32AnalogLPF, const bool oversample);
FloatSample process(const FloatSample sample); FloatSample process(const FloatSample sample) override;
IntSampleEx process(const IntSampleEx sample); IntSampleEx process(const IntSampleEx sample) override;
bool hasNextSample() const; bool hasNextSample() const override;
unsigned int getOutputSampleRate() const; unsigned int getOutputSampleRate() const override;
unsigned int estimateInSampleCount(const unsigned int outSamples) const; unsigned int estimateInSampleCount(const unsigned int outSamples) const override;
void addPositionIncrement(const unsigned int positionIncrement); void addPositionIncrement(const unsigned int positionIncrement) override;
}; };
static inline IntSampleEx normaliseSample(const IntSampleEx sample) { static inline IntSampleEx normaliseSample(const IntSampleEx sample) {
@ -223,19 +223,19 @@ public:
delete &rightChannelLPF; delete &rightChannelLPF;
} }
unsigned int getOutputSampleRate() const { unsigned int getOutputSampleRate() const override {
return leftChannelLPF.getOutputSampleRate(); return leftChannelLPF.getOutputSampleRate();
} }
Bit32u getDACStreamsLength(const Bit32u outputLength) const { Bit32u getDACStreamsLength(const Bit32u outputLength) const override {
return leftChannelLPF.estimateInSampleCount(outputLength); return leftChannelLPF.estimateInSampleCount(outputLength);
} }
void setSynthOutputGain(const float synthGain); void setSynthOutputGain(const float synthGain) override;
void setReverbOutputGain(const float reverbGain, const bool mt32ReverbCompatibilityMode); void setReverbOutputGain(const float reverbGain, const bool mt32ReverbCompatibilityMode) override;
bool process(IntSample *outStream, const IntSample *nonReverbLeft, const IntSample *nonReverbRight, const IntSample *reverbDryLeft, const IntSample *reverbDryRight, const IntSample *reverbWetLeft, const IntSample *reverbWetRight, Bit32u outLength); bool process(IntSample *outStream, const IntSample *nonReverbLeft, const IntSample *nonReverbRight, const IntSample *reverbDryLeft, const IntSample *reverbDryRight, const IntSample *reverbWetLeft, const IntSample *reverbWetRight, Bit32u outLength) override;
bool process(FloatSample *outStream, const FloatSample *nonReverbLeft, const FloatSample *nonReverbRight, const FloatSample *reverbDryLeft, const FloatSample *reverbDryRight, const FloatSample *reverbWetLeft, const FloatSample *reverbWetRight, Bit32u outLength); bool process(FloatSample *outStream, const FloatSample *nonReverbLeft, const FloatSample *nonReverbRight, const FloatSample *reverbDryLeft, const FloatSample *reverbDryRight, const FloatSample *reverbWetLeft, const FloatSample *reverbWetRight, Bit32u outLength) override;
template <class Sample> template <class Sample>
void produceOutput(Sample *outStream, const Sample *nonReverbLeft, const Sample *nonReverbRight, const Sample *reverbDryLeft, const Sample *reverbDryRight, const Sample *reverbWetLeft, const Sample *reverbWetRight, Bit32u outLength) { void produceOutput(Sample *outStream, const Sample *nonReverbLeft, const Sample *nonReverbRight, const Sample *reverbDryLeft, const Sample *reverbDryRight, const Sample *reverbWetLeft, const Sample *reverbWetRight, Bit32u outLength) {

View file

@ -455,11 +455,11 @@ public:
close(); close();
} }
bool isOpen() const { bool isOpen() const override {
return combs != nullptr; return combs != nullptr;
} }
void open() { void open() override {
if (isOpen()) return; if (isOpen()) return;
if (currentSettings.numberOfAllpasses > 0) { if (currentSettings.numberOfAllpasses > 0) {
allpasses = new AllpassFilter<Sample>*[currentSettings.numberOfAllpasses]; allpasses = new AllpassFilter<Sample>*[currentSettings.numberOfAllpasses];
@ -479,7 +479,7 @@ public:
mute(); mute();
} }
void close() { void close() override {
if (allpasses != nullptr) { if (allpasses != nullptr) {
for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) { for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
if (allpasses[i] != nullptr) { if (allpasses[i] != nullptr) {
@ -502,7 +502,7 @@ public:
} }
} }
void mute() { void mute() override {
if (allpasses != nullptr) { if (allpasses != nullptr) {
for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) { for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
allpasses[i]->mute(); allpasses[i]->mute();
@ -515,7 +515,7 @@ public:
} }
} }
void setParameters(Bit8u time, Bit8u level) { void setParameters(Bit8u time, Bit8u level) override {
if (!isOpen()) return; if (!isOpen()) return;
level &= 7; level &= 7;
time &= 7; time &= 7;
@ -542,7 +542,7 @@ public:
} }
} }
bool isActive() const { bool isActive() const override {
if (!isOpen()) return false; if (!isOpen()) return false;
for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) { for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
if (!allpasses[i]->isEmpty()) return true; if (!allpasses[i]->isEmpty()) return true;
@ -553,7 +553,7 @@ public:
return false; return false;
} }
bool isMT32Compatible(const ReverbMode mode) const { bool isMT32Compatible(const ReverbMode mode) const override {
return &currentSettings == &getMT32Settings(mode); return &currentSettings == &getMT32Settings(mode);
} }
@ -622,8 +622,8 @@ public:
} // while ((numSamples--) > 0) } // while ((numSamples--) > 0)
} // produceOutput } // produceOutput
bool process(const IntSample *inLeft, const IntSample *inRight, IntSample *outLeft, IntSample *outRight, Bit32u numSamples); bool process(const IntSample *inLeft, const IntSample *inRight, IntSample *outLeft, IntSample *outRight, Bit32u numSamples) override;
bool process(const FloatSample *inLeft, const FloatSample *inRight, FloatSample *outLeft, FloatSample *outRight, Bit32u numSamples); bool process(const FloatSample *inLeft, const FloatSample *inRight, FloatSample *outLeft, FloatSample *outRight, Bit32u numSamples) override;
}; };
BReverbModel *BReverbModel::createBReverbModel(const ReverbMode mode, const bool mt32CompatibleModel, const RendererType rendererType) { BReverbModel *BReverbModel::createBReverbModel(const ReverbMode mode, const bool mt32CompatibleModel, const RendererType rendererType) {

View file

@ -173,10 +173,10 @@ public:
tmpBuffers(createTmpBuffers()) tmpBuffers(createTmpBuffers())
{} {}
void render(IntSample *stereoStream, Bit32u len); void render(IntSample *stereoStream, Bit32u len) override;
void render(FloatSample *stereoStream, Bit32u len); void render(FloatSample *stereoStream, Bit32u len) override;
void renderStreams(const DACOutputStreams<IntSample> &streams, Bit32u len); void renderStreams(const DACOutputStreams<IntSample> &streams, Bit32u len) override;
void renderStreams(const DACOutputStreams<FloatSample> &streams, Bit32u len); void renderStreams(const DACOutputStreams<FloatSample> &streams, Bit32u len) override;
template <class O> template <class O>
void doRenderAndConvert(O *stereoStream, Bit32u len); void doRenderAndConvert(O *stereoStream, Bit32u len);
@ -1832,13 +1832,13 @@ public:
/** Storage space for SysEx data is allocated dynamically on demand and is disposed lazily. */ /** Storage space for SysEx data is allocated dynamically on demand and is disposed lazily. */
class DynamicSysexDataStorage : public MidiEventQueue::SysexDataStorage { class DynamicSysexDataStorage : public MidiEventQueue::SysexDataStorage {
public: public:
Bit8u *allocate(Bit32u sysexLength) { Bit8u *allocate(Bit32u sysexLength) override {
return new Bit8u[sysexLength]; return new Bit8u[sysexLength];
} }
void reclaimUnused(const Bit8u *, Bit32u) {} void reclaimUnused(const Bit8u *, Bit32u) override {}
void dispose(const Bit8u *sysexData, Bit32u) { void dispose(const Bit8u *sysexData, Bit32u) override {
delete[] sysexData; delete[] sysexData;
} }
}; };
@ -1861,7 +1861,7 @@ public:
delete[] storageBuffer; delete[] storageBuffer;
} }
Bit8u *allocate(Bit32u sysexLength) { Bit8u *allocate(Bit32u sysexLength) override {
Bit32u myStartPosition = startPosition; Bit32u myStartPosition = startPosition;
Bit32u myEndPosition = endPosition; Bit32u myEndPosition = endPosition;
@ -1887,7 +1887,7 @@ public:
return storageBuffer + myEndPosition; return storageBuffer + myEndPosition;
} }
void reclaimUnused(const Bit8u *sysexData, Bit32u sysexLength) { void reclaimUnused(const Bit8u *sysexData, Bit32u sysexLength) override {
if (sysexData == nullptr) return; if (sysexData == nullptr) return;
Bit32u allocatedPosition = startPosition; Bit32u allocatedPosition = startPosition;
if (storageBuffer + allocatedPosition == sysexData) { if (storageBuffer + allocatedPosition == sysexData) {
@ -1898,7 +1898,7 @@ public:
} }
} }
void dispose(const Bit8u *, Bit32u) {} void dispose(const Bit8u *, Bit32u) override {}
private: private:
Bit8u * const storageBuffer; Bit8u * const storageBuffer;

View file

@ -157,7 +157,7 @@ protected:
void * const instanceData; void * const instanceData;
private: private:
void printDebug(const char *fmt, va_list list) { void printDebug(const char *fmt, va_list list) override {
if (delegate.v0->printDebug == nullptr) { if (delegate.v0->printDebug == nullptr) {
ReportHandler::printDebug(fmt, list); ReportHandler::printDebug(fmt, list);
} else { } else {
@ -165,7 +165,7 @@ private:
} }
} }
void onErrorControlROM() { void onErrorControlROM() override {
if (delegate.v0->onErrorControlROM == nullptr) { if (delegate.v0->onErrorControlROM == nullptr) {
ReportHandler::onErrorControlROM(); ReportHandler::onErrorControlROM();
} else { } else {
@ -173,7 +173,7 @@ private:
} }
} }
void onErrorPCMROM() { void onErrorPCMROM() override {
if (delegate.v0->onErrorPCMROM == nullptr) { if (delegate.v0->onErrorPCMROM == nullptr) {
ReportHandler::onErrorPCMROM(); ReportHandler::onErrorPCMROM();
} else { } else {
@ -181,7 +181,7 @@ private:
} }
} }
void showLCDMessage(const char *message) { void showLCDMessage(const char *message) override {
if (delegate.v0->showLCDMessage == nullptr) { if (delegate.v0->showLCDMessage == nullptr) {
ReportHandler::showLCDMessage(message); ReportHandler::showLCDMessage(message);
} else { } else {
@ -189,7 +189,7 @@ private:
} }
} }
void onMIDIMessagePlayed() { void onMIDIMessagePlayed() override {
if (delegate.v0->onMIDIMessagePlayed == nullptr) { if (delegate.v0->onMIDIMessagePlayed == nullptr) {
ReportHandler::onMIDIMessagePlayed(); ReportHandler::onMIDIMessagePlayed();
} else { } else {
@ -197,14 +197,14 @@ private:
} }
} }
bool onMIDIQueueOverflow() { bool onMIDIQueueOverflow() override {
if (delegate.v0->onMIDIQueueOverflow == nullptr) { if (delegate.v0->onMIDIQueueOverflow == nullptr) {
return ReportHandler::onMIDIQueueOverflow(); return ReportHandler::onMIDIQueueOverflow();
} }
return delegate.v0->onMIDIQueueOverflow(instanceData) != MT32EMU_BOOL_FALSE; return delegate.v0->onMIDIQueueOverflow(instanceData) != MT32EMU_BOOL_FALSE;
} }
void onMIDISystemRealtime(Bit8u systemRealtime) { void onMIDISystemRealtime(Bit8u systemRealtime) override {
if (delegate.v0->onMIDISystemRealtime == nullptr) { if (delegate.v0->onMIDISystemRealtime == nullptr) {
ReportHandler::onMIDISystemRealtime(systemRealtime); ReportHandler::onMIDISystemRealtime(systemRealtime);
} else { } else {
@ -212,7 +212,7 @@ private:
} }
} }
void onDeviceReset() { void onDeviceReset() override {
if (delegate.v0->onDeviceReset == nullptr) { if (delegate.v0->onDeviceReset == nullptr) {
ReportHandler::onDeviceReset(); ReportHandler::onDeviceReset();
} else { } else {
@ -220,7 +220,7 @@ private:
} }
} }
void onDeviceReconfig() { void onDeviceReconfig() override {
if (delegate.v0->onDeviceReconfig == nullptr) { if (delegate.v0->onDeviceReconfig == nullptr) {
ReportHandler::onDeviceReconfig(); ReportHandler::onDeviceReconfig();
} else { } else {
@ -228,7 +228,7 @@ private:
} }
} }
void onNewReverbMode(Bit8u mode) { void onNewReverbMode(Bit8u mode) override {
if (delegate.v0->onNewReverbMode == nullptr) { if (delegate.v0->onNewReverbMode == nullptr) {
ReportHandler::onNewReverbMode(mode); ReportHandler::onNewReverbMode(mode);
} else { } else {
@ -236,7 +236,7 @@ private:
} }
} }
void onNewReverbTime(Bit8u time) { void onNewReverbTime(Bit8u time) override {
if (delegate.v0->onNewReverbTime == nullptr) { if (delegate.v0->onNewReverbTime == nullptr) {
ReportHandler::onNewReverbTime(time); ReportHandler::onNewReverbTime(time);
} else { } else {
@ -244,7 +244,7 @@ private:
} }
} }
void onNewReverbLevel(Bit8u level) { void onNewReverbLevel(Bit8u level) override {
if (delegate.v0->onNewReverbLevel == nullptr) { if (delegate.v0->onNewReverbLevel == nullptr) {
ReportHandler::onNewReverbLevel(level); ReportHandler::onNewReverbLevel(level);
} else { } else {
@ -252,7 +252,7 @@ private:
} }
} }
void onPolyStateChanged(Bit8u partNum) { void onPolyStateChanged(Bit8u partNum) override {
if (delegate.v0->onPolyStateChanged == nullptr) { if (delegate.v0->onPolyStateChanged == nullptr) {
ReportHandler::onPolyStateChanged(partNum); ReportHandler::onPolyStateChanged(partNum);
} else { } else {
@ -260,7 +260,7 @@ private:
} }
} }
void onProgramChanged(Bit8u partNum, const char *soundGroupName, const char *patchName) { void onProgramChanged(Bit8u partNum, const char *soundGroupName, const char *patchName) override {
if (delegate.v0->onProgramChanged == nullptr) { if (delegate.v0->onProgramChanged == nullptr) {
ReportHandler::onProgramChanged(partNum, soundGroupName, patchName); ReportHandler::onProgramChanged(partNum, soundGroupName, patchName);
} else { } else {
@ -279,7 +279,7 @@ protected:
void *instanceData; void *instanceData;
private: private:
void handleShortMessage(const Bit32u message) { void handleShortMessage(const Bit32u message) override {
if (delegate.v0->handleShortMessage == nullptr) { if (delegate.v0->handleShortMessage == nullptr) {
DefaultMidiStreamParser::handleShortMessage(message); DefaultMidiStreamParser::handleShortMessage(message);
} else { } else {
@ -287,7 +287,7 @@ private:
} }
} }
void handleSysex(const Bit8u *stream, const Bit32u length) { void handleSysex(const Bit8u *stream, const Bit32u length) override {
if (delegate.v0->handleSysex == nullptr) { if (delegate.v0->handleSysex == nullptr) {
DefaultMidiStreamParser::handleSysex(stream, length); DefaultMidiStreamParser::handleSysex(stream, length);
} else { } else {
@ -295,7 +295,7 @@ private:
} }
} }
void handleSystemRealtimeMessage(const Bit8u realtime) { void handleSystemRealtimeMessage(const Bit8u realtime) override {
if (delegate.v0->handleSystemRealtimeMessage == nullptr) { if (delegate.v0->handleSystemRealtimeMessage == nullptr) {
DefaultMidiStreamParser::handleSystemRealtimeMessage(realtime); DefaultMidiStreamParser::handleSystemRealtimeMessage(realtime);
} else { } else {

View file

@ -32,7 +32,7 @@ public:
SynthWrapper(Synth &useSynth) : synth(useSynth) SynthWrapper(Synth &useSynth) : synth(useSynth)
{} {}
void getOutputSamples(FloatSample *outBuffer, unsigned int size) { void getOutputSamples(FloatSample *outBuffer, unsigned int size) override {
synth.render(outBuffer, size); synth.render(outBuffer, size);
} }
}; };

View file

@ -36,7 +36,7 @@ friend void freeResamplerModel(FloatSampleProvider &model, FloatSampleProvider &
public: public:
CascadeStage(FloatSampleProvider &source, ResamplerStage &resamplerStage); CascadeStage(FloatSampleProvider &source, ResamplerStage &resamplerStage);
void getOutputSamples(FloatSample *outBuffer, unsigned int size); void getOutputSamples(FloatSample *outBuffer, unsigned int size) override;
protected: protected:
ResamplerStage &resamplerStage; ResamplerStage &resamplerStage;

View file

@ -200,15 +200,15 @@ int8 PCSpeaker::generateSilence(uint32 x, uint32 oscLength) {
class PCSpeakerMusicPlugin : public NullMusicPlugin { class PCSpeakerMusicPlugin : public NullMusicPlugin {
public: public:
const char *getName() const { const char *getName() const override {
return _s("PC Speaker emulator"); return _s("PC Speaker emulator");
} }
const char *getId() const { const char *getId() const override {
return "pcspk"; return "pcspk";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
}; };
MusicDevices PCSpeakerMusicPlugin::getDevices() const { MusicDevices PCSpeakerMusicPlugin::getDevices() const {
@ -219,15 +219,15 @@ MusicDevices PCSpeakerMusicPlugin::getDevices() const {
class PCjrMusicPlugin : public NullMusicPlugin { class PCjrMusicPlugin : public NullMusicPlugin {
public: public:
const char *getName() const { const char *getName() const override {
return _s("IBM PCjr emulator"); return _s("IBM PCjr emulator");
} }
const char *getId() const { const char *getId() const override {
return "pcjr"; return "pcjr";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
}; };
MusicDevices PCjrMusicPlugin::getDevices() const { MusicDevices PCjrMusicPlugin::getDevices() const {

View file

@ -1430,15 +1430,15 @@ int SID::updateClock(cycle_count& delta_t, short* buf, int n, int interleave) {
class C64MusicPlugin : public NullMusicPlugin { class C64MusicPlugin : public NullMusicPlugin {
public: public:
const char *getName() const { const char *getName() const override {
return _s("C64 Audio emulator"); return _s("C64 Audio emulator");
} }
const char *getId() const { const char *getId() const override {
return "C64"; return "C64";
} }
MusicDevices getDevices() const; MusicDevices getDevices() const override;
}; };
MusicDevices C64MusicPlugin::getDevices() const { MusicDevices C64MusicPlugin::getDevices() const {