mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +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.
42 lines
1.2 KiB
C++
42 lines
1.2 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 MIXINGSAMPLEPROVIDER_H
|
|
#define MIXINGSAMPLEPROVIDER_H
|
|
|
|
#include "blacksound/blacksoundexport.h"
|
|
#include "blacksound/sampleprovider/sampleprovider.h"
|
|
#include <QSharedPointer>
|
|
#include <QVector>
|
|
|
|
namespace BlackSound
|
|
{
|
|
namespace SampleProvider
|
|
{
|
|
//! Mixer
|
|
class BLACKSOUND_EXPORT CMixingSampleProvider : public ISampleProvider
|
|
{
|
|
public:
|
|
CMixingSampleProvider(QObject *parent = nullptr) : ISampleProvider(parent) {}
|
|
|
|
//! Add a provider
|
|
void addMixerInput(ISampleProvider *provider) { m_sources.append(provider); }
|
|
|
|
//! \copydoc ISampleProvider::readSamples
|
|
virtual int readSamples(QVector<float> &samples, qint64 count) override;
|
|
|
|
private:
|
|
QVector<ISampleProvider *> m_sources;
|
|
};
|
|
} // ns
|
|
} // ns
|
|
|
|
#endif // guard
|