mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +02:00
use the C++ override keyword with love.audio's methods
This commit is contained in:
@@ -42,56 +42,56 @@ public:
|
|||||||
virtual ~Audio();
|
virtual ~Audio();
|
||||||
|
|
||||||
// Implements Audio.
|
// Implements Audio.
|
||||||
love::audio::Source *newSource(love::sound::Decoder *decoder);
|
love::audio::Source *newSource(love::sound::Decoder *decoder) override;
|
||||||
love::audio::Source *newSource(love::sound::SoundData *soundData);
|
love::audio::Source *newSource(love::sound::SoundData *soundData) override;
|
||||||
love::audio::Source *newSource(int sampleRate, int bitDepth, int channels, int buffers);
|
love::audio::Source *newSource(int sampleRate, int bitDepth, int channels, int buffers) override;
|
||||||
int getActiveSourceCount() const;
|
int getActiveSourceCount() const override;
|
||||||
int getMaxSources() const;
|
int getMaxSources() const override;
|
||||||
bool play(love::audio::Source *source);
|
bool play(love::audio::Source *source) override;
|
||||||
bool play(const std::vector<love::audio::Source*> &sources);
|
bool play(const std::vector<love::audio::Source*> &sources) override;
|
||||||
void stop(love::audio::Source *source);
|
void stop(love::audio::Source *source) override;
|
||||||
void stop(const std::vector<love::audio::Source*> &sources);
|
void stop(const std::vector<love::audio::Source*> &sources) override;
|
||||||
void stop();
|
void stop() override;
|
||||||
void pause(love::audio::Source *source);
|
void pause(love::audio::Source *source) override;
|
||||||
void pause(const std::vector<love::audio::Source*> &sources);
|
void pause(const std::vector<love::audio::Source*> &sources) override;
|
||||||
std::vector<love::audio::Source*> pause();
|
std::vector<love::audio::Source*> pause() override;
|
||||||
void setVolume(float volume);
|
void setVolume(float volume) override;
|
||||||
float getVolume() const;
|
float getVolume() const override;
|
||||||
|
|
||||||
void getPosition(float *v) const;
|
void getPosition(float *v) const override;
|
||||||
void setPosition(float *v);
|
void setPosition(float *v) override;
|
||||||
void getOrientation(float *v) const;
|
void getOrientation(float *v) const override;
|
||||||
void setOrientation(float *v);
|
void setOrientation(float *v) override;
|
||||||
void getVelocity(float *v) const;
|
void getVelocity(float *v) const override;
|
||||||
void setVelocity(float *v);
|
void setVelocity(float *v) override;
|
||||||
|
|
||||||
void setDopplerScale(float scale);
|
void setDopplerScale(float scale) override;
|
||||||
float getDopplerScale() const;
|
float getDopplerScale() const override;
|
||||||
//void setMeter(float scale);
|
//void setMeter(float scale);
|
||||||
//float getMeter() const;
|
//float getMeter() const;
|
||||||
|
|
||||||
const std::vector<love::audio::RecordingDevice*> &getRecordingDevices();
|
const std::vector<love::audio::RecordingDevice*> &getRecordingDevices() override;
|
||||||
|
|
||||||
DistanceModel getDistanceModel() const;
|
DistanceModel getDistanceModel() const override;
|
||||||
void setDistanceModel(DistanceModel distanceModel);
|
void setDistanceModel(DistanceModel distanceModel) override;
|
||||||
|
|
||||||
bool setEffect(const char *, std::map<Effect::Parameter, float> ¶ms);
|
bool setEffect(const char *, std::map<Effect::Parameter, float> ¶ms) override;
|
||||||
bool unsetEffect(const char *);
|
bool unsetEffect(const char *) override;
|
||||||
bool getEffect(const char *, std::map<Effect::Parameter, float> ¶ms);
|
bool getEffect(const char *, std::map<Effect::Parameter, float> ¶ms) override;
|
||||||
bool getActiveEffects(std::vector<std::string> &list) const;
|
bool getActiveEffects(std::vector<std::string> &list) const override;
|
||||||
int getMaxSceneEffects() const;
|
int getMaxSceneEffects() const override;
|
||||||
int getMaxSourceEffects() const;
|
int getMaxSourceEffects() const override;
|
||||||
bool isEFXsupported() const;
|
bool isEFXsupported() const override;
|
||||||
|
|
||||||
bool setOutputSpatialization(bool enable, const char *filter = nullptr) override;
|
bool setOutputSpatialization(bool enable, const char *filter = nullptr) override;
|
||||||
bool getOutputSpatialization(const char *&filter) const override;
|
bool getOutputSpatialization(const char *&filter) const override;
|
||||||
void getOutputSpatializationFilters(std::vector<std::string> &list) const override;
|
void getOutputSpatializationFilters(std::vector<std::string> &list) const override;
|
||||||
|
|
||||||
void pauseContext();
|
void pauseContext() override;
|
||||||
void resumeContext();
|
void resumeContext() override;
|
||||||
|
|
||||||
std::string getPlaybackDevice();
|
std::string getPlaybackDevice() override;
|
||||||
void getPlaybackDevices(std::vector<std::string> &list);
|
void getPlaybackDevices(std::vector<std::string> &list) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float volume;
|
float volume;
|
||||||
|
|||||||
@@ -79,48 +79,48 @@ public:
|
|||||||
static ALenum getFormat(int bitDepth, int channels);
|
static ALenum getFormat(int bitDepth, int channels);
|
||||||
|
|
||||||
// Implements Audio.
|
// Implements Audio.
|
||||||
love::audio::Source *newSource(love::sound::Decoder *decoder);
|
love::audio::Source *newSource(love::sound::Decoder *decoder) override;
|
||||||
love::audio::Source *newSource(love::sound::SoundData *soundData);
|
love::audio::Source *newSource(love::sound::SoundData *soundData) override;
|
||||||
love::audio::Source *newSource(int sampleRate, int bitDepth, int channels, int buffers);
|
love::audio::Source *newSource(int sampleRate, int bitDepth, int channels, int buffers) override;
|
||||||
int getActiveSourceCount() const;
|
int getActiveSourceCount() const override;
|
||||||
int getMaxSources() const;
|
int getMaxSources() const override;
|
||||||
bool play(love::audio::Source *source);
|
bool play(love::audio::Source *source) override;
|
||||||
bool play(const std::vector<love::audio::Source*> &sources);
|
bool play(const std::vector<love::audio::Source*> &sources) override;
|
||||||
void stop(love::audio::Source *source);
|
void stop(love::audio::Source *source) override;
|
||||||
void stop(const std::vector<love::audio::Source*> &sources);
|
void stop(const std::vector<love::audio::Source*> &sources) override;
|
||||||
void stop();
|
void stop() override;
|
||||||
void pause(love::audio::Source *source);
|
void pause(love::audio::Source *source) override;
|
||||||
void pause(const std::vector<love::audio::Source*> &sources);
|
void pause(const std::vector<love::audio::Source*> &sources) override;
|
||||||
std::vector<love::audio::Source*> pause();
|
std::vector<love::audio::Source*> pause() override;
|
||||||
void pauseContext();
|
void pauseContext() override;
|
||||||
void resumeContext();
|
void resumeContext() override;
|
||||||
void setVolume(float volume);
|
void setVolume(float volume) override;
|
||||||
float getVolume() const;
|
float getVolume() const override;
|
||||||
|
|
||||||
void getPosition(float *v) const;
|
void getPosition(float *v) const override;
|
||||||
void setPosition(float *v);
|
void setPosition(float *v) override;
|
||||||
void getOrientation(float *v) const;
|
void getOrientation(float *v) const override;
|
||||||
void setOrientation(float *v);
|
void setOrientation(float *v) override;
|
||||||
void getVelocity(float *v) const;
|
void getVelocity(float *v) const override;
|
||||||
void setVelocity(float *v);
|
void setVelocity(float *v) override;
|
||||||
|
|
||||||
void setDopplerScale(float scale);
|
void setDopplerScale(float scale) override;
|
||||||
float getDopplerScale() const;
|
float getDopplerScale() const override;
|
||||||
//void setMeter(float scale);
|
//void setMeter(float scale);
|
||||||
//float getMeter() const;
|
//float getMeter() const;
|
||||||
|
|
||||||
const std::vector<love::audio::RecordingDevice*> &getRecordingDevices();
|
const std::vector<love::audio::RecordingDevice*> &getRecordingDevices() override;
|
||||||
|
|
||||||
DistanceModel getDistanceModel() const;
|
DistanceModel getDistanceModel() const override;
|
||||||
void setDistanceModel(DistanceModel distanceModel);
|
void setDistanceModel(DistanceModel distanceModel) override;
|
||||||
|
|
||||||
bool setEffect(const char *name, std::map<Effect::Parameter, float> ¶ms);
|
bool setEffect(const char *name, std::map<Effect::Parameter, float> ¶ms) override;
|
||||||
bool unsetEffect(const char *name);
|
bool unsetEffect(const char *name) override;
|
||||||
bool getEffect(const char *name, std::map<Effect::Parameter, float> ¶ms);
|
bool getEffect(const char *name, std::map<Effect::Parameter, float> ¶ms) override;
|
||||||
bool getActiveEffects(std::vector<std::string> &list) const;
|
bool getActiveEffects(std::vector<std::string> &list) const override;
|
||||||
int getMaxSceneEffects() const;
|
int getMaxSceneEffects() const override;
|
||||||
int getMaxSourceEffects() const;
|
int getMaxSourceEffects() const override;
|
||||||
bool isEFXsupported() const;
|
bool isEFXsupported() const override;
|
||||||
|
|
||||||
bool setOutputSpatialization(bool enable, const char *filter = nullptr) override;
|
bool setOutputSpatialization(bool enable, const char *filter = nullptr) override;
|
||||||
bool getOutputSpatialization(const char *&filter) const override;
|
bool getOutputSpatialization(const char *&filter) const override;
|
||||||
@@ -128,9 +128,9 @@ public:
|
|||||||
|
|
||||||
bool getEffectID(const char *name, ALuint &id);
|
bool getEffectID(const char *name, ALuint &id);
|
||||||
|
|
||||||
std::string getPlaybackDevice();
|
std::string getPlaybackDevice() override;
|
||||||
void getPlaybackDevices(std::vector<std::string> &list);
|
void getPlaybackDevices(std::vector<std::string> &list) override;
|
||||||
void setPlaybackDevice(const char *name);
|
void setPlaybackDevice(const char *name) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user