diff options
Diffstat (limited to 'extern/audaspace/include/generator')
-rw-r--r-- | extern/audaspace/include/generator/Silence.h | 9 | ||||
-rw-r--r-- | extern/audaspace/include/generator/SilenceReader.h | 8 | ||||
-rw-r--r-- | extern/audaspace/include/generator/Sine.h | 3 |
3 files changed, 16 insertions, 4 deletions
diff --git a/extern/audaspace/include/generator/Silence.h b/extern/audaspace/include/generator/Silence.h index a35b83d37fc..1aa26eb390f 100644 --- a/extern/audaspace/include/generator/Silence.h +++ b/extern/audaspace/include/generator/Silence.h @@ -23,6 +23,7 @@ */ #include "ISound.h" +#include "respec/Specification.h" AUD_NAMESPACE_BEGIN @@ -32,6 +33,11 @@ AUD_NAMESPACE_BEGIN class AUD_API Silence : public ISound { private: + /** + * The target sample rate for output. + */ + const SampleRate m_sampleRate; + // delete copy constructor and operator= Silence(const Silence&) = delete; Silence& operator=(const Silence&) = delete; @@ -39,8 +45,9 @@ private: public: /** * Creates a new silence sound. + * \param sampleRate The target sample rate for playback. */ - Silence(); + Silence(SampleRate sampleRate = RATE_48000); virtual std::shared_ptr<IReader> createReader(); }; diff --git a/extern/audaspace/include/generator/SilenceReader.h b/extern/audaspace/include/generator/SilenceReader.h index ecc0ce86da9..c32db4b3e89 100644 --- a/extern/audaspace/include/generator/SilenceReader.h +++ b/extern/audaspace/include/generator/SilenceReader.h @@ -38,6 +38,11 @@ private: */ int m_position; + /** + * The sample rate for the output. + */ + const SampleRate m_sampleRate; + // delete copy constructor and operator= SilenceReader(const SilenceReader&) = delete; SilenceReader& operator=(const SilenceReader&) = delete; @@ -45,8 +50,9 @@ private: public: /** * Creates a new reader. + * \param sampleRate The output sample rate. */ - SilenceReader(); + SilenceReader(SampleRate sampleRate); virtual bool isSeekable() const; virtual void seek(int position); diff --git a/extern/audaspace/include/generator/Sine.h b/extern/audaspace/include/generator/Sine.h index ee78fc7d06b..0c7dd15ab30 100644 --- a/extern/audaspace/include/generator/Sine.h +++ b/extern/audaspace/include/generator/Sine.h @@ -53,8 +53,7 @@ public: * \param frequency The desired frequency. * \param sampleRate The target sample rate for playback. */ - Sine(float frequency, - SampleRate sampleRate = RATE_48000); + Sine(float frequency, SampleRate sampleRate = RATE_48000); /** * Returns the frequency of the sine wave. |