4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * Copyright 2009-2011 Jörg Hermann Müller
8 * 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 General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * AudaSpace is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with Audaspace; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 * ***** END GPL LICENSE BLOCK *****
27 /** \file audaspace/FX/AUD_FaderReader.h
32 #ifndef AUD_FADERREADER
33 #define AUD_FADERREADER
35 #include "AUD_EffectReader.h"
36 #include "AUD_Buffer.h"
39 * This class fades another reader.
40 * If the fading type is AUD_FADE_IN, everything before the fading start will be
41 * silenced, for AUD_FADE_OUT that's true for everything after fading ends.
43 class AUD_FaderReader : public AUD_EffectReader
49 const AUD_FadeType m_type;
61 // hide copy constructor and operator=
62 AUD_FaderReader(const AUD_FaderReader&);
63 AUD_FaderReader& operator=(const AUD_FaderReader&);
67 * Creates a new fader reader.
68 * \param type The fading type.
69 * \param start The time where fading should start in seconds.
70 * \param length How long fading should last in seconds.
72 AUD_FaderReader(AUD_Reference<AUD_IReader> reader, AUD_FadeType type,
73 float start,float length);
75 virtual void read(int& length, bool& eos, sample_t* buffer);
78 #endif //AUD_FADERREADER