Files
pilotclient/src/blackcore/audio_mixer_vatlib.cpp
Roland Winklmeier 8812f3ba28 refs #372 Add audio mixer interface and vatlib implementation
This class is an audio router. In order to route audio connect a
producer to an input port and a consumer to an output port. The
connection is later established by making the mixer connection
between an input and an output port.
2015-03-20 16:32:19 +01:00

35 lines
1.2 KiB
C++

/* Copyright (C) 2014
* 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 and at http://www.swift-project.org/license.html. 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.
*/
#include "audio_mixer_vatlib.h"
namespace BlackCore
{
CAudioMixerVatlib::CAudioMixerVatlib(QObject *parent)
: IAudioMixer(parent)
{
m_audioMixer.reset(Vat_CreateAudioMixer());
}
void CAudioMixerVatlib::makeMixerConnection(InputPort inputPort, OutputPort outputPort)
{
Vat_MakeMixerConnection(m_audioMixer.data(), inputPort, outputPort, true);
}
void CAudioMixerVatlib::removeMixerConnection(InputPort inputPort, OutputPort outputPort)
{
Vat_MakeMixerConnection(m_audioMixer.data(), inputPort, outputPort, false);
}
bool CAudioMixerVatlib::hasMixerConnection(InputPort inputPort, OutputPort outputPort)
{
return Vat_HasMixerConnection(m_audioMixer.data(), inputPort, outputPort);
}
}