libdrmconf 0.15.0
A library to program DMR radios.
Loading...
Searching...
No Matches
melody_stream.hh
1#ifndef MELODY_STREAM_HH
2#define MELODY_STREAM_HH
3
4#include <QAudioFormat>
5#include <QBuffer>
6#include <QPointer>
7class Melody;
8
10class MelodyStream : public QBuffer
11{
12Q_OBJECT
13
14public:
16 explicit MelodyStream(QObject *parent = nullptr);
18 const QAudioFormat &audioFormat() const;
20 void setMelody(Melody *melody);
21
22protected slots:
23 void reload();
24
25protected:
26 QPointer<Melody> _melody;
27 QAudioFormat _format;
28 QByteArray _raw;
29};
30
31
32
33#endif //QDMR_MELODY_STREAM_HH
void setMelody(Melody *melody)
Sets the melody.
Definition melody_stream.cc:22
const QAudioFormat & audioFormat() const
Returns the audio format of the stream.
Definition melody_stream.cc:17
MelodyStream(QObject *parent=nullptr)
Default constructor.
Definition melody_stream.cc:7
A config item that encodes a melody.
Definition melody.hh:20