swift
sampleprovider.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_SOUND_SAMPLEPROVIDER_H
7 #define SWIFT_SOUND_SAMPLEPROVIDER_H
8 
9 #include <QObject>
10 #include <QVector>
11 
12 #include "config/buildconfig.h"
13 #include "sound/swiftsoundexport.h"
14 
15 namespace swift::sound::sample_provider
16 {
18  class SWIFT_SOUND_EXPORT ISampleProvider : public QObject
19  {
20  Q_OBJECT
21 
22  public:
24  ISampleProvider(QObject *parent = nullptr) : QObject(parent) {}
25 
27  virtual ~ISampleProvider() override {}
28 
30  virtual int readSamples(QVector<float> &samples, qint64 count) = 0;
31 
33  virtual bool isFinished() const { return false; }
34 
35  protected:
38  };
39 
40 } // namespace swift::sound::sample_provider
41 
42 #endif // SWIFT_SOUND_SAMPLEPROVIDER_H
static bool isLocalDeveloperDebugBuild()
Local build for developers.
ISampleProvider(QObject *parent=nullptr)
Ctor.
virtual bool isFinished() const
Finished?
virtual int readSamples(QVector< float > &samples, qint64 count)=0
Read samples.
#define SWIFT_SOUND_EXPORT
Export a class or function from the library.