AUDIO: Use override
Using clang-tidy modernize-use-override
This commit is contained in:
parent
faca58b346
commit
2bd0347968
42 changed files with 289 additions and 289 deletions
|
@ -130,33 +130,33 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
MidiDriver *device();
|
||||
byte getNumber() { return _channel; }
|
||||
void release() { _allocated = false; }
|
||||
MidiDriver *device() override;
|
||||
byte getNumber() override { return _channel; }
|
||||
void release() override { _allocated = false; }
|
||||
|
||||
void send(uint32 b);
|
||||
void send(uint32 b) override;
|
||||
|
||||
// Regular messages
|
||||
void noteOff(byte note);
|
||||
void noteOn(byte note, byte velocity);
|
||||
void programChange(byte program);
|
||||
void pitchBend(int16 bend);
|
||||
void noteOff(byte note) override;
|
||||
void noteOn(byte note, byte velocity) override;
|
||||
void programChange(byte program) override;
|
||||
void pitchBend(int16 bend) override;
|
||||
|
||||
// Control Change messages
|
||||
void controlChange(byte control, byte value);
|
||||
void modulationWheel(byte value);
|
||||
void volume(byte value);
|
||||
void panPosition(byte value);
|
||||
void pitchBendFactor(byte value);
|
||||
void detune(byte value);
|
||||
void priority(byte value);
|
||||
void sustain(bool value);
|
||||
void effectLevel(byte value) { return; } // Not supported
|
||||
void chorusLevel(byte value) { return; } // Not supported
|
||||
void allNotesOff();
|
||||
void controlChange(byte control, byte value) override;
|
||||
void modulationWheel(byte value) override;
|
||||
void volume(byte value) override;
|
||||
void panPosition(byte value) override;
|
||||
void pitchBendFactor(byte value) override;
|
||||
void detune(byte value) override;
|
||||
void priority(byte value) override;
|
||||
void sustain(bool value) override;
|
||||
void effectLevel(byte value) override { return; } // Not supported
|
||||
void chorusLevel(byte value) override { return; } // Not supported
|
||||
void allNotesOff() override;
|
||||
|
||||
// SysEx messages
|
||||
void sysEx_customInstrument(uint32 type, const byte *instr);
|
||||
void sysEx_customInstrument(uint32 type, const byte *instr) override;
|
||||
};
|
||||
|
||||
// FYI (Jamieson630)
|
||||
|
@ -173,19 +173,19 @@ protected:
|
|||
public:
|
||||
~AdLibPercussionChannel();
|
||||
|
||||
void noteOff(byte note);
|
||||
void noteOn(byte note, byte velocity);
|
||||
void programChange(byte program) { }
|
||||
void noteOff(byte note) override;
|
||||
void noteOn(byte note, byte velocity) override;
|
||||
void programChange(byte program) override { }
|
||||
|
||||
// Control Change messages
|
||||
void modulationWheel(byte value) { }
|
||||
void pitchBendFactor(byte value) { }
|
||||
void detune(byte value) { }
|
||||
void priority(byte value) { }
|
||||
void sustain(bool value) { }
|
||||
void modulationWheel(byte value) override { }
|
||||
void pitchBendFactor(byte value) override { }
|
||||
void detune(byte value) override { }
|
||||
void priority(byte value) override { }
|
||||
void sustain(bool value) override { }
|
||||
|
||||
// SysEx messages
|
||||
void sysEx_customInstrument(uint32 type, const byte *instr);
|
||||
void sysEx_customInstrument(uint32 type, const byte *instr) override;
|
||||
|
||||
private:
|
||||
byte _notes[256];
|
||||
|
@ -947,7 +947,7 @@ public:
|
|||
MidiChannel *allocateChannel() override;
|
||||
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:
|
||||
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 {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("AdLib emulator");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "adlib";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
|
||||
MusicDevices getDevices() const override;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
|
||||
};
|
||||
|
||||
MusicDevices AdLibEmuMusicPlugin::getDevices() const {
|
||||
|
|
|
@ -331,29 +331,29 @@ public:
|
|||
~QueuingAudioStreamImpl();
|
||||
|
||||
// Implement the AudioStream API
|
||||
virtual int readBuffer(int16 *buffer, const int numSamples);
|
||||
virtual bool isStereo() const { return _stereo; }
|
||||
virtual int getRate() const { return _rate; }
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
bool isStereo() const override { return _stereo; }
|
||||
int getRate() const override { return _rate; }
|
||||
|
||||
virtual bool endOfData() const {
|
||||
bool endOfData() const override {
|
||||
Common::StackLock lock(_mutex);
|
||||
return _queue.empty() || _queue.front()._stream->endOfData();
|
||||
}
|
||||
|
||||
virtual bool endOfStream() const {
|
||||
bool endOfStream() const override {
|
||||
Common::StackLock lock(_mutex);
|
||||
return _finished && _queue.empty();
|
||||
}
|
||||
|
||||
// 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);
|
||||
_finished = true;
|
||||
}
|
||||
|
||||
uint32 numQueuedStreams() const {
|
||||
uint32 numQueuedStreams() const override {
|
||||
Common::StackLock lock(_mutex);
|
||||
return _queue.size();
|
||||
}
|
||||
|
@ -443,17 +443,17 @@ public:
|
|||
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
|
||||
int samplesRead = _parentStream->readBuffer(buffer, MIN<int>(numSamples, _totalSamples - _samplesRead));
|
||||
_samplesRead += samplesRead;
|
||||
return samplesRead;
|
||||
}
|
||||
|
||||
bool endOfData() const { return _parentStream->endOfData() || reachedLimit(); }
|
||||
bool endOfStream() const { return _parentStream->endOfStream() || reachedLimit(); }
|
||||
bool isStereo() const { return _parentStream->isStereo(); }
|
||||
int getRate() const { return _parentStream->getRate(); }
|
||||
bool endOfData() const override { return _parentStream->endOfData() || reachedLimit(); }
|
||||
bool endOfStream() const override { return _parentStream->endOfStream() || reachedLimit(); }
|
||||
bool isStereo() const override { return _parentStream->isStereo(); }
|
||||
int getRate() const override { return _parentStream->getRate(); }
|
||||
|
||||
private:
|
||||
int getChannels() const { return isStereo() ? 2 : 1; }
|
||||
|
@ -474,10 +474,10 @@ AudioStream *makeLimitingAudioStream(AudioStream *parentStream, const Timestamp
|
|||
*/
|
||||
class NullAudioStream : public AudioStream {
|
||||
public:
|
||||
bool isStereo() const { return false; }
|
||||
int getRate() const;
|
||||
int readBuffer(int16 *data, const int numSamples) { return 0; }
|
||||
bool endOfData() const { return true; }
|
||||
bool isStereo() const override { return false; }
|
||||
int getRate() const override;
|
||||
int readBuffer(int16 *data, const int numSamples) override { return 0; }
|
||||
bool endOfData() const override { return true; }
|
||||
};
|
||||
|
||||
int NullAudioStream::getRate() const {
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
DisposeAfterUse::Flag disposeExtraData);
|
||||
~AACDecoder();
|
||||
|
||||
AudioStream *decodeFrame(Common::SeekableReadStream &stream);
|
||||
AudioStream *decodeFrame(Common::SeekableReadStream &stream) override;
|
||||
|
||||
private:
|
||||
NeAACDecHandle _handle;
|
||||
|
|
|
@ -45,15 +45,15 @@ public:
|
|||
void deinit();
|
||||
|
||||
// AudioStream API
|
||||
int readBuffer(int16 *buffer, const int numSamples) { return _audStream->readBuffer(buffer, numSamples); }
|
||||
bool isStereo() const { return _audStream->isStereo(); }
|
||||
int getRate() const { return _audStream->getRate(); }
|
||||
bool endOfData() const { return _audStream->endOfData(); }
|
||||
bool endOfStream() const { return _audStream->endOfStream(); }
|
||||
int readBuffer(int16 *buffer, const int numSamples) override { return _audStream->readBuffer(buffer, numSamples); }
|
||||
bool isStereo() const override { return _audStream->isStereo(); }
|
||||
int getRate() const override { return _audStream->getRate(); }
|
||||
bool endOfData() const override { return _audStream->endOfData(); }
|
||||
bool endOfStream() const override { return _audStream->endOfStream(); }
|
||||
|
||||
// PacketizedAudioStream API
|
||||
void queuePacket(Common::SeekableReadStream *data);
|
||||
void finish() { _audStream->finish(); }
|
||||
void queuePacket(Common::SeekableReadStream *data) override;
|
||||
void finish() override { _audStream->finish(); }
|
||||
|
||||
private:
|
||||
Common::ScopedPtr<QueuingAudioStream> _audStream;
|
||||
|
|
|
@ -590,7 +590,7 @@ public:
|
|||
StatelessPacketizedAudioStream(rate, channels), _type(type), _blockAlign(blockAlign) {}
|
||||
|
||||
protected:
|
||||
AudioStream *makeStream(Common::SeekableReadStream *data);
|
||||
AudioStream *makeStream(Common::SeekableReadStream *data) override;
|
||||
|
||||
private:
|
||||
ADPCMType _type;
|
||||
|
|
|
@ -75,14 +75,14 @@ public:
|
|||
DisposeAfterUse::Flag disposeAfterUse);
|
||||
~ASFStream();
|
||||
|
||||
int readBuffer(int16 *buffer, const int numSamples);
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
|
||||
bool endOfData() const;
|
||||
bool isStereo() const { return _channels == 2; }
|
||||
int getRate() const { return _sampleRate; }
|
||||
Timestamp getLength() const { return Audio::Timestamp(_duration / 10000, _sampleRate); }
|
||||
bool seek(const Timestamp &where);
|
||||
bool rewind();
|
||||
bool endOfData() const override;
|
||||
bool isStereo() const override { return _channels == 2; }
|
||||
int getRate() const override { return _sampleRate; }
|
||||
Timestamp getLength() const override { return Audio::Timestamp(_duration / 10000, _sampleRate); }
|
||||
bool seek(const Timestamp &where) override;
|
||||
bool rewind() override;
|
||||
|
||||
private:
|
||||
// Packet data
|
||||
|
|
|
@ -127,18 +127,18 @@ public:
|
|||
FLACStream(Common::SeekableReadStream *inStream, bool dispose);
|
||||
virtual ~FLACStream();
|
||||
|
||||
int readBuffer(int16 *buffer, const int numSamples);
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
|
||||
bool isStereo() const { return _streaminfo.channels >= 2; }
|
||||
int getRate() const { return _streaminfo.sample_rate; }
|
||||
bool endOfData() const {
|
||||
bool isStereo() const override { return _streaminfo.channels >= 2; }
|
||||
int getRate() const override { return _streaminfo.sample_rate; }
|
||||
bool endOfData() const override {
|
||||
// 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.
|
||||
return _streaminfo.channels == 0 || (_lastSampleWritten && _sampleCache.bufFill == 0);
|
||||
}
|
||||
|
||||
bool seek(const Timestamp &where);
|
||||
Timestamp getLength() const { return _length; }
|
||||
bool seek(const Timestamp &where) override;
|
||||
Timestamp getLength() const override { return _length; }
|
||||
|
||||
bool isStreamDecoderReady() const { return getStreamDecoderState() == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; }
|
||||
protected:
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
_channels(channels) {
|
||||
}
|
||||
|
||||
virtual int readBuffer(int16 *buffer, const int numSamples) override {
|
||||
int readBuffer(int16 *buffer, const int numSamples) override {
|
||||
int samples;
|
||||
|
||||
for (samples = 0; samples < numSamples; samples++) {
|
||||
|
@ -69,20 +69,20 @@ public:
|
|||
return samples;
|
||||
}
|
||||
|
||||
virtual bool isStereo() const override { return (_channels == 2); }
|
||||
virtual int getRate() const override { return _rate; }
|
||||
virtual bool endOfData() const override { return _stream->eos(); }
|
||||
virtual bool seek(const Timestamp &where) override {
|
||||
bool isStereo() const override { return (_channels == 2); }
|
||||
int getRate() const override { return _rate; }
|
||||
bool endOfData() const override { return _stream->eos(); }
|
||||
bool seek(const Timestamp &where) override {
|
||||
const uint32 seekSample = convertTimeToStreamPos(where, getRate(), isStereo()).totalNumberOfFrames();
|
||||
return _stream->seek(seekSample, SEEK_SET);
|
||||
}
|
||||
virtual Timestamp getLength() const override {
|
||||
Timestamp getLength() const override {
|
||||
return Timestamp(0, _stream->size() / _channels, _rate);
|
||||
}
|
||||
};
|
||||
|
||||
class G711ALawStream : public G711AudioStream {
|
||||
virtual int16 decodeSample(uint8 val) override {
|
||||
int16 decodeSample(uint8 val) override {
|
||||
val ^= 0x55;
|
||||
|
||||
int t = val & QUANT_MASK;
|
||||
|
@ -106,7 +106,7 @@ SeekableAudioStream *makeALawStream(Common::SeekableReadStream *stream, DisposeA
|
|||
}
|
||||
|
||||
class G711MuLawStream : public G711AudioStream {
|
||||
virtual int16 decodeSample(uint8 val) override {
|
||||
int16 decodeSample(uint8 val) override {
|
||||
val = ~val;
|
||||
|
||||
int t = ((val & QUANT_MASK) << 3) + BIAS;
|
||||
|
|
|
@ -53,9 +53,9 @@ public:
|
|||
BaseMP3Stream();
|
||||
virtual ~BaseMP3Stream();
|
||||
|
||||
bool endOfData() const { return _state == MP3_STATE_EOS; }
|
||||
bool isStereo() const { return _channels == 2; }
|
||||
int getRate() const { return _rate; }
|
||||
bool endOfData() const override { return _state == MP3_STATE_EOS; }
|
||||
bool isStereo() const override { return _channels == 2; }
|
||||
int getRate() const override { return _rate; }
|
||||
|
||||
protected:
|
||||
void decodeMP3Data(Common::ReadStream &stream);
|
||||
|
@ -98,9 +98,9 @@ public:
|
|||
MP3Stream(Common::SeekableReadStream *inStream,
|
||||
DisposeAfterUse::Flag dispose);
|
||||
|
||||
int readBuffer(int16 *buffer, const int numSamples);
|
||||
bool seek(const Timestamp &where);
|
||||
Timestamp getLength() const { return _length; }
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
bool seek(const Timestamp &where) override;
|
||||
Timestamp getLength() const override { return _length; }
|
||||
|
||||
protected:
|
||||
Common::ScopedPtr<Common::SeekableReadStream> _inStream;
|
||||
|
@ -118,13 +118,13 @@ public:
|
|||
~PacketizedMP3Stream();
|
||||
|
||||
// AudioStream API
|
||||
int readBuffer(int16 *buffer, const int numSamples);
|
||||
bool endOfData() const;
|
||||
bool endOfStream() const;
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
bool endOfData() const override;
|
||||
bool endOfStream() const override;
|
||||
|
||||
// PacketizedAudioStream API
|
||||
void queuePacket(Common::SeekableReadStream *packet);
|
||||
void finish();
|
||||
void queuePacket(Common::SeekableReadStream *packet) override;
|
||||
void finish() override;
|
||||
|
||||
private:
|
||||
Common::Mutex _mutex;
|
||||
|
|
|
@ -48,14 +48,14 @@ class SilentAudioStream : public AudioStream {
|
|||
public:
|
||||
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);
|
||||
return numSamples;
|
||||
}
|
||||
|
||||
bool endOfData() const { return false; } // it never ends!
|
||||
bool isStereo() const { return _isStereo; }
|
||||
int getRate() const { return _rate; }
|
||||
bool endOfData() const override { return false; } // it never ends!
|
||||
bool isStereo() const override { return _isStereo; }
|
||||
int getRate() const override { return _rate; }
|
||||
|
||||
private:
|
||||
int _rate;
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
delete _parentStream;
|
||||
}
|
||||
|
||||
int readBuffer(int16 *buffer, const int numSamples) {
|
||||
int readBuffer(int16 *buffer, const int numSamples) override {
|
||||
if (!_parentStream->isStereo())
|
||||
return _parentStream->readBuffer(buffer, numSamples);
|
||||
|
||||
|
@ -92,9 +92,9 @@ public:
|
|||
return samples;
|
||||
}
|
||||
|
||||
bool endOfData() const { return _parentStream->endOfData(); }
|
||||
bool isStereo() const { return false; }
|
||||
int getRate() const { return _parentStream->getRate(); }
|
||||
bool endOfData() const override { return _parentStream->endOfData(); }
|
||||
bool isStereo() const override { return false; }
|
||||
int getRate() const override { return _parentStream->getRate(); }
|
||||
|
||||
private:
|
||||
AudioStream *_parentStream;
|
||||
|
@ -690,7 +690,7 @@ public:
|
|||
}
|
||||
|
||||
// AudioStream API
|
||||
int readBuffer(int16 *buffer, const int numSamples) {
|
||||
int readBuffer(int16 *buffer, const int numSamples) override {
|
||||
int samples = 0;
|
||||
|
||||
while (samples < numSamples && !endOfData()) {
|
||||
|
@ -702,13 +702,13 @@ public:
|
|||
return samples;
|
||||
}
|
||||
|
||||
bool isStereo() const { return _audioTracks[0]->isStereo(); }
|
||||
int getRate() const { return _audioTracks[0]->getRate(); }
|
||||
bool endOfData() const { return _audioTracks[0]->endOfData(); }
|
||||
bool isStereo() const override { return _audioTracks[0]->isStereo(); }
|
||||
int getRate() const override { return _audioTracks[0]->getRate(); }
|
||||
bool endOfData() const override { return _audioTracks[0]->endOfData(); }
|
||||
|
||||
// SeekableAudioStream API
|
||||
bool seek(const Timestamp &where) { return _audioTracks[0]->seek(where); }
|
||||
Timestamp getLength() const { return _audioTracks[0]->getLength(); }
|
||||
bool seek(const Timestamp &where) override { return _audioTracks[0]->seek(where); }
|
||||
Timestamp getLength() const override { return _audioTracks[0]->getLength(); }
|
||||
};
|
||||
|
||||
SeekableAudioStream *makeQuickTimeStream(const Common::String &filename) {
|
||||
|
|
|
@ -54,15 +54,15 @@ public:
|
|||
delete[] _buffer;
|
||||
}
|
||||
|
||||
int readBuffer(int16 *buffer, const int numSamples);
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
|
||||
bool isStereo() const { return _isStereo; }
|
||||
bool endOfData() const { return _endOfData; }
|
||||
bool isStereo() const override { return _isStereo; }
|
||||
bool endOfData() const override { return _endOfData; }
|
||||
|
||||
int getRate() const { return _rate; }
|
||||
Timestamp getLength() const { return _playtime; }
|
||||
int getRate() const override { return _rate; }
|
||||
Timestamp getLength() const override { return _playtime; }
|
||||
|
||||
bool seek(const Timestamp &where);
|
||||
bool seek(const Timestamp &where) override;
|
||||
private:
|
||||
const int _rate; ///< Sample rate of 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) {}
|
||||
|
||||
protected:
|
||||
AudioStream *makeStream(Common::SeekableReadStream *data);
|
||||
AudioStream *makeStream(Common::SeekableReadStream *data) override;
|
||||
|
||||
private:
|
||||
byte _flags;
|
||||
|
|
|
@ -79,17 +79,17 @@ public:
|
|||
VocStream(Common::SeekableReadStream *stream, bool isUnsigned, DisposeAfterUse::Flag disposeAfterUse);
|
||||
~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:
|
||||
void preProcess();
|
||||
|
||||
|
|
|
@ -108,14 +108,14 @@ public:
|
|||
VorbisStream(Common::SeekableReadStream *inStream, DisposeAfterUse::Flag dispose);
|
||||
~VorbisStream();
|
||||
|
||||
int readBuffer(int16 *buffer, const int numSamples);
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
|
||||
bool endOfData() const { return _pos >= _bufferEnd; }
|
||||
bool isStereo() const { return _isStereo; }
|
||||
int getRate() const { return _rate; }
|
||||
bool endOfData() const override { return _pos >= _bufferEnd; }
|
||||
bool isStereo() const override { return _isStereo; }
|
||||
int getRate() const override { return _rate; }
|
||||
|
||||
bool seek(const Timestamp &where);
|
||||
Timestamp getLength() const { return _length; }
|
||||
bool seek(const Timestamp &where) override;
|
||||
Timestamp getLength() const override { return _length; }
|
||||
protected:
|
||||
bool refill();
|
||||
};
|
||||
|
|
|
@ -31,12 +31,12 @@ public:
|
|||
XAStream(Common::SeekableReadStream *stream, int rate, DisposeAfterUse::Flag disposeAfterUse);
|
||||
~XAStream();
|
||||
|
||||
bool isStereo() const { return false; }
|
||||
bool endOfData() const { return _endOfData && _samplesRemaining == 0; }
|
||||
int getRate() const { return _rate; }
|
||||
int readBuffer(int16 *buffer, const int numSamples);
|
||||
bool isStereo() const override { return false; }
|
||||
bool endOfData() const override { return _endOfData && _samplesRemaining == 0; }
|
||||
int getRate() const override { return _rate; }
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
|
||||
bool rewind();
|
||||
bool rewind() override;
|
||||
private:
|
||||
Common::SeekableReadStream *_stream;
|
||||
DisposeAfterUse::Flag _disposeAfterUse;
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
_shift[1] = 4;
|
||||
};
|
||||
|
||||
virtual int readBuffer(int16 *buffer, const int numSamples) override {
|
||||
int readBuffer(int16 *buffer, const int numSamples) override {
|
||||
int i = 0;
|
||||
for (; i < numSamples; i++) {
|
||||
int32 *pshift = ((_channels == 2 && (i % 2)) ? _shift + 1 : _shift);
|
||||
|
@ -74,15 +74,15 @@ public:
|
|||
return i;
|
||||
}
|
||||
|
||||
virtual bool isStereo() const override {
|
||||
bool isStereo() const override {
|
||||
return _channels == 2;
|
||||
}
|
||||
|
||||
virtual int getRate() const override {
|
||||
int getRate() const override {
|
||||
return _rate;
|
||||
}
|
||||
|
||||
virtual bool endOfData() const override {
|
||||
bool endOfData() const override {
|
||||
return _data->eos();
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
XanDPCMStream(int rate, int channels);
|
||||
|
||||
protected:
|
||||
virtual AudioStream *makeStream(Common::SeekableReadStream *data) override;
|
||||
AudioStream *makeStream(Common::SeekableReadStream *data) override;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ protected:
|
|||
|
||||
void parseNextEvent(EventInfo &info) override;
|
||||
|
||||
virtual void resetTracking() override {
|
||||
void resetTracking() override {
|
||||
MidiParser::resetTracking();
|
||||
_loopCount = -1;
|
||||
}
|
||||
|
|
|
@ -123,8 +123,8 @@ public:
|
|||
bool hasNativeMT32() const { return _nativeMT32; }
|
||||
|
||||
// MidiDriver_BASE implementation
|
||||
virtual void send(uint32 b) override;
|
||||
virtual void metaEvent(byte type, byte *data, uint16 length) override;
|
||||
void send(uint32 b) override;
|
||||
void metaEvent(byte type, byte *data, uint16 length) override;
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
|
@ -162,10 +162,10 @@ public:
|
|||
bool loadSuccess() const { return _loadSuccess; }
|
||||
|
||||
// Implement virtual functions
|
||||
virtual int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
virtual bool isStereo() const override { return true; }
|
||||
virtual int getRate() const override { return _sampleRate; }
|
||||
virtual bool endOfData() const override { return _dataLeft <= 0; }
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
bool isStereo() const override { return true; }
|
||||
int getRate() const override { return _sampleRate; }
|
||||
bool endOfData() const override { return _dataLeft <= 0; }
|
||||
|
||||
ModXmS3mStream(Common::SeekableReadStream *stream, int initialPos, int rate, int interpolation);
|
||||
~ModXmS3mStream();
|
||||
|
|
|
@ -300,15 +300,15 @@ float Paula::filterCalculateA0(int rate, int cutoff) {
|
|||
|
||||
class AmigaMusicPlugin : public NullMusicPlugin {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("Amiga Audio emulator");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "amiga";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
MusicDevices getDevices() const override;
|
||||
};
|
||||
|
||||
MusicDevices AmigaMusicPlugin::getDevices() const {
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
void interrupt();
|
||||
void interrupt() override;
|
||||
|
||||
void doPorta(int track) {
|
||||
if (_track[track].portaToNote && _track[track].portaToNoteSpeed) {
|
||||
|
|
|
@ -117,7 +117,7 @@ protected:
|
|||
void stopPaulaChannel(uint8 channel);
|
||||
void setupPaulaChannel(uint8 channel, const int8 *waveData, uint16 offset, uint16 len, uint16 repeatPos, uint16 repeatLen);
|
||||
|
||||
virtual void interrupt();
|
||||
void interrupt() override;
|
||||
|
||||
Vars _vars;
|
||||
Rjp1Channel _channelsTable[4];
|
||||
|
|
|
@ -62,7 +62,7 @@ protected:
|
|||
void disablePaulaChannel(uint8 channel);
|
||||
void setupPaulaChannel(uint8 channel, const int8 *data, uint16 len, uint16 repeatPos, uint16 repeatLen);
|
||||
|
||||
virtual void interrupt();
|
||||
void interrupt() override;
|
||||
|
||||
uint8 _ticks;
|
||||
uint16 _delay;
|
||||
|
|
|
@ -37,14 +37,14 @@ MusicDevices NullMusicPlugin::getDevices() const {
|
|||
|
||||
class AutoMusicPlugin : public NullMusicPlugin {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("<default>");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "auto";
|
||||
}
|
||||
MusicDevices getDevices() const;
|
||||
MusicDevices getDevices() const override;
|
||||
};
|
||||
|
||||
MusicDevices AutoMusicPlugin::getDevices() const {
|
||||
|
|
|
@ -79,8 +79,8 @@ protected:
|
|||
|
||||
public:
|
||||
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 drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol) {
|
||||
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) override {
|
||||
return ST_SUCCESS;
|
||||
}
|
||||
};
|
||||
|
@ -185,8 +185,8 @@ protected:
|
|||
|
||||
public:
|
||||
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 drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol) {
|
||||
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) override {
|
||||
return ST_SUCCESS;
|
||||
}
|
||||
};
|
||||
|
@ -290,7 +290,7 @@ public:
|
|||
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);
|
||||
|
||||
st_sample_t *ptr;
|
||||
|
@ -332,7 +332,7 @@ public:
|
|||
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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -29,15 +29,15 @@
|
|||
|
||||
class AppleIIGSMusicPlugin : public NullMusicPlugin {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("Apple II GS emulator (NOT IMPLEMENTED)");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "appleIIgs";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
MusicDevices getDevices() const override;
|
||||
};
|
||||
|
||||
MusicDevices AppleIIGSMusicPlugin::getDevices() const {
|
||||
|
|
|
@ -347,15 +347,15 @@ void CMSEmulator::portWriteIntern(int chip, int offset, int data) {
|
|||
|
||||
class CMSMusicPlugin : public NullMusicPlugin {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("Creative Music System emulator");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "cms";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
MusicDevices getDevices() const override;
|
||||
};
|
||||
|
||||
MusicDevices CMSMusicPlugin::getDevices() const {
|
||||
|
|
|
@ -67,20 +67,20 @@ public:
|
|||
virtual ~MidiDriver_EAS();
|
||||
|
||||
// MidiDriver
|
||||
virtual int open();
|
||||
virtual bool isOpen() const;
|
||||
virtual void close();
|
||||
virtual void send(uint32 b) override;
|
||||
virtual void sysEx(const byte *msg, uint16 length);
|
||||
virtual void setTimerCallback(void *timerParam,
|
||||
Common::TimerManager::TimerProc timerProc);
|
||||
virtual uint32 getBaseTempo();
|
||||
int open() override;
|
||||
bool isOpen() const override;
|
||||
void close() override;
|
||||
void send(uint32 b) override;
|
||||
void sysEx(const byte *msg, uint16 length) override;
|
||||
void setTimerCallback(void *timerParam,
|
||||
Common::TimerManager::TimerProc timerProc) override;
|
||||
uint32 getBaseTempo() override;
|
||||
|
||||
// AudioStream
|
||||
virtual int readBuffer(int16 *buffer, const int numSamples);
|
||||
virtual bool isStereo() const;
|
||||
virtual int getRate() const;
|
||||
virtual bool endOfData() const;
|
||||
int readBuffer(int16 *buffer, const int numSamples) override;
|
||||
bool isStereo() const override;
|
||||
int getRate() const override;
|
||||
bool endOfData() const override;
|
||||
|
||||
private:
|
||||
struct EASLibConfig {
|
||||
|
|
|
@ -459,16 +459,16 @@ void MidiDriver_FluidSynth::setEngineSoundFont(Common::SeekableReadStream *sound
|
|||
|
||||
class FluidSynthMusicPlugin : public MusicPluginObject {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return "FluidSynth";
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "fluidsynth";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
|
||||
MusicDevices getDevices() const override;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
|
||||
};
|
||||
|
||||
MusicDevices FluidSynthMusicPlugin::getDevices() const {
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
static PC98AudioCoreInternal *addNewRef(Audio::Mixer *mixer, PC98AudioCore *owner, PC98AudioPluginDriver *driver, PC98AudioPluginDriver::EmuType type);
|
||||
static void releaseRef(PC98AudioCore *owner);
|
||||
|
||||
bool init();
|
||||
bool init() override;
|
||||
|
||||
void writePort(uint16 port, uint8 value);
|
||||
uint8 readPort(uint16 port);
|
||||
|
@ -53,8 +53,8 @@ private:
|
|||
bool assignPluginDriver(PC98AudioCore *owner, PC98AudioPluginDriver *driver, bool externalMutexHandling = false);
|
||||
void removePluginDriver(PC98AudioCore *owner);
|
||||
|
||||
void timerCallbackA();
|
||||
void timerCallbackB();
|
||||
void timerCallbackA() override;
|
||||
void timerCallbackB() override;
|
||||
|
||||
uint16 _musicVolume;
|
||||
uint16 _sfxVolume;
|
||||
|
|
|
@ -125,7 +125,7 @@ public:
|
|||
static TownsAudioInterfaceInternal *addNewRef(Audio::Mixer *mixer, TownsAudioInterface *owner, TownsAudioInterfacePluginDriver *driver, bool externalMutex);
|
||||
static void releaseRef(TownsAudioInterface *owner);
|
||||
|
||||
bool init();
|
||||
bool init() override;
|
||||
|
||||
int callback(int command, ...);
|
||||
int processCommand(int command, va_list &args);
|
||||
|
@ -140,10 +140,10 @@ private:
|
|||
bool assignPluginDriver(TownsAudioInterface *owner, TownsAudioInterfacePluginDriver *driver);
|
||||
void removePluginDriver(TownsAudioInterface *owner);
|
||||
|
||||
void nextTickEx(int32 *buffer, uint32 bufferSize);
|
||||
void nextTickEx(int32 *buffer, uint32 bufferSize) override;
|
||||
|
||||
void timerCallbackA();
|
||||
void timerCallbackB();
|
||||
void timerCallbackA() override;
|
||||
void timerCallbackB() override;
|
||||
|
||||
typedef int (TownsAudioInterfaceInternal::*TownsAudioIntfCallback)(va_list &);
|
||||
const TownsAudioIntfCallback *_intfOpcodes;
|
||||
|
|
|
@ -121,15 +121,15 @@ public:
|
|||
TownsPC98_MusicChannelSSG(TownsPC98_AudioDriver *driver, uint8 regOffs, uint8 flgs, uint8 num, uint8 key, uint8 prt, uint8 id);
|
||||
virtual ~TownsPC98_MusicChannelSSG();
|
||||
|
||||
virtual void reset();
|
||||
virtual void loadData(uint8 *data);
|
||||
void processEvents();
|
||||
void processFrequency();
|
||||
void reset() override;
|
||||
void loadData(uint8 *data) override;
|
||||
void processEvents() override;
|
||||
void processFrequency() override;
|
||||
|
||||
void protect();
|
||||
void restore();
|
||||
|
||||
void fadeStep();
|
||||
void fadeStep() override;
|
||||
|
||||
protected:
|
||||
void keyOn();
|
||||
|
@ -166,8 +166,8 @@ public:
|
|||
TownsPC98_MusicChannelSSG(driver, regOffs, flgs, num, key, prt, id) {}
|
||||
virtual ~TownsPC98_SfxChannel() {}
|
||||
|
||||
void reset();
|
||||
void loadData(uint8 *data);
|
||||
void reset() override;
|
||||
void loadData(uint8 *data) override;
|
||||
};
|
||||
|
||||
#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);
|
||||
virtual ~TownsPC98_MusicChannelPCM();
|
||||
|
||||
void loadData(uint8 *data);
|
||||
void processEvents();
|
||||
void loadData(uint8 *data) override;
|
||||
void processEvents() override;
|
||||
|
||||
private:
|
||||
bool processControlEvent(uint8 cmd);
|
||||
|
|
|
@ -28,16 +28,16 @@
|
|||
|
||||
class TownsEmuMusicPlugin : public MusicPluginObject {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("FM-Towns Audio");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "towns";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
|
||||
MusicDevices getDevices() const override;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
|
||||
};
|
||||
|
||||
MusicDevices TownsEmuMusicPlugin::getDevices() const {
|
||||
|
@ -53,16 +53,16 @@ Common::Error TownsEmuMusicPlugin::createInstance(MidiDriver **mididriver, MidiD
|
|||
|
||||
class PC98EmuMusicPlugin : public MusicPluginObject {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("PC-98 Audio");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "pc98";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
|
||||
MusicDevices getDevices() const override;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
|
||||
};
|
||||
|
||||
MusicDevices PC98EmuMusicPlugin::getDevices() const {
|
||||
|
@ -78,16 +78,16 @@ Common::Error PC98EmuMusicPlugin::createInstance(MidiDriver **mididriver, MidiDr
|
|||
|
||||
class SegaCDSoundPlugin : public MusicPluginObject {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("SegaCD Audio");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "segacd";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
|
||||
MusicDevices getDevices() const override;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
|
||||
};
|
||||
|
||||
MusicDevices SegaCDSoundPlugin::getDevices() const {
|
||||
|
|
|
@ -60,23 +60,23 @@ namespace MT32Emu {
|
|||
class ScummVMReportHandler : public MT32Emu::IReportHandler {
|
||||
public:
|
||||
// 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);
|
||||
debug(4, "%s", out.c_str());
|
||||
}
|
||||
|
||||
// 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");
|
||||
dialog.runModal();
|
||||
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");
|
||||
dialog.runModal();
|
||||
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
|
||||
// message in Operation Stealth.
|
||||
for (const char *ptr = message; *ptr; ptr++) {
|
||||
|
@ -88,16 +88,16 @@ public:
|
|||
}
|
||||
|
||||
// Unused callbacks
|
||||
virtual void onMIDIMessagePlayed() {}
|
||||
virtual bool onMIDIQueueOverflow() { return false; }
|
||||
virtual void onMIDISystemRealtime(Bit8u /* system_realtime */) {}
|
||||
virtual void onDeviceReset() {}
|
||||
virtual void onDeviceReconfig() {}
|
||||
virtual void onNewReverbMode(Bit8u /* mode */) {}
|
||||
virtual void onNewReverbTime(Bit8u /* time */) {}
|
||||
virtual void onNewReverbLevel(Bit8u /* level */) {}
|
||||
virtual void onPolyStateChanged(Bit8u /* part_num */) {}
|
||||
virtual void onProgramChanged(Bit8u /* part_num */, const char * /* sound_group_name */, const char * /* patch_name */) {}
|
||||
void onMIDIMessagePlayed() override {}
|
||||
bool onMIDIQueueOverflow() override { return false; }
|
||||
void onMIDISystemRealtime(Bit8u /* system_realtime */) override {}
|
||||
void onDeviceReset() override {}
|
||||
void onDeviceReconfig() override {}
|
||||
void onNewReverbMode(Bit8u /* mode */) override {}
|
||||
void onNewReverbTime(Bit8u /* time */) override {}
|
||||
void onNewReverbLevel(Bit8u /* level */) override {}
|
||||
void onPolyStateChanged(Bit8u /* part_num */) override {}
|
||||
void onProgramChanged(Bit8u /* part_num */, const char * /* sound_group_name */, const char * /* patch_name */) override {}
|
||||
|
||||
virtual ~ScummVMReportHandler() {}
|
||||
};
|
||||
|
@ -105,8 +105,8 @@ public:
|
|||
} // end of namespace MT32Emu
|
||||
|
||||
class MidiChannel_MT32 : public MidiChannel_MPU401 {
|
||||
void effectLevel(byte value) { }
|
||||
void chorusLevel(byte value) { }
|
||||
void effectLevel(byte value) override { }
|
||||
void chorusLevel(byte value) override { }
|
||||
};
|
||||
|
||||
class MidiDriver_MT32 : public MidiDriver_Emulated {
|
||||
|
@ -433,17 +433,17 @@ void MidiDriver_ThreadedMT32::onTimer() {
|
|||
|
||||
class MT32EmuMusicPlugin : public MusicPluginObject {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("MT-32 emulator");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "mt32";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
bool checkDevice(MidiDriver::DeviceHandle) const;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
|
||||
MusicDevices getDevices() const override;
|
||||
bool checkDevice(MidiDriver::DeviceHandle) const override;
|
||||
Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const override;
|
||||
};
|
||||
|
||||
MusicDevices MT32EmuMusicPlugin::getDevices() const {
|
||||
|
|
|
@ -127,7 +127,7 @@ public:
|
|||
template <class SampleEx>
|
||||
class NullLowPassFilter : public AbstractLowPassFilter<SampleEx> {
|
||||
public:
|
||||
SampleEx process(const SampleEx sample) {
|
||||
SampleEx process(const SampleEx sample) override {
|
||||
return sample;
|
||||
}
|
||||
};
|
||||
|
@ -150,7 +150,7 @@ public:
|
|||
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;
|
||||
|
||||
SampleEx sample = lpfTaps[COARSE_LPF_DELAY_LINE_LENGTH] * ringBuffer[ringBufferPosition];
|
||||
|
@ -179,12 +179,12 @@ private:
|
|||
|
||||
public:
|
||||
AccurateLowPassFilter(const bool oldMT32AnalogLPF, const bool oversample);
|
||||
FloatSample process(const FloatSample sample);
|
||||
IntSampleEx process(const IntSampleEx sample);
|
||||
bool hasNextSample() const;
|
||||
unsigned int getOutputSampleRate() const;
|
||||
unsigned int estimateInSampleCount(const unsigned int outSamples) const;
|
||||
void addPositionIncrement(const unsigned int positionIncrement);
|
||||
FloatSample process(const FloatSample sample) override;
|
||||
IntSampleEx process(const IntSampleEx sample) override;
|
||||
bool hasNextSample() const override;
|
||||
unsigned int getOutputSampleRate() const override;
|
||||
unsigned int estimateInSampleCount(const unsigned int outSamples) const override;
|
||||
void addPositionIncrement(const unsigned int positionIncrement) override;
|
||||
};
|
||||
|
||||
static inline IntSampleEx normaliseSample(const IntSampleEx sample) {
|
||||
|
@ -223,19 +223,19 @@ public:
|
|||
delete &rightChannelLPF;
|
||||
}
|
||||
|
||||
unsigned int getOutputSampleRate() const {
|
||||
unsigned int getOutputSampleRate() const override {
|
||||
return leftChannelLPF.getOutputSampleRate();
|
||||
}
|
||||
|
||||
Bit32u getDACStreamsLength(const Bit32u outputLength) const {
|
||||
Bit32u getDACStreamsLength(const Bit32u outputLength) const override {
|
||||
return leftChannelLPF.estimateInSampleCount(outputLength);
|
||||
}
|
||||
|
||||
void setSynthOutputGain(const float synthGain);
|
||||
void setReverbOutputGain(const float reverbGain, const bool mt32ReverbCompatibilityMode);
|
||||
void setSynthOutputGain(const float synthGain) override;
|
||||
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(FloatSample *outStream, const FloatSample *nonReverbLeft, const FloatSample *nonReverbRight, const FloatSample *reverbDryLeft, const FloatSample *reverbDryRight, const FloatSample *reverbWetLeft, const FloatSample *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) override;
|
||||
|
||||
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) {
|
||||
|
|
|
@ -455,11 +455,11 @@ public:
|
|||
close();
|
||||
}
|
||||
|
||||
bool isOpen() const {
|
||||
bool isOpen() const override {
|
||||
return combs != nullptr;
|
||||
}
|
||||
|
||||
void open() {
|
||||
void open() override {
|
||||
if (isOpen()) return;
|
||||
if (currentSettings.numberOfAllpasses > 0) {
|
||||
allpasses = new AllpassFilter<Sample>*[currentSettings.numberOfAllpasses];
|
||||
|
@ -479,7 +479,7 @@ public:
|
|||
mute();
|
||||
}
|
||||
|
||||
void close() {
|
||||
void close() override {
|
||||
if (allpasses != nullptr) {
|
||||
for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
|
||||
if (allpasses[i] != nullptr) {
|
||||
|
@ -502,7 +502,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void mute() {
|
||||
void mute() override {
|
||||
if (allpasses != nullptr) {
|
||||
for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
|
||||
allpasses[i]->mute();
|
||||
|
@ -515,7 +515,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void setParameters(Bit8u time, Bit8u level) {
|
||||
void setParameters(Bit8u time, Bit8u level) override {
|
||||
if (!isOpen()) return;
|
||||
level &= 7;
|
||||
time &= 7;
|
||||
|
@ -542,7 +542,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool isActive() const {
|
||||
bool isActive() const override {
|
||||
if (!isOpen()) return false;
|
||||
for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
|
||||
if (!allpasses[i]->isEmpty()) return true;
|
||||
|
@ -553,7 +553,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
bool isMT32Compatible(const ReverbMode mode) const {
|
||||
bool isMT32Compatible(const ReverbMode mode) const override {
|
||||
return ¤tSettings == &getMT32Settings(mode);
|
||||
}
|
||||
|
||||
|
@ -622,8 +622,8 @@ public:
|
|||
} // while ((numSamples--) > 0)
|
||||
} // produceOutput
|
||||
|
||||
bool process(const IntSample *inLeft, const IntSample *inRight, IntSample *outLeft, IntSample *outRight, Bit32u numSamples);
|
||||
bool process(const FloatSample *inLeft, const FloatSample *inRight, FloatSample *outLeft, FloatSample *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) override;
|
||||
};
|
||||
|
||||
BReverbModel *BReverbModel::createBReverbModel(const ReverbMode mode, const bool mt32CompatibleModel, const RendererType rendererType) {
|
||||
|
|
|
@ -173,10 +173,10 @@ public:
|
|||
tmpBuffers(createTmpBuffers())
|
||||
{}
|
||||
|
||||
void render(IntSample *stereoStream, Bit32u len);
|
||||
void render(FloatSample *stereoStream, Bit32u len);
|
||||
void renderStreams(const DACOutputStreams<IntSample> &streams, Bit32u len);
|
||||
void renderStreams(const DACOutputStreams<FloatSample> &streams, Bit32u len);
|
||||
void render(IntSample *stereoStream, Bit32u len) override;
|
||||
void render(FloatSample *stereoStream, Bit32u len) override;
|
||||
void renderStreams(const DACOutputStreams<IntSample> &streams, Bit32u len) override;
|
||||
void renderStreams(const DACOutputStreams<FloatSample> &streams, Bit32u len) override;
|
||||
|
||||
template <class O>
|
||||
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. */
|
||||
class DynamicSysexDataStorage : public MidiEventQueue::SysexDataStorage {
|
||||
public:
|
||||
Bit8u *allocate(Bit32u sysexLength) {
|
||||
Bit8u *allocate(Bit32u sysexLength) override {
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
@ -1861,7 +1861,7 @@ public:
|
|||
delete[] storageBuffer;
|
||||
}
|
||||
|
||||
Bit8u *allocate(Bit32u sysexLength) {
|
||||
Bit8u *allocate(Bit32u sysexLength) override {
|
||||
Bit32u myStartPosition = startPosition;
|
||||
Bit32u myEndPosition = endPosition;
|
||||
|
||||
|
@ -1887,7 +1887,7 @@ public:
|
|||
return storageBuffer + myEndPosition;
|
||||
}
|
||||
|
||||
void reclaimUnused(const Bit8u *sysexData, Bit32u sysexLength) {
|
||||
void reclaimUnused(const Bit8u *sysexData, Bit32u sysexLength) override {
|
||||
if (sysexData == nullptr) return;
|
||||
Bit32u allocatedPosition = startPosition;
|
||||
if (storageBuffer + allocatedPosition == sysexData) {
|
||||
|
@ -1898,7 +1898,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void dispose(const Bit8u *, Bit32u) {}
|
||||
void dispose(const Bit8u *, Bit32u) override {}
|
||||
|
||||
private:
|
||||
Bit8u * const storageBuffer;
|
||||
|
|
|
@ -157,7 +157,7 @@ protected:
|
|||
void * const instanceData;
|
||||
|
||||
private:
|
||||
void printDebug(const char *fmt, va_list list) {
|
||||
void printDebug(const char *fmt, va_list list) override {
|
||||
if (delegate.v0->printDebug == nullptr) {
|
||||
ReportHandler::printDebug(fmt, list);
|
||||
} else {
|
||||
|
@ -165,7 +165,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void onErrorControlROM() {
|
||||
void onErrorControlROM() override {
|
||||
if (delegate.v0->onErrorControlROM == nullptr) {
|
||||
ReportHandler::onErrorControlROM();
|
||||
} else {
|
||||
|
@ -173,7 +173,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void onErrorPCMROM() {
|
||||
void onErrorPCMROM() override {
|
||||
if (delegate.v0->onErrorPCMROM == nullptr) {
|
||||
ReportHandler::onErrorPCMROM();
|
||||
} else {
|
||||
|
@ -181,7 +181,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void showLCDMessage(const char *message) {
|
||||
void showLCDMessage(const char *message) override {
|
||||
if (delegate.v0->showLCDMessage == nullptr) {
|
||||
ReportHandler::showLCDMessage(message);
|
||||
} else {
|
||||
|
@ -189,7 +189,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void onMIDIMessagePlayed() {
|
||||
void onMIDIMessagePlayed() override {
|
||||
if (delegate.v0->onMIDIMessagePlayed == nullptr) {
|
||||
ReportHandler::onMIDIMessagePlayed();
|
||||
} else {
|
||||
|
@ -197,14 +197,14 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
bool onMIDIQueueOverflow() {
|
||||
bool onMIDIQueueOverflow() override {
|
||||
if (delegate.v0->onMIDIQueueOverflow == nullptr) {
|
||||
return ReportHandler::onMIDIQueueOverflow();
|
||||
}
|
||||
return delegate.v0->onMIDIQueueOverflow(instanceData) != MT32EMU_BOOL_FALSE;
|
||||
}
|
||||
|
||||
void onMIDISystemRealtime(Bit8u systemRealtime) {
|
||||
void onMIDISystemRealtime(Bit8u systemRealtime) override {
|
||||
if (delegate.v0->onMIDISystemRealtime == nullptr) {
|
||||
ReportHandler::onMIDISystemRealtime(systemRealtime);
|
||||
} else {
|
||||
|
@ -212,7 +212,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void onDeviceReset() {
|
||||
void onDeviceReset() override {
|
||||
if (delegate.v0->onDeviceReset == nullptr) {
|
||||
ReportHandler::onDeviceReset();
|
||||
} else {
|
||||
|
@ -220,7 +220,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void onDeviceReconfig() {
|
||||
void onDeviceReconfig() override {
|
||||
if (delegate.v0->onDeviceReconfig == nullptr) {
|
||||
ReportHandler::onDeviceReconfig();
|
||||
} else {
|
||||
|
@ -228,7 +228,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void onNewReverbMode(Bit8u mode) {
|
||||
void onNewReverbMode(Bit8u mode) override {
|
||||
if (delegate.v0->onNewReverbMode == nullptr) {
|
||||
ReportHandler::onNewReverbMode(mode);
|
||||
} else {
|
||||
|
@ -236,7 +236,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void onNewReverbTime(Bit8u time) {
|
||||
void onNewReverbTime(Bit8u time) override {
|
||||
if (delegate.v0->onNewReverbTime == nullptr) {
|
||||
ReportHandler::onNewReverbTime(time);
|
||||
} else {
|
||||
|
@ -244,7 +244,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void onNewReverbLevel(Bit8u level) {
|
||||
void onNewReverbLevel(Bit8u level) override {
|
||||
if (delegate.v0->onNewReverbLevel == nullptr) {
|
||||
ReportHandler::onNewReverbLevel(level);
|
||||
} else {
|
||||
|
@ -252,7 +252,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void onPolyStateChanged(Bit8u partNum) {
|
||||
void onPolyStateChanged(Bit8u partNum) override {
|
||||
if (delegate.v0->onPolyStateChanged == nullptr) {
|
||||
ReportHandler::onPolyStateChanged(partNum);
|
||||
} 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) {
|
||||
ReportHandler::onProgramChanged(partNum, soundGroupName, patchName);
|
||||
} else {
|
||||
|
@ -279,7 +279,7 @@ protected:
|
|||
void *instanceData;
|
||||
|
||||
private:
|
||||
void handleShortMessage(const Bit32u message) {
|
||||
void handleShortMessage(const Bit32u message) override {
|
||||
if (delegate.v0->handleShortMessage == nullptr) {
|
||||
DefaultMidiStreamParser::handleShortMessage(message);
|
||||
} 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) {
|
||||
DefaultMidiStreamParser::handleSysex(stream, length);
|
||||
} else {
|
||||
|
@ -295,7 +295,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void handleSystemRealtimeMessage(const Bit8u realtime) {
|
||||
void handleSystemRealtimeMessage(const Bit8u realtime) override {
|
||||
if (delegate.v0->handleSystemRealtimeMessage == nullptr) {
|
||||
DefaultMidiStreamParser::handleSystemRealtimeMessage(realtime);
|
||||
} else {
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
SynthWrapper(Synth &useSynth) : synth(useSynth)
|
||||
{}
|
||||
|
||||
void getOutputSamples(FloatSample *outBuffer, unsigned int size) {
|
||||
void getOutputSamples(FloatSample *outBuffer, unsigned int size) override {
|
||||
synth.render(outBuffer, size);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -36,7 +36,7 @@ friend void freeResamplerModel(FloatSampleProvider &model, FloatSampleProvider &
|
|||
public:
|
||||
CascadeStage(FloatSampleProvider &source, ResamplerStage &resamplerStage);
|
||||
|
||||
void getOutputSamples(FloatSample *outBuffer, unsigned int size);
|
||||
void getOutputSamples(FloatSample *outBuffer, unsigned int size) override;
|
||||
|
||||
protected:
|
||||
ResamplerStage &resamplerStage;
|
||||
|
|
|
@ -200,15 +200,15 @@ int8 PCSpeaker::generateSilence(uint32 x, uint32 oscLength) {
|
|||
|
||||
class PCSpeakerMusicPlugin : public NullMusicPlugin {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("PC Speaker emulator");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "pcspk";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
MusicDevices getDevices() const override;
|
||||
};
|
||||
|
||||
MusicDevices PCSpeakerMusicPlugin::getDevices() const {
|
||||
|
@ -219,15 +219,15 @@ MusicDevices PCSpeakerMusicPlugin::getDevices() const {
|
|||
|
||||
class PCjrMusicPlugin : public NullMusicPlugin {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("IBM PCjr emulator");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "pcjr";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
MusicDevices getDevices() const override;
|
||||
};
|
||||
|
||||
MusicDevices PCjrMusicPlugin::getDevices() const {
|
||||
|
|
|
@ -1430,15 +1430,15 @@ int SID::updateClock(cycle_count& delta_t, short* buf, int n, int interleave) {
|
|||
|
||||
class C64MusicPlugin : public NullMusicPlugin {
|
||||
public:
|
||||
const char *getName() const {
|
||||
const char *getName() const override {
|
||||
return _s("C64 Audio emulator");
|
||||
}
|
||||
|
||||
const char *getId() const {
|
||||
const char *getId() const override {
|
||||
return "C64";
|
||||
}
|
||||
|
||||
MusicDevices getDevices() const;
|
||||
MusicDevices getDevices() const override;
|
||||
};
|
||||
|
||||
MusicDevices C64MusicPlugin::getDevices() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue