diff options
author | be_ <be.0@gmx.com> | 2017-06-20 14:32:35 -0500 |
---|---|---|
committer | be_ <be.0@gmx.com> | 2017-06-21 14:24:48 -0500 |
commit | da3702c603f04b4c8de4c55d1dfbf6eaabe3d7d5 (patch) | |
tree | 79ae940ec704c1fe037e225b628d468e3da87835 /src/engine/sidechain/enginesidechain.h | |
parent | f61908e240b4c75621cfb030757eae0e7a3b8e71 (diff) |
add a record/broadcast input
so users do not have to use external programs like Audacity and BUTT
when using external mixers
Diffstat (limited to 'src/engine/sidechain/enginesidechain.h')
-rw-r--r-- | src/engine/sidechain/enginesidechain.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/engine/sidechain/enginesidechain.h b/src/engine/sidechain/enginesidechain.h index 72904b3a94..8497c07d91 100644 --- a/src/engine/sidechain/enginesidechain.h +++ b/src/engine/sidechain/enginesidechain.h @@ -24,11 +24,12 @@ #include "preferences/usersettings.h" #include "engine/sidechain/sidechainworker.h" +#include "soundio/soundmanagerutil.h" #include "util/fifo.h" #include "util/mutex.h" #include "util/types.h" -class EngineSideChain : public QThread { +class EngineSideChain : public QThread, public AudioDestination { Q_OBJECT public: EngineSideChain(UserSettingsPointer pConfig); @@ -37,13 +38,19 @@ class EngineSideChain : public QThread { // Not thread-safe, wait-free. Submit buffer of samples to the sidechain for // processing. Should only be called from a single writer thread (typically // the engine callback). - void writeSamples(const CSAMPLE* buffer, int buffer_size); + void writeSamples(const CSAMPLE* pBuffer, int iFrames); + + // Thin wrapper around writeSamples that is used by SoundManager when receiving + // from a sound card input instead of the engine + void receiveBuffer(AudioInput input, + const CSAMPLE* pBuffer, + unsigned int iFrames) override; // Thread-safe, blocking. void addSideChainWorker(SideChainWorker* pWorker); private: - void run(); + void run() override; UserSettingsPointer m_pConfig; // Indicates that the thread should exit. |