summaryrefslogtreecommitdiff
path: root/test/enginetest.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-08-01 16:54:34 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-08-01 17:04:12 +0200
commit857da27194ea621734be7df4c1d940992dbb26e9 (patch)
tree8698f4347b1a1ac0c1133533963b64f7eb041eaf /test/enginetest.cc
parent982aad68eedfcd70a19864c31255e70a34876db4 (diff)
Remove the last references to hardcoded 44k1Hz samplerate.
Diffstat (limited to 'test/enginetest.cc')
-rw-r--r--test/enginetest.cc34
1 files changed, 18 insertions, 16 deletions
diff --git a/test/enginetest.cc b/test/enginetest.cc
index cb21609..585b0d1 100644
--- a/test/enginetest.cc
+++ b/test/enginetest.cc
@@ -37,34 +37,36 @@ class AudioOutputEngineDummy
: public AudioOutputEngine
{
public:
- bool init(const Channels& channels) { return true; }
+ bool init(const Channels& channels) override { return true; }
- void setParm(const std::string& parm, const std::string& value) {}
+ void setParm(const std::string& parm, const std::string& value) override {}
- bool start() { return true; }
- void stop() {}
+ bool start() override { return true; }
+ void stop() override {}
- void pre(size_t nsamples) {}
- void run(int ch, sample_t *samples, size_t nsamples) {}
- void post(size_t nsamples) {}
- bool isFreewheeling() const { return true; }
+ void pre(size_t nsamples) override {}
+ void run(int ch, sample_t *samples, size_t nsamples) override {}
+ void post(size_t nsamples) override {}
+ std::size_t getSamplerate() const override { return 44100; }
+ bool isFreewheeling() const override { return true; }
};
class AudioInputEngineDummy
: public AudioInputEngine
{
public:
- bool init(const Instruments& instruments) { return true; }
+ bool init(const Instruments& instruments) override { return true; }
- void setParm(const std::string& parm, const std::string& value) {}
+ void setParm(const std::string& parm, const std::string& value) override {}
- bool start() { return true; }
- void stop() {}
+ bool start() override { return true; }
+ void stop() override {}
- void pre() {}
- void run(size_t pos, size_t len, std::vector<event_t>& events) {}
- void post() {}
- bool isFreewheeling() const { return true; }
+ void pre() override {}
+ void run(size_t pos, size_t len, std::vector<event_t>& events) override {}
+ void post() override {}
+ void setSampleRate(double sample_rate) override {}
+ bool isFreewheeling() const override { return true; }
};
class test_engine : public DGUnit