1
/* This file is part of the KDE project.
3
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
5
This library is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 2.1 or 3 of the License.
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU Lesser General Public License for more details.
14
You should have received a copy of the GNU Lesser General Public License
15
along with this library. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef Phonon_QT7_AUDIOMIXER_H
19
#define Phonon_QT7_AUDIOMIXER_H
21
#include <QtCore/QObject>
22
#include <QtCore/QTime>
23
#include <QtCore/QEvent>
24
#include <phonon/effectinterface.h>
25
#include <phonon/effectparameter.h>
26
#include <phonon/volumefaderinterface.h>
27
#include "medianode.h"
28
#include "audionode.h"
36
class AudioMixerAudioNode : public AudioNode
39
AudioMixerAudioNode();
40
void setVolume(float volume, int bus = 0);
41
float volume(int bus = 0);
44
ComponentDescription getAudioNodeDescription() const;
45
void initializeAudioUnit();
48
friend class AudioMixer;
53
class AudioMixer : public MediaNode, Phonon::EffectInterface, Phonon::VolumeFaderInterface
56
Q_INTERFACES(Phonon::EffectInterface Phonon::VolumeFaderInterface)
59
AudioMixer(QObject *parent = 0);
61
AudioMixerAudioNode *m_audioNode;
62
Phonon::VolumeFaderEffect::FadeCurve m_fadeCurve;
67
float m_fadeFromVolume;
68
QTime m_fadeStartTime;
71
QList<Phonon::EffectParameter> parameters() const;
72
QVariant parameterValue(const Phonon::EffectParameter ¶meter) const;
73
void setParameterValue(const Phonon::EffectParameter ¶meter, const QVariant &newValue);
75
// VolumeFaderInterface:
77
void setVolume(float volume);
78
Phonon::VolumeFaderEffect::FadeCurve fadeCurve() const;
79
void setFadeCurve(Phonon::VolumeFaderEffect::FadeCurve fadeCurve);
80
void fadeTo(float volume, int fadeTime);
84
bool event(QEvent *event);
87
}} //namespace Phonon::QT7
91
#endif // Phonon_QT7_AUDIOMIXER_H