Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VACore
Commits
6ab9155c
Commit
6ab9155c
authored
Sep 04, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Updating headers for open source release
parent
14862022
Changes
113
Hide whitespace changes
Inline
Side-by-side
src/Audiosignals/VAAudioSignalSourceManager.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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>
...
...
src/Audiosignals/VAAudioSignalSourceManager.h
View file @
6ab9155c
#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
_VA
CORE
_AUDIOSIGNALSOURCEMANAGER
src/Audiosignals/VAAudiofileSignalSource.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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"
...
...
src/Audiosignals/VAAudiofileSignalSource.h
View file @
6ab9155c
#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
_VA
CORE
_AUDIOFILESIGNALSOURCE
src/Audiosignals/VADeviceInputSignalSource.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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>
...
...
src/Audiosignals/VADeviceInputSignalSource.h
View file @
6ab9155c
#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
_VA
CORE
_DEVICEINPUTSIGNALSOURCE
src/Audiosignals/VAEngineSignalSource.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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"
...
...
src/Audiosignals/VAEngineSignalSource.h
View file @
6ab9155c
#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
_VA
CORE
_ENGINESIGNALSOURCE
src/Audiosignals/VAMachineSignalSource.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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"
...
...
src/Audiosignals/VAMachineSignalSource.h
View file @
6ab9155c
#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
_VA
CORE
_MACHINE_SIGNAL_SOURCE
src/Audiosignals/VANetstreamSignalSource.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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>
...
...
src/Audiosignals/VANetstreamSignalSource.h
View file @
6ab9155c
#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
_VA
CORE
_NETSTREAMSIGNALSOURCE
src/Audiosignals/VANetworkStreamAudioSignalSource.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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>
...
...
src/Audiosignals/VASequencerSignalSource.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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"
...
...
src/Audiosignals/VASequencerSignalSource.h
View file @
6ab9155c
#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
_VA
CORE
_SEQUENCERSIGNALSOURCE
src/Audiosignals/VATextToSpeechSignalSource.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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"
...
...
src/Audiosignals/VATextToSpeechSignalSource.h
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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
...
...
src/Data/VADirectivity.h
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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
Techni
sche Ak
usti
k
(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
Institut
e of
Techni
cal Aco
usti
cs
(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
_VA
CORE
_DIRECTIVITY
#define
IW
_VA
CORE
_DIRECTIVITY
class
DAFFContentMS
;
// Alias fr Directivity-Content
typedef
DAFFContentMS
CVADirectivity
;
#endif //
_
_VA_DIRECTIVITY
__
#endif //
IW
_VA
CORE
_DIRECTIVITY
src/Data/VADirectivityManager.cpp
View file @
6ab9155c
/*
* --------------------------------------------------------------------------------------------
*
* 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
);
}