diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-07-28 13:36:03 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-07-28 13:36:03 +0400 |
commit | 7296600434c49b40215ba842af73a8b1517e12eb (patch) | |
tree | ba41a61f147073c91cf370c1f470b7c519397766 /intern/audaspace/FX/AUD_SuperposeReader.h | |
parent | 3e3f874a65e9c20353fdc26a20a2f5da9b41e90e (diff) |
Audaspace: HUGE Refactor.
Some points of the refactor not sorted by importance:
* Fixed immutability of readers and factories (there are exceptions...)
* Fixed copy constructors and = operators
* Removed messaging system
* Removed reader types
* Added const where possible
* Using initalisers when possible
* Avoided use of pointers when possible
* Removed AUD_NEW and AUD_DELETE macros
* Removed useless NULL pointer checks
* Fixed exception catching
* Fixed some yet unknown bugs
* Lots of other stuff
Diffstat (limited to 'intern/audaspace/FX/AUD_SuperposeReader.h')
-rw-r--r-- | intern/audaspace/FX/AUD_SuperposeReader.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/intern/audaspace/FX/AUD_SuperposeReader.h b/intern/audaspace/FX/AUD_SuperposeReader.h index 71392b1133b..eeceb9adfeb 100644 --- a/intern/audaspace/FX/AUD_SuperposeReader.h +++ b/intern/audaspace/FX/AUD_SuperposeReader.h @@ -27,7 +27,7 @@ #define AUD_SUPERPOSEREADER #include "AUD_IReader.h" -class AUD_Buffer; +#include "AUD_Buffer.h" /** * This reader plays two readers with the same specs sequently. @@ -48,15 +48,18 @@ private: /** * The playback buffer for the intersecting part. */ - AUD_Buffer* m_buffer; + AUD_Buffer m_buffer; + + // hide copy constructor and operator= + AUD_SuperposeReader(const AUD_SuperposeReader&); + AUD_SuperposeReader& operator=(const AUD_SuperposeReader&); public: /** * Creates a new superpose reader. * \param reader1 The first reader to read from. * \param reader2 The second reader to read from. - * \exception AUD_Exception Thrown if one of the reader specified is NULL - * or the specs from the readers differ. + * \exception AUD_Exception Thrown if the specs from the readers differ. */ AUD_SuperposeReader(AUD_IReader* reader1, AUD_IReader* reader2); @@ -65,13 +68,11 @@ public: */ virtual ~AUD_SuperposeReader(); - virtual bool isSeekable(); + virtual bool isSeekable() const; virtual void seek(int position); - virtual int getLength(); - virtual int getPosition(); - virtual AUD_Specs getSpecs(); - virtual AUD_ReaderType getType(); - virtual bool notify(AUD_Message &message); + virtual int getLength() const; + virtual int getPosition() const; + virtual AUD_Specs getSpecs() const; virtual void read(int & length, sample_t* & buffer); }; |