Phonon

audiodataoutput.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2005 Matthias Kretz <kretz@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) version 3, or any
8 later version accepted by the membership of KDE e.V. (or its
9 successor approved by the membership of KDE e.V.), Nokia Corporation
10 (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 act as a proxy defined in Section 6 of version 3 of the license.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21*/
22
23#include "audiodataoutput.h"
24#include "audiodataoutput_p.h"
25#include "factory_p.h"
26
27#define PHONON_CLASSNAME AudioDataOutput
28
29namespace Phonon
30{
31
32PHONON_HEIR_IMPL(AbstractAudioOutput)
33
34PHONON_GETTER(int, dataSize, d->dataSize)
35PHONON_GETTER(int, sampleRate, -1)
36PHONON_SETTER(setDataSize, dataSize, int)
37
38bool AudioDataOutputPrivate::aboutToDeleteBackendObject()
39{
40 Q_ASSERT(m_backendObject);
41 pBACKEND_GET(int, dataSize, "dataSize");
42
43 return AbstractAudioOutputPrivate::aboutToDeleteBackendObject();
44}
45
46void AudioDataOutputPrivate::setupBackendObject()
47{
48 P_Q(AudioDataOutput);
49 Q_ASSERT(m_backendObject);
50 AbstractAudioOutputPrivate::setupBackendObject();
51
52 // set up attributes
53 pBACKEND_CALL1("setDataSize", int, dataSize);
54
55 qRegisterMetaType<QMap<Phonon::AudioDataOutput::Channel, QVector<qint16> > >("QMap<Phonon::AudioDataOutput::Channel, QVector<qint16> >");
56
57 QObject::connect(m_backendObject,
60 QObject::connect(m_backendObject, SIGNAL(endOfMedia(int)), q, SIGNAL(endOfMedia(int)));
61}
62
63} // namespace Phonon
64
65#undef PHONON_CLASSNAME
66// vim: sw=4 ts=4 tw=80
Channel
Specifies the channel the audio data belongs to.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.