00001 /* This file is part of the KDE project 00002 Copyright (C) 2005-2006 Matthias Kretz <kretz@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) version 3, or any 00008 later version accepted by the membership of KDE e.V. (or its 00009 successor approved by the membership of KDE e.V.), Nokia Corporation 00010 (or its successors, if any) and the KDE Free Qt Foundation, which shall 00011 act as a proxy defined in Section 6 of version 3 of the license. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00020 00021 */ 00022 #ifndef Phonon_AUDIODATAOUTPUT_H 00023 #define Phonon_AUDIODATAOUTPUT_H 00024 00025 #include "phonon_export.h" 00026 #include "abstractaudiooutput.h" 00027 #include "phonondefs.h" 00028 00029 QT_BEGIN_HEADER 00030 QT_BEGIN_NAMESPACE 00031 00032 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00033 template<typename T> class QVector; 00034 template<typename Key, typename T> class QMap; 00035 #endif 00036 00037 namespace Phonon 00038 { 00039 class AudioDataOutputPrivate; 00040 00052 class PHONON_EXPORT AudioDataOutput : public AbstractAudioOutput 00053 { 00054 Q_OBJECT 00055 K_DECLARE_PRIVATE(AudioDataOutput) 00056 Q_ENUMS(Channel) 00057 Q_PROPERTY(int dataSize READ dataSize WRITE setDataSize) 00058 PHONON_HEIR(AudioDataOutput) 00059 public: 00063 enum Channel 00064 { 00065 LeftChannel, 00066 RightChannel, 00067 CenterChannel, 00068 LeftSurroundChannel, 00069 RightSurroundChannel, 00070 SubwooferChannel 00071 }; 00072 00079 int dataSize() const; 00080 00092 int sampleRate() const; 00093 00094 public Q_SLOTS: 00102 void setDataSize(int size); 00103 00104 Q_SIGNALS: 00110 void dataReady(const QMap<Phonon::AudioDataOutput::Channel, QVector<qint16> > &data); 00111 00112 00127 void endOfMedia(int remainingSamples); 00128 }; 00129 } // namespace Phonon 00130 00131 QT_END_NAMESPACE 00132 QT_END_HEADER 00133 00134 // vim: sw=4 ts=4 tw=80 00135 #endif // Phonon_AUDIODATAOUTPUT_H