Commit ccf262da authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Implementing proper backend switching for audio drivers ASIO and Portaudio...

Implementing proper backend switching for audio drivers ASIO and Portaudio (required for Linux compat)
parent 289383f0
......@@ -223,6 +223,16 @@ add_definitions( "-DVACORE_DEFAULT_CONFIGFILE=\"${ITA_VACORE_DEFAULT_CONFIG_FILE
add_definitions( "-DVACORE_MAX_NUM_SOURCES=${ITA_VACORE_MAX_NUM_SOURCES}" )
add_definitions( "-DVACORE_MAX_NUM_LISTENERS=${ITA_VACORE_MAX_NUM_LISTENERS}" )
if( ITA_VACORE_WITH_AUDIO_BACKEND_ASIO )
add_definitions( -DVACORE_WITH_AUDIO_BACKEND_ASIO )
endif( )
if( ITA_VACORE_WITH_AUDIO_BACKEND_PORTAUDIO )
#add_definitions( -DVACORE_WITH_AUDIO_BACKEND_PORTAUDIO )
endif( )
if( ITA_VACORE_WITH_AUDIO_BACKEND_DUMMY )
add_definitions( -DVACORE_WITH_AUDIO_BACKEND_DUMMY )
endif( )
# Rendering definitions
if( ${ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER} )
add_definitions( "-DVACORE_WITH_RENDERER_AMBIENT_MIXER=1" )
......
......@@ -3,7 +3,9 @@
#include <ITAException.h>
#include <ITAStringUtils.h>
#ifdef VACORE_WITH_AUDIO_BACKEND_ASIO
#include "VAASIOBackend.h"
#endif
//// Singleton mittels statischer Instanz
//static CVAAudioDriverArchBackendRegistry theRegistry;
......
......@@ -979,11 +979,11 @@ CVABinauralArtificialReverbAudioRenderer::Listener* CVABinauralArtificialReverbA
pListener->pConvolverL = new DSMBCConvolver( GetBlocklength(), m_iMaxReverbFilterLengthSamples );
pListener->pConvolverL->setFilterExchangeMode(DSMBCConvolver::CROSSFADE_COSINE_SQUARE);
pListener->pConvolverL->setFilterCrossfadeLength( std::min( int( GetBlocklength() ), 32 ) );
pListener->pConvolverL->setFilterCrossfadeLength( (std::min)( int( GetBlocklength() ), 32 ) );
pListener->pConvolverR = new DSMBCConvolver( GetBlocklength(), m_iMaxReverbFilterLengthSamples );
pListener->pConvolverR->setFilterExchangeMode(DSMBCConvolver::CROSSFADE_COSINE_SQUARE);
pListener->pConvolverR->setFilterCrossfadeLength( std::min( int( GetBlocklength() ), 32 ) );
pListener->pConvolverR->setFilterCrossfadeLength( (std::min)( int( GetBlocklength() ), 32 ) );
assert( pListener->pData );
pListener->bDeleted = false;
......
......@@ -26,8 +26,6 @@
#include "Audiosignals/VAMachineSignalSource.h"
#include "Audiosignals/VASequencerSignalSource.h"
#include "Data/VAHRIRManager.h"
#include "Drivers/Audio/VAASIOBackend.h"
#include "Drivers/Audio/VAPortaudioBackend.h"
#include "Rendering/VAAudioRenderer.h"
#include "Rendering/VAAudioRendererRegistry.h"
#include "Reproduction/VAAudioReproductionModule.h"
......@@ -46,6 +44,15 @@
#include "VACoreThread.h"
#include "VASourceListenerMetrics.h"
#include "Drivers/Audio/VAAudioDriverBackend.h"
#ifdef VACORE_WITH_AUDIO_BACKEND_ASIO
#include "Drivers/Audio/VAASIOBackend.h"
#endif
#ifdef VACORE_WITH_AUDIO_BACKEND_PORTAUDIO
#include "Drivers/Audio/VAPortaudioBackend.h"
#endif
// ITA includes
#include <ITAASCIITable.h>
#include <ITAClock.h>
......@@ -3960,11 +3967,20 @@ void CVACoreImpl::PrintSceneState() {
void CVACoreImpl::InitializeAudioDriver()
{
//#ifdef VACORE_WITH_AUDIO_BACKEND_ASIO
if( m_oCoreConfig.oAudioDriverConfig.sDriver == "ASIO" )
m_pAudioDriverBackend = new CVAASIOBackend( &m_oCoreConfig.oAudioDriverConfig );
else if( m_oCoreConfig.oAudioDriverConfig.sDriver == "Portaudio" )
//#endif
#ifdef VACORE_WITH_AUDIO_BACKEND_PORTAUDIO
if( m_oCoreConfig.oAudioDriverConfig.sDriver == "Portaudio" )
m_pAudioDriverBackend = new CVAPortaudioBackend( &m_oCoreConfig.oAudioDriverConfig );
else
#endif
#ifdef VACORE_WITH_AUDIO_BACKEND_DUMMY
if( m_oCoreConfig.oAudioDriverConfig.sDriver == "Dummy" )
m_pAudioDriverBackend = new CVADummyBackend( &m_oCoreConfig.oAudioDriverConfig );
#endif
if( m_pAudioDriverBackend == nullptr )
VA_ERROR( "Core", "Unkown audio driver backend '" << m_oCoreConfig.oAudioDriverConfig.sDriver << "'" );
try
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment