Files
pilotclient/src/blacksound/sampleprovider/mixingsampleprovider.h
Roland Rossgotterer 240df93406 [AFV] Change output format and processing to 32 bit float
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.
2019-10-11 19:00:29 +01:00

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