diff options
author | Jörg Müller <nexyon@gmail.com> | 2020-05-03 16:25:52 +0300 |
---|---|---|
committer | Jörg Müller <nexyon@gmail.com> | 2020-05-03 16:30:35 +0300 |
commit | fe891d581dfece13b42414ba1d8fec6063290a31 (patch) | |
tree | f637697a4b96c5a9522d61fc500eba64a623fa19 /extern/audaspace/include | |
parent | 2b7d5caae8a1f00a137247af819529ed5e8d0200 (diff) |
Audaspace: update from upstream
- Changing API for time values from float to double for better precision.
- Fixing minor mistakes in the documentation.
- Fixing minor unnecessary large memory allocation.
Diffstat (limited to 'extern/audaspace/include')
-rw-r--r-- | extern/audaspace/include/devices/DefaultSynchronizer.h | 4 | ||||
-rw-r--r-- | extern/audaspace/include/devices/IDeviceFactory.h | 3 | ||||
-rw-r--r-- | extern/audaspace/include/devices/IHandle.h | 4 | ||||
-rw-r--r-- | extern/audaspace/include/devices/ISynchronizer.h | 4 | ||||
-rw-r--r-- | extern/audaspace/include/devices/NULLDevice.h | 4 | ||||
-rw-r--r-- | extern/audaspace/include/devices/SoftwareDevice.h | 4 | ||||
-rw-r--r-- | extern/audaspace/include/file/IFileInput.h | 5 | ||||
-rw-r--r-- | extern/audaspace/include/fx/Delay.h | 6 | ||||
-rw-r--r-- | extern/audaspace/include/fx/DelayReader.h | 2 | ||||
-rw-r--r-- | extern/audaspace/include/fx/DynamicMusic.h | 10 | ||||
-rw-r--r-- | extern/audaspace/include/fx/Fader.h | 10 | ||||
-rw-r--r-- | extern/audaspace/include/fx/FaderReader.h | 6 | ||||
-rw-r--r-- | extern/audaspace/include/fx/Limiter.h | 10 | ||||
-rw-r--r-- | extern/audaspace/include/fx/LimiterReader.h | 6 | ||||
-rw-r--r-- | extern/audaspace/include/sequence/Sequence.h | 2 | ||||
-rw-r--r-- | extern/audaspace/include/sequence/SequenceData.h | 2 | ||||
-rw-r--r-- | extern/audaspace/include/sequence/SequenceEntry.h | 10 |
17 files changed, 49 insertions, 43 deletions
diff --git a/extern/audaspace/include/devices/DefaultSynchronizer.h b/extern/audaspace/include/devices/DefaultSynchronizer.h index 31f6c65219c..e818306603c 100644 --- a/extern/audaspace/include/devices/DefaultSynchronizer.h +++ b/extern/audaspace/include/devices/DefaultSynchronizer.h @@ -33,8 +33,8 @@ AUD_NAMESPACE_BEGIN class AUD_API DefaultSynchronizer : public ISynchronizer { public: - virtual void seek(std::shared_ptr<IHandle> handle, float time); - virtual float getPosition(std::shared_ptr<IHandle> handle); + virtual void seek(std::shared_ptr<IHandle> handle, double time); + virtual double getPosition(std::shared_ptr<IHandle> handle); virtual void play(); virtual void stop(); virtual void setSyncCallback(syncFunction function, void* data); diff --git a/extern/audaspace/include/devices/IDeviceFactory.h b/extern/audaspace/include/devices/IDeviceFactory.h index 7023cc058c5..c0769fa8015 100644 --- a/extern/audaspace/include/devices/IDeviceFactory.h +++ b/extern/audaspace/include/devices/IDeviceFactory.h @@ -35,6 +35,9 @@ AUD_NAMESPACE_BEGIN class AUD_API IDeviceFactory { public: + /** + * Destroys the device factory. + */ virtual ~IDeviceFactory() {} /** diff --git a/extern/audaspace/include/devices/IHandle.h b/extern/audaspace/include/devices/IHandle.h index 3f42fc33c3a..a10ef3d71e4 100644 --- a/extern/audaspace/include/devices/IHandle.h +++ b/extern/audaspace/include/devices/IHandle.h @@ -105,14 +105,14 @@ public: * - false if the handle is invalid. * \warning Whether the seek works or not depends on the sound source. */ - virtual bool seek(float position)=0; + virtual bool seek(double position)=0; /** * Retrieves the current playback position of a sound. * \return The playback position in seconds, or 0.0 if the handle is * invalid. */ - virtual float getPosition()=0; + virtual double getPosition()=0; /** * Returns the status of a played back sound. diff --git a/extern/audaspace/include/devices/ISynchronizer.h b/extern/audaspace/include/devices/ISynchronizer.h index 6f14de59565..430230fbcb3 100644 --- a/extern/audaspace/include/devices/ISynchronizer.h +++ b/extern/audaspace/include/devices/ISynchronizer.h @@ -56,14 +56,14 @@ public: * @param handle The handle that should be synchronized/seeked. * @param time The absolute time to synchronize to. */ - virtual void seek(std::shared_ptr<IHandle> handle, float time) = 0; + virtual void seek(std::shared_ptr<IHandle> handle, double time) = 0; /** * Retrieves the position of the synchronizer. * @param handle The handle which is synchronized. * @return The position in seconds. */ - virtual float getPosition(std::shared_ptr<IHandle> handle) = 0; + virtual double getPosition(std::shared_ptr<IHandle> handle) = 0; /** * Starts the synchronizer playback. diff --git a/extern/audaspace/include/devices/NULLDevice.h b/extern/audaspace/include/devices/NULLDevice.h index 76211a799b9..9af78919f88 100644 --- a/extern/audaspace/include/devices/NULLDevice.h +++ b/extern/audaspace/include/devices/NULLDevice.h @@ -53,8 +53,8 @@ private: virtual bool stop(); virtual bool getKeep(); virtual bool setKeep(bool keep); - virtual bool seek(float position); - virtual float getPosition(); + virtual bool seek(double position); + virtual double getPosition(); virtual Status getStatus(); virtual float getVolume(); virtual bool setVolume(float volume); diff --git a/extern/audaspace/include/devices/SoftwareDevice.h b/extern/audaspace/include/devices/SoftwareDevice.h index 8f3846394c6..e92a35e5402 100644 --- a/extern/audaspace/include/devices/SoftwareDevice.h +++ b/extern/audaspace/include/devices/SoftwareDevice.h @@ -180,8 +180,8 @@ protected: virtual bool stop(); virtual bool getKeep(); virtual bool setKeep(bool keep); - virtual bool seek(float position); - virtual float getPosition(); + virtual bool seek(double position); + virtual double getPosition(); virtual Status getStatus(); virtual float getVolume(); virtual bool setVolume(float volume); diff --git a/extern/audaspace/include/file/IFileInput.h b/extern/audaspace/include/file/IFileInput.h index aec929e7639..64074910d13 100644 --- a/extern/audaspace/include/file/IFileInput.h +++ b/extern/audaspace/include/file/IFileInput.h @@ -40,7 +40,10 @@ class Buffer; class AUD_API IFileInput { public: - virtual ~IFileInput() {}; + /** + * Destroys the file input. + */ + virtual ~IFileInput() {} /** * Creates a reader for a file to be read. diff --git a/extern/audaspace/include/fx/Delay.h b/extern/audaspace/include/fx/Delay.h index d6ab93ca351..d8730802c6f 100644 --- a/extern/audaspace/include/fx/Delay.h +++ b/extern/audaspace/include/fx/Delay.h @@ -35,7 +35,7 @@ private: /** * The delay in samples. */ - const float m_delay; + const double m_delay; // delete copy constructor and operator= Delay(const Delay&) = delete; @@ -47,12 +47,12 @@ public: * \param sound The input sound. * \param delay The desired delay in seconds. */ - Delay(std::shared_ptr<ISound> sound, float delay = 0); + Delay(std::shared_ptr<ISound> sound, double delay = 0); /** * Returns the delay in seconds. */ - float getDelay() const; + double getDelay() const; virtual std::shared_ptr<IReader> createReader(); }; diff --git a/extern/audaspace/include/fx/DelayReader.h b/extern/audaspace/include/fx/DelayReader.h index fe37e56d83e..38106082020 100644 --- a/extern/audaspace/include/fx/DelayReader.h +++ b/extern/audaspace/include/fx/DelayReader.h @@ -52,7 +52,7 @@ public: * \param reader The reader to read from. * \param delay The delay in seconds. */ - DelayReader(std::shared_ptr<IReader> reader, float delay); + DelayReader(std::shared_ptr<IReader> reader, double delay); virtual void seek(int position); virtual int getLength() const; diff --git a/extern/audaspace/include/fx/DynamicMusic.h b/extern/audaspace/include/fx/DynamicMusic.h index 5d59f77401a..c2a1c75b47e 100644 --- a/extern/audaspace/include/fx/DynamicMusic.h +++ b/extern/audaspace/include/fx/DynamicMusic.h @@ -55,7 +55,7 @@ private: /** * Length of the crossfade transition in seconds, used when no custom transition has been set. */ - float m_fadeTime; + double m_fadeTime; /** * Handle to the playback of the current scene. @@ -145,13 +145,13 @@ public: * Sets the length of the crossfade transition (default 1 second). * \param seconds The time in seconds. */ - void setFadeTime(float seconds); + void setFadeTime(double seconds); /** * Gets the length of the crossfade transition (default 1 second). * \return The length of the cressfade transition in seconds. */ - float getFadeTime(); + double getFadeTime(); /** * Resumes a paused sound. @@ -177,14 +177,14 @@ public: * - false if the handle is invalid. * \warning Whether the seek works or not depends on the sound source. */ - bool seek(float position); + bool seek(double position); /** * Retrieves the current playback position of a sound. * \return The playback position in seconds, or 0.0 if the handle is * invalid. */ - float getPosition(); + double getPosition(); /** * Retrieves the volume of the scenes. diff --git a/extern/audaspace/include/fx/Fader.h b/extern/audaspace/include/fx/Fader.h index 63280aec292..452d525e8ca 100644 --- a/extern/audaspace/include/fx/Fader.h +++ b/extern/audaspace/include/fx/Fader.h @@ -43,12 +43,12 @@ private: /** * The fading start. */ - const float m_start; + const double m_start; /** * The fading length. */ - const float m_length; + const double m_length; // delete copy constructor and operator= Fader(const Fader&) = delete; @@ -64,7 +64,7 @@ public: */ Fader(std::shared_ptr<ISound> sound, FadeType type = FADE_IN, - float start = 0.0f, float length = 1.0f); + double start = 0, double length = 1); /** * Returns the fading type. @@ -74,12 +74,12 @@ public: /** * Returns the fading start. */ - float getStart() const; + double getStart() const; /** * Returns the fading length. */ - float getLength() const; + double getLength() const; virtual std::shared_ptr<IReader> createReader(); }; diff --git a/extern/audaspace/include/fx/FaderReader.h b/extern/audaspace/include/fx/FaderReader.h index 99ea3d28938..9e5fc6d265f 100644 --- a/extern/audaspace/include/fx/FaderReader.h +++ b/extern/audaspace/include/fx/FaderReader.h @@ -49,12 +49,12 @@ private: /** * The fading start. */ - const float m_start; + const double m_start; /** * The fading length. */ - const float m_length; + const double m_length; // delete copy constructor and operator= FaderReader(const FaderReader&) = delete; @@ -69,7 +69,7 @@ public: * \param length How long fading should last in seconds. */ FaderReader(std::shared_ptr<IReader> reader, FadeType type, - float start,float length); + double start,double length); virtual void read(int& length, bool& eos, sample_t* buffer); }; diff --git a/extern/audaspace/include/fx/Limiter.h b/extern/audaspace/include/fx/Limiter.h index 0b5451b4eed..b3cf598db2e 100644 --- a/extern/audaspace/include/fx/Limiter.h +++ b/extern/audaspace/include/fx/Limiter.h @@ -35,12 +35,12 @@ private: /** * The start time. */ - const float m_start; + const double m_start; /** * The end time. */ - const float m_end; + const double m_end; // delete copy constructor and operator= Limiter(const Limiter&) = delete; @@ -55,17 +55,17 @@ public: * play to the end. */ Limiter(std::shared_ptr<ISound> sound, - float start = 0, float end = -1); + double start = 0, double end = -1); /** * Returns the start time. */ - float getStart() const; + double getStart() const; /** * Returns the end time. */ - float getEnd() const; + double getEnd() const; virtual std::shared_ptr<IReader> createReader(); }; diff --git a/extern/audaspace/include/fx/LimiterReader.h b/extern/audaspace/include/fx/LimiterReader.h index 49a07b5c29e..00ad02e343d 100644 --- a/extern/audaspace/include/fx/LimiterReader.h +++ b/extern/audaspace/include/fx/LimiterReader.h @@ -35,12 +35,12 @@ private: /** * The start sample: inclusive. */ - const float m_start; + const double m_start; /** * The end sample: exlusive. */ - const float m_end; + const double m_end; // delete copy constructor and operator= LimiterReader(const LimiterReader&) = delete; @@ -54,7 +54,7 @@ public: * \param end The desired end time (sample exklusive), a negative value * signals that it should play to the end. */ - LimiterReader(std::shared_ptr<IReader> reader, float start = 0, float end = -1); + LimiterReader(std::shared_ptr<IReader> reader, double start = 0, double end = -1); virtual void seek(int position); virtual int getLength() const; diff --git a/extern/audaspace/include/sequence/Sequence.h b/extern/audaspace/include/sequence/Sequence.h index 7005171e2c8..de14fd9fa38 100644 --- a/extern/audaspace/include/sequence/Sequence.h +++ b/extern/audaspace/include/sequence/Sequence.h @@ -151,7 +151,7 @@ public: * \param skip How much seconds should be skipped at the beginning. * \return The entry added. */ - std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, float begin, float end, float skip); + std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, double begin, double end, double skip); /** * Removes an entry from the scene. diff --git a/extern/audaspace/include/sequence/SequenceData.h b/extern/audaspace/include/sequence/SequenceData.h index b3df0548a4d..c3380e66924 100644 --- a/extern/audaspace/include/sequence/SequenceData.h +++ b/extern/audaspace/include/sequence/SequenceData.h @@ -203,7 +203,7 @@ public: * \param skip How much seconds should be skipped at the beginning. * \return The entry added. */ - std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, float begin, float end, float skip); + std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, double begin, double end, double skip); /** * Removes an entry from the scene. diff --git a/extern/audaspace/include/sequence/SequenceEntry.h b/extern/audaspace/include/sequence/SequenceEntry.h index 98f15faf7ff..b8e9f116ee4 100644 --- a/extern/audaspace/include/sequence/SequenceEntry.h +++ b/extern/audaspace/include/sequence/SequenceEntry.h @@ -55,13 +55,13 @@ private: std::shared_ptr<ISound> m_sound; /// The begin time. - float m_begin; + double m_begin; /// The end time. - float m_end; + double m_end; /// How many seconds are skipped at the beginning. - float m_skip; + double m_skip; /// Whether the entry is muted. bool m_muted; @@ -124,7 +124,7 @@ public: * \param skip How much seconds should be skipped at the beginning. * \param id The ID of the entry. */ - SequenceEntry(std::shared_ptr<ISound> sound, float begin, float end, float skip, int id); + SequenceEntry(std::shared_ptr<ISound> sound, double begin, double end, double skip, int id); virtual ~SequenceEntry(); /** @@ -155,7 +155,7 @@ public: * \param end The new end time or a negative value if unknown. * \param skip How many seconds to skip at the beginning. */ - void move(float begin, float end, float skip); + void move(double begin, double end, double skip); /** * Retrieves the muting state of the entry. |