2
* $Id: AUD_LoopReader.h 26693 2010-02-07 23:41:17Z nexyon $
4
* ***** BEGIN LGPL LICENSE BLOCK *****
6
* Copyright 2009 Jörg Hermann Müller
2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* Copyright 2009-2011 Jörg Hermann Müller
8
6
* This file is part of AudaSpace.
10
* AudaSpace is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU Lesser General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
8
* Audaspace is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
13
11
* (at your option) any later version.
15
13
* AudaSpace is distributed in the hope that it will be useful,
16
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Lesser General Public License for more details.
20
* You should have received a copy of the GNU Lesser General Public License
21
* along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
23
* ***** END LGPL LICENSE BLOCK *****
26
#ifndef AUD_LOOPREADER
27
#define AUD_LOOPREADER
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with Audaspace; if not, write to the Free Software Foundation,
20
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
* ***** END GPL LICENSE BLOCK *****
25
/** \file audaspace/FX/AUD_LoopReader.h
30
#ifndef __AUD_LOOPREADER_H__
31
#define __AUD_LOOPREADER_H__
29
33
#include "AUD_EffectReader.h"
34
#include "AUD_Buffer.h"
33
37
* This class reads another reader and loops it.
57
60
* \param reader The reader to read from.
58
61
* \param loop The desired loop count, negative values result in endless
60
* \exception AUD_Exception Thrown if the reader specified is NULL.
62
AUD_LoopReader(AUD_IReader* reader, int loop);
65
* Destroys the reader.
67
virtual ~AUD_LoopReader();
69
virtual AUD_ReaderType getType();
70
virtual bool notify(AUD_Message &message);
71
virtual void read(int & length, sample_t* & buffer);
64
AUD_LoopReader(AUD_Reference<AUD_IReader> reader, int loop);
66
virtual void seek(int position);
67
virtual int getLength() const;
68
virtual int getPosition() const;
69
virtual void read(int& length, bool& eos, sample_t* buffer);
74
#endif //AUD_LOOPREADER
72
#endif //__AUD_LOOPREADER_H__