Classified ads
audiodecoder.h
Go to the documentation of this file.
1 /* -*-C++-*- -*-coding: utf-8-unix;-*-
2  Classified Ads is Copyright (c) Antti Järvinen 2015.
3 
4  This file is part of Classified Ads.
5 
6  Classified Ads is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  Classified Ads is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with Classified Ads; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #ifndef AUDIO_DECODER_H
22 #define AUDIO_DECODER_H
23 
24 #include <QObject>
25 #include <opus/opus.h> // for data types
26 
32 class AudioDecoder : public QObject {
33  Q_OBJECT
34 
35 public:
39  AudioDecoder(quint32 aSampleRate = 8000,
40  quint32 aNumChannels = 1 ) ;
41  ~AudioDecoder() ;
42 
43 signals:
53 void frameDecoded(quint32 aCallId,
54  quint32 aSeqNo,
55  const QByteArray& aEncodedData) ;
56 public slots:
60 void frameReceived(quint32 aCallId,
61  quint32 aSeqNo,
62  const QByteArray& aAudioData) ;
63 private: // members
64  OpusDecoder* iDecoder ;
65  QByteArray iDecodedData ;
66  const quint32 iNumChannels ;
67  const quint32 iSampleRate ;
68 } ;
69 #endif
class for de-compressing audio received from network
Definition: audiodecoder.h:32
AudioDecoder(quint32 aSampleRate=8000, quint32 aNumChannels=1)
void frameDecoded(quint32 aCallId, quint32 aSeqNo, const QByteArray &aEncodedData)
void frameReceived(quint32 aCallId, quint32 aSeqNo, const QByteArray &aAudioData)
const quint32 iNumChannels
Definition: audiodecoder.h:66
OpusDecoder * iDecoder
Definition: audiodecoder.h:64
const quint32 iSampleRate
Definition: audiodecoder.h:67
QByteArray iDecodedData
Definition: audiodecoder.h:65