1 /*******************************************************************************
2 * Copyright 2009-2016 Jörg Müller
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 ******************************************************************************/
16
17 #include "fx/Fader.h"
18
19 AUD_NAMESPACE_BEGIN
20
Fader(std::shared_ptr<ISound> sound,FadeType type,double start,double length)21 Fader::Fader(std::shared_ptr<ISound> sound, FadeType type, double start, double length) :
22 Effect(sound),
23 m_type(type),
24 m_start(start),
25 m_length(length)
26 {
27 }
28
getType() const29 FadeType Fader::getType() const
30 {
31 return m_type;
32 }
33
getStart() const34 double Fader::getStart() const
35 {
36 return m_start;
37 }
38
getLength() const39 double Fader::getLength() const
40 {
41 return m_length;
42 }
43
createReader()44 std::shared_ptr<IReader> Fader::createReader()
45 {
46 return std::shared_ptr<IReader>(new FaderReader(getReader(), m_type, m_start, m_length));
47 }
48
49 AUD_NAMESPACE_END
50