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

Updating headers for open source release

parent 14862022
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VAAudioSignalSourceManager.h"
#include <VAAudioSignalSource.h>
......
#ifndef __VA_AUDIOSIGNALSOURCEMANAGER_H__
#define __VA_AUDIOSIGNALSOURCEMANAGER_H__
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_AUDIOSIGNALSOURCEMANAGER
#define IW_VACORE_AUDIOSIGNALSOURCEMANAGER
#include "../Drivers/Audio/VAAudioDriverConfig.h"
#include <VACoreDefinitions.h>
......@@ -181,4 +194,4 @@ private:
void SyncSignalSources();
};
#endif // __VA_AUDIOSIGNALSOURCEMANAGER_H__
#endif // IW_VACORE_AUDIOSIGNALSOURCEMANAGER
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VAAudiofileSignalSource.h"
#include "../VAAudiostreamTracker.h"
......
#ifndef __VA_AUDIOFILESIGNALSOURCE_H__
#define __VA_AUDIOFILESIGNALSOURCE_H__
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_AUDIOFILESIGNALSOURCE
#define IW_VACORE_AUDIOFILESIGNALSOURCE
#include <VAAudioSignalSource.h>
......@@ -55,4 +68,4 @@ private:
void HandleUnregistration( IVACore* pParentCore );
};
#endif // __VA_AUDIOFILESIGNALSOURCE_H__
#endif // IW_VACORE_AUDIOFILESIGNALSOURCE
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VADeviceInputSignalSource.h"
#include <ITASampleBuffer.h>
......
#ifndef __VA_DEVICEINPUTSIGNALSOURCE_H__
#define __VA_DEVICEINPUTSIGNALSOURCE_H__
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_DEVICEINPUTSIGNALSOURCE
#define IW_VACORE_DEVICEINPUTSIGNALSOURCE
#include <VAAudioSignalSource.h>
#include <string>
......@@ -38,4 +51,4 @@ private:
void HandleUnregistration(IVACore* pParentCore);
};
#endif // __VA_DEVICEINPUTSIGNALSOURCE_H__
#endif // IW_VACORE_DEVICEINPUTSIGNALSOURCE
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VAEngineSignalSource.h"
#include "../VACoreImpl.h"
......
#ifndef __VA_ENGINESIGNALSOURCE_H__
#define __VA_ENGINESIGNALSOURCE_H__
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_ENGINESIGNALSOURCE
#define IW_VACORE_ENGINESIGNALSOURCE
#include <VAAudioSignalSource.h>
#include <VAObject.h>
......@@ -52,4 +65,4 @@ private:
ITAAtomicFloat m_fK; // engine number
};
#endif // __VA_ENGINESIGNALSOURCE_H__
#endif // IW_VACORE_ENGINESIGNALSOURCE
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VAMachineSignalSource.h"
#include "../VAAudiostreamTracker.h"
......
#ifndef __VA_MACHINE_SIGNAL_SOURCE_H__
#define __VA_MACHINE_SIGNAL_SOURCE_H__
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_MACHINE_SIGNAL_SOURCE
#define IW_VACORE_MACHINE_SIGNAL_SOURCE
#include <VAAudioSignalSource.h>
#include <VAObject.h>
......@@ -155,4 +168,4 @@ private:
void ResetReadCursors();
};
#endif // __VA_MACHINE_SIGNAL_SOURCE_H__
#endif // IW_VACORE_MACHINE_SIGNAL_SOURCE
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VANetstreamSignalSource.h"
#include <VAException.h>
......
#ifndef __VA_NETSTREAMSIGNALSOURCE_H__
#define __VA_NETSTREAMSIGNALSOURCE_H__
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_NETSTREAMSIGNALSOURCE
#define IW_VACORE_NETSTREAMSIGNALSOURCE
#include "VAAudioSignalSource.h"
#include <string>
......@@ -49,4 +62,4 @@ private:
void HandleUnregistration( IVACore* pParentCore );
};
#endif // __VA_NETSTREAMSIGNALSOURCE_H__
#endif // IW_VACORE_NETSTREAMSIGNALSOURCE
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include <VANetworkStreamAudioSignalSource.h>
#include <VistaInterProcComm/Connections/VistaConnectionIP.h>
#include <VistaInterProcComm/IPNet/VistaTCPServer.h>
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VASequencerSignalSource.h"
#include "../VAAudiostreamTracker.h"
......
#ifndef __VA_SEQUENCERSIGNALSOURCE_H__
#define __VA_SEQUENCERSIGNALSOURCE_H__
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_SEQUENCERSIGNALSOURCE
#define IW_VACORE_SEQUENCERSIGNALSOURCE
#include <VAAudioSignalSource.h>
#include <string>
......@@ -43,4 +56,4 @@ private:
void HandleUnregistration(IVACore* pParentCore);
};
#endif // __VA_SEQUENCERSIGNALSOURCE_H__
#endif // IW_VACORE_SEQUENCERSIGNALSOURCE
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VATextToSpeechSignalSource.h"
#include "../VAAudiostreamTracker.h"
#include "../VACoreImpl.h"
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VA_TEXT_TO_SPEECH_SIGNAL_SOURCE
#define IW_VA_TEXT_TO_SPEECH_SIGNAL_SOURCE
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institut fr Technische Akustik (ITA)
* VVVV AAA RWTH Aachen (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* ---------------------------------------------------------------------------------
*
* Datei: VADirectivity.h
*
* Zweck: Schnittstelle fr Directivity-Datenstze
*
* Autor(en): Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
* --------------------------------------------------------------------------------------------
*/
// $Id: VAHRIRDataset.h 2773 2012-07-02 08:29:37Z fwefers $
#ifndef __VA_DIRECTIVITY__
#define __VA_DIRECTIVITY__
#ifndef IW_VACORE_DIRECTIVITY
#define IW_VACORE_DIRECTIVITY
class DAFFContentMS;
// Alias fr Directivity-Content
typedef DAFFContentMS CVADirectivity;
#endif // __VA_DIRECTIVITY__
#endif // IW_VACORE_DIRECTIVITY
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VADirectivityManager.h"
#include "../VALog.h"
......@@ -13,21 +26,24 @@
#include <algorithm>
CVADirectivityManager::CVADirectivityManager() {
CVADirectivityManager::CVADirectivityManager()
{
}
CVADirectivityManager::~CVADirectivityManager() {
CVADirectivityManager::~CVADirectivityManager()
{
}
}
void CVADirectivityManager::Initialize()
{
void CVADirectivityManager::Initialize() {
}
void CVADirectivityManager::Finalize()
{
for( CVAObjectContainer<CVADirectivity>::iterator it=m_ocDir.begin(); it!=m_ocDir.end(); ++it )
for( CVAObjectContainer<CVADirectivity>::iterator it = m_ocDir.begin(); it != m_ocDir.end(); ++it )
{
CVADirectivity* pDir( it->second );
DAFFReader* pReader = pDir->getParent();
......@@ -37,25 +53,28 @@ void CVADirectivityManager::Finalize()
void CVADirectivityManager::Reset() {
// Alle Richtcharakteristiken freigeben
for (CVAObjectContainer<CVADirectivity>::iterator it=m_ocDir.begin(); it!=m_ocDir.end(); ++it) {
for( CVAObjectContainer<CVADirectivity>::iterator it = m_ocDir.begin(); it != m_ocDir.end(); ++it )
{
delete it->second->getParent();
}
m_ocDir.Clear();
}
int CVADirectivityManager::LoadDirectivity(const std::string& sFilename, const std::string& sName) {
std::string s = correctPath(sFilename);
int iDirID=0;
int CVADirectivityManager::LoadDirectivity( const std::string& sFilename, const std::string& sName )
{
std::string s = correctPath( sFilename );
int iDirID = 0;
// TODO: Log-Level
VA_VERBOSE("DirMan", "LoadDirectivity(\"" << s << "\", \"" << sName << "\")");
VA_VERBOSE( "DirMan", "LoadDirectivity(\"" << s << "\", \"" << sName << "\")" );
// Zunchst prfen ob diese Datenbank schon geladen wurde
for (CVAObjectContainer<CVADirectivity>::const_iterator cit=m_ocDir.begin(); cit!=m_ocDir.end(); ++cit) {
if (cit->second->getParent()->getFilename() == s) {
for( CVAObjectContainer<CVADirectivity>::const_iterator cit = m_ocDir.begin(); cit != m_ocDir.end(); ++cit )
{
if( cit->second->getParent()->getFilename() == s ) {
iDirID = cit->first;
m_csDir.leave();
VA_VERBOSE("DirMan", "LoadDirectivity successful, directivity already loaded ID " << iDirID);
VA_VERBOSE( "DirMan", "LoadDirectivity successful, directivity already loaded ID " << iDirID );
return iDirID;
}
}
......@@ -63,116 +82,131 @@ int CVADirectivityManager::LoadDirectivity(const std::string& sFilename, const s
DAFFReader* pReader = DAFFReader::create();
DAFFContentMS* pDir = nullptr;
try {
int ec = pReader->openFile(s);
if (ec != DAFF_NO_ERROR) {
try
{
int ec = pReader->openFile( s );
if( ec != DAFF_NO_ERROR )
{
delete pReader;
ITA_EXCEPT1(IO_ERROR, DAFFUtils::StrError(ec));
ITA_EXCEPT1( IO_ERROR, DAFFUtils::StrError( ec ) );
}
// Ensure third-octave magnitude responses (pedantic!)
if (pReader->getContentType() != DAFF_MAGNITUDE_SPECTRUM) {
if( pReader->getContentType() != DAFF_MAGNITUDE_SPECTRUM )
{
delete pReader;
ITA_EXCEPT1(INVALID_PARAMETER, "Directivity must be magnitude spectra in third-octave bands");
ITA_EXCEPT1( INVALID_PARAMETER, "Directivity must be magnitude spectra in third-octave bands" );
}
if (pReader->getProperties()->getNumberOfChannels() != 1) {
if( pReader->getProperties()->getNumberOfChannels() != 1 )
{
delete pReader;
ITA_EXCEPT1(INVALID_PARAMETER, "Directivity data must have one channel");
ITA_EXCEPT1( INVALID_PARAMETER, "Directivity data must have one channel" );
}
if (!pReader->getProperties()->coversFullSphere()) {
if( !pReader->getProperties()->coversFullSphere() )
{
delete pReader;
ITA_EXCEPT1(INVALID_PARAMETER, "Directivity data does not cover the full sphere");
ITA_EXCEPT1( INVALID_PARAMETER, "Directivity data does not cover the full sphere" );
}
pDir = dynamic_cast<DAFFContentMS*>( pReader->getContent() );
iDirID = m_ocDir.Add(pDir);
} catch (ITAException& e) {
VA_VERBOSE("DirMan", "LoadDirectivity failed (" << e << ")");
pDir = dynamic_cast< DAFFContentMS* >( pReader->getContent() );
iDirID = m_ocDir.Add( pDir );
}
catch( ITAException& e )
{
VA_VERBOSE( "DirMan", "LoadDirectivity failed (" << e << ")" );
throw;
} catch (...) {
VA_VERBOSE("DirMan", "LoadDirectivity failed due to an unknown error");
}
catch( ... )
{
VA_VERBOSE( "DirMan", "LoadDirectivity failed due to an unknown error" );
throw;
}
VA_VERBOSE("DirMan", "LoadDirectivity successful, assigned directivity ID " << iDirID);
VA_VERBOSE( "DirMan", "LoadDirectivity successful, assigned directivity ID " << iDirID );
return iDirID;
}
bool CVADirectivityManager::FreeDirectivity(int iDirID) {
VA_VERBOSE("DirMan", "FreeDirectivity(" << iDirID << ")");
bool CVADirectivityManager::FreeDirectivity( int iDirID )
{
VA_VERBOSE( "DirMan", "FreeDirectivity(" << iDirID << ")" );
// Prfen ob die ID gltig ist
int iRefCount = m_ocDir.GetRefCount(iDirID);
int iRefCount = m_ocDir.GetRefCount( iDirID );
if (iRefCount != 0) {
if( iRefCount != 0 )
{
// Noch Referenzen vorhanden oder ungltige ID (-1)
m_csDir.leave();
VA_VERBOSE("DirMan", "FreeDirectivity failed, directivity in use or invalid ID" << iDirID << ")");
VA_VERBOSE( "DirMan", "FreeDirectivity failed, directivity in use or invalid ID" << iDirID << ")" );
return false;
}
// Directivity lschen
DAFFContentMS* pDir = m_ocDir[iDirID];
DAFFContentMS* pDir = m_ocDir[ iDirID ];
delete pDir->getParent();
m_ocDir.Remove(iDirID);
m_ocDir.Remove( iDirID );
VA_VERBOSE("DirMan", "FreeDirectivity successful");
VA_VERBOSE( "DirMan", "FreeDirectivity successful" );
return true;
}
const CVADirectivity* CVADirectivityManager::RequestDirectivity(int iDirID) {
CVADirectivity* pDir = m_ocDir.Request(iDirID);
const CVADirectivity* CVADirectivityManager::RequestDirectivity( int iDirID )
{
CVADirectivity* pDir = m_ocDir.Request( iDirID );
return pDir;
}
int CVADirectivityManager::ReleaseDirectivity(int iDirID) {
int iRefCount = m_ocDir.Release(iDirID);
int CVADirectivityManager::ReleaseDirectivity( int iDirID )
{
int iRefCount = m_ocDir.Release( iDirID );
return iRefCount;
}
int CVADirectivityManager::GetDirectivityRefCount(int iDirID) const {
return m_ocDir.GetRefCount(iDirID);
int CVADirectivityManager::GetDirectivityRefCount( int iDirID ) const
{
return m_ocDir.GetRefCount( iDirID );
}