mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
32 bit float is what is used in C# reference and has a much higher dynamic range. 16 bit integer was clipping very often with all the VHF simulation applied.
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
/* Copyright (C) 2019
|
|
* swift project Community / Contributors
|
|
*
|
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
|
* directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated,
|
|
* or distributed except according to the terms contained in the LICENSE file.
|
|
*/
|
|
|
|
//! \file
|
|
|
|
#ifndef BLACKSOUND_SAMPLEPROVIDER_H
|
|
#define BLACKSOUND_SAMPLEPROVIDER_H
|
|
|
|
#include "blacksound/blacksoundexport.h"
|
|
#include <QObject>
|
|
#include <QVector>
|
|
|
|
namespace BlackSound
|
|
{
|
|
namespace SampleProvider
|
|
{
|
|
//! Sample provider interface
|
|
class BLACKSOUND_EXPORT ISampleProvider : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
//! Ctor
|
|
ISampleProvider(QObject *parent = nullptr) : QObject(parent) {}
|
|
|
|
//! Dtor
|
|
virtual ~ISampleProvider() override {}
|
|
|
|
//! Read samples
|
|
virtual int readSamples(QVector<float> &samples, qint64 count) = 0;
|
|
|
|
//! Finished?
|
|
virtual bool isFinished() const { return false; }
|
|
};
|
|
} // ns
|
|
} // ns
|
|
|
|
#endif // guard
|