Sayonara Player
src
Interfaces
Engine
AudioDataReceiverInterface.h
1
/* RawSoundReceiver.h */
2
3
/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4
*
5
* This file is part of sayonara player
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef RAWSOUNDRECEIVER_H
22
#define RAWSOUNDRECEIVER_H
23
24
#include "Utils/typedefs.h"
25
26
#include <vector>
27
28
class
QByteArray;
29
30
namespace
Engine
31
{
32
using
SpectrumList=std::vector<float>;
33
38
class
LevelReceiver
39
{
40
public
:
41
virtual
void
setLevel(
float
left,
float
right)=0;
42
virtual
bool
isActive()
const
=0;
43
44
LevelReceiver
();
45
virtual
~
LevelReceiver
();
46
};
47
52
class
SpectrumReceiver
53
{
54
public
:
55
SpectrumReceiver
();
56
virtual
~
SpectrumReceiver
();
57
58
virtual
void
setSpectrum(
const
SpectrumList& spectrum)=0;
59
virtual
bool
isActive()
const
=0;
60
};
61
66
class
RawSoundReceiverInterface
67
{
68
public
:
69
RawSoundReceiverInterface
();
70
virtual
~
RawSoundReceiverInterface
();
71
77
virtual
void
writeAudioData
(
const
QByteArray& data)=0;
78
};
79
}
80
81
#endif // RAWSOUNDRECEIVER_H
Engine::RawSoundReceiverInterface
The RawSoundReceiver interface.
Definition:
AudioDataReceiverInterface.h:67
Engine::RawSoundReceiverInterface::writeAudioData
virtual void writeAudioData(const QByteArray &data)=0
triggered when new audio data is available, has to be reimplentend
Engine::LevelReceiver
The LevelReceiver class.
Definition:
AudioDataReceiverInterface.h:39
Engine::SpectrumReceiver
The SpectrumReceiver class.
Definition:
AudioDataReceiverInterface.h:53
Generated on Wed Jan 6 2021 00:00:00 for Sayonara Player by
1.8.20