Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VANet
Commits
1c2cce19
Commit
1c2cce19
authored
Nov 25, 2016
by
Dipl.-Ing. Jonas Stienen
Browse files
Implementing API changes
parent
03ee8864
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/VANetClientImpl.cpp
View file @
1c2cce19
...
...
@@ -1073,11 +1073,11 @@ public:
* | | *
* +----------------------------------------------------------+ */
virtual
void
GetRenderingModules
(
std
::
vector
<
CVAAudioRender
ingModul
eInfo
>&
voRenderer
)
const
virtual
void
GetRenderingModules
(
std
::
vector
<
CVAAudioRendere
r
Info
>&
voRenderer
,
bool
bFilterEnabled
)
const
{
VA_REQUIRE_CONNECTED
;
VA_MUTAL_EXCLUDE
;
m_pProtocol
->
ClientGetRenderingModuleInfos
(
voRenderer
);
m_pProtocol
->
ClientGetRenderingModuleInfos
(
voRenderer
,
bFilterEnabled
);
}
virtual
void
SetRenderingModuleMuted
(
const
std
::
string
&
sModuleID
,
bool
bMuted
)
...
...
@@ -1108,11 +1108,11 @@ public:
return
m_pProtocol
->
ClientGetRenderingModuleGain
(
sModuleID
);
}
virtual
void
GetReproductionModules
(
std
::
vector
<
CVAAudioReproduction
Module
Info
>&
voRepros
)
const
virtual
void
GetReproductionModules
(
std
::
vector
<
CVAAudioReproductionInfo
>&
voRepros
,
bool
bFilterEnabled
)
const
{
VA_REQUIRE_CONNECTED
;
VA_MUTAL_EXCLUDE
;
m_pProtocol
->
ClientGetReproductionModuleInfos
(
voRepros
);
m_pProtocol
->
ClientGetReproductionModuleInfos
(
voRepros
,
bFilterEnabled
);
}
virtual
void
SetReproductionModuleMuted
(
const
std
::
string
&
sModuleID
,
bool
bMuted
)
...
...
src/VANetMessage.cpp
View file @
1c2cce19
...
...
@@ -764,30 +764,38 @@ void CVANetMessage::ClearConnection()
m_pConnection
=
NULL
;
}
void
CVANetMessage
::
WriteAudioRenderingModuleInfo
(
const
CVAAudioRender
ingModul
eInfo
&
oRenderer
)
void
CVANetMessage
::
WriteAudioRenderingModuleInfo
(
const
CVAAudioRendere
r
Info
&
oRenderer
)
{
WriteString
(
oRenderer
.
sID
);
WriteString
(
oRenderer
.
sClass
);
WriteBool
(
oRenderer
.
bEnabled
);
WriteString
(
oRenderer
.
sDescription
);
}
void
CVANetMessage
::
WriteAudioReproductionModuleInfo
(
const
CVAAudioReproduction
Module
Info
&
oRepro
)
void
CVANetMessage
::
WriteAudioReproductionModuleInfo
(
const
CVAAudioReproductionInfo
&
oRepro
)
{
WriteString
(
oRepro
.
sID
);
WriteString
(
oRepro
.
sClass
);
WriteBool
(
oRepro
.
bEnabled
);
WriteString
(
oRepro
.
sDescription
);
}
CVAAudioRender
ingModul
eInfo
CVANetMessage
::
ReadAudioRenderingModuleInfo
()
CVAAudioRendere
r
Info
CVANetMessage
::
ReadAudioRenderingModuleInfo
()
{
CVAAudioRender
ingModul
eInfo
oRenderer
;
CVAAudioRendere
r
Info
oRenderer
;
oRenderer
.
sID
=
ReadString
();
oRenderer
.
sClass
=
ReadString
();
oRenderer
.
bEnabled
=
ReadBool
();
oRenderer
.
sDescription
=
ReadString
();
return
oRenderer
;
}
CVAAudioReproduction
Module
Info
CVANetMessage
::
ReadAudioReproductionModuleInfo
()
CVAAudioReproductionInfo
CVANetMessage
::
ReadAudioReproductionModuleInfo
()
{
CVAAudioReproduction
Module
Info
oRepro
;
CVAAudioReproductionInfo
oRepro
;
oRepro
.
sID
=
ReadString
();
oRepro
.
sClass
=
ReadString
();
oRepro
.
bEnabled
=
ReadBool
();
oRepro
.
sDescription
=
ReadString
();
return
oRepro
;
}
src/VANetMessage.h
View file @
1c2cce19
...
...
@@ -98,8 +98,8 @@ public:
void
WriteModuleInfo
(
const
CVAModuleInfo
&
oInfo
);
void
WriteBlob
(
const
void
*
pBuf
,
int
nBytes
);
void
WriteVAStruct
(
const
CVAStruct
&
oStruct
);
void
WriteAudioRenderingModuleInfo
(
const
CVAAudioRender
ingModul
eInfo
&
);
void
WriteAudioReproductionModuleInfo
(
const
CVAAudioReproduction
Module
Info
&
);
void
WriteAudioRenderingModuleInfo
(
const
CVAAudioRendere
r
Info
&
);
void
WriteAudioReproductionModuleInfo
(
const
CVAAudioReproductionInfo
&
);
std
::
string
ReadString
();
int
ReadInt
();
...
...
@@ -120,8 +120,8 @@ public:
void
ReadModuleInfo
(
CVAModuleInfo
&
oInfo
);
void
ReadBlob
(
void
*
pBuf
,
int
nBytes
);
void
ReadVAStruct
(
CVAStruct
&
oStruct
);
CVAAudioRender
ingModul
eInfo
ReadAudioRenderingModuleInfo
();
CVAAudioReproduction
Module
Info
ReadAudioReproductionModuleInfo
();
CVAAudioRendere
r
Info
ReadAudioRenderingModuleInfo
();
CVAAudioReproductionInfo
ReadAudioReproductionModuleInfo
();
VistaConnectionIP
*
GetConnection
()
const
;
void
ClearConnection
();
...
...
src/VANetNetworkProtocol.cpp
View file @
1c2cce19
...
...
@@ -4073,10 +4073,13 @@ void CVANetNetworkProtocol::ServerGetRenderingModuleGain()
pMsg
->
WriteDouble
(
dGain
);
}
void
CVANetNetworkProtocol
::
ClientGetRenderingModuleInfos
(
std
::
vector
<
CVAAudioRender
ingModul
eInfo
>&
voRenderer
)
void
CVANetNetworkProtocol
::
ClientGetRenderingModuleInfos
(
std
::
vector
<
CVAAudioRendere
r
Info
>&
voRenderer
,
bool
bFilterEnabled
)
{
CVANetMessage
*
pMsg
=
ClientInitMessage
(
VA_NP_RENDERER_GET_INFOS
,
MESSAGE_ALLOWS_BUFFERING
);
pMsg
->
WriteBool
(
bFilterEnabled
);
ClientSendCommand
(
pMsg
);
int
iSize
=
pMsg
->
ReadInt
();
for
(
int
i
=
0
;
i
<
iSize
;
i
++
)
voRenderer
.
push_back
(
pMsg
->
ReadAudioRenderingModuleInfo
()
);
...
...
@@ -4085,21 +4088,26 @@ void CVANetNetworkProtocol::ClientGetRenderingModuleInfos( std::vector< CVAAudio
void
CVANetNetworkProtocol
::
ServerGetRenderingModuleInfos
()
{
CVANetMessage
*
pMsg
=
ServerGetMessage
();
bool
bFilterEnabled
=
pMsg
->
ReadBool
();
std
::
vector
<
CVAAudioRendererInfo
>
voRenderer
;
m_pRealCore
->
GetRenderingModules
(
voRenderer
,
bFilterEnabled
);
std
::
vector
<
CVAAudioRenderingModuleInfo
>
voRenderer
;
m_pRealCore
->
GetRenderingModules
(
voRenderer
);
voRenderer
.
clear
();
pMsg
->
WriteInt
(
(
int
)
voRenderer
.
size
()
);
for
(
size_t
i
=
0
;
i
<
voRenderer
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
voRenderer
.
size
();
i
++
)
pMsg
->
WriteAudioRenderingModuleInfo
(
voRenderer
[
i
]
);
return
;
}
void
CVANetNetworkProtocol
::
ClientGetReproductionModuleInfos
(
std
::
vector
<
CVAAudioReproduction
Module
Info
>&
voRepros
)
void
CVANetNetworkProtocol
::
ClientGetReproductionModuleInfos
(
std
::
vector
<
CVAAudioReproductionInfo
>&
voRepros
,
bool
bFilterEnabled
)
{
CVANetMessage
*
pMsg
=
ClientInitMessage
(
VA_NP_REPRODUCTION_GET_INFOS
,
MESSAGE_ALLOWS_BUFFERING
);
pMsg
->
WriteBool
(
bFilterEnabled
);
ClientSendCommand
(
pMsg
);
int
iSize
=
pMsg
->
ReadInt
();
voRepros
.
clear
();
for
(
int
i
=
0
;
i
<
iSize
;
i
++
)
...
...
@@ -4110,8 +4118,10 @@ void CVANetNetworkProtocol::ServerGetReproductionModuleInfos()
{
CVANetMessage
*
pMsg
=
ServerGetMessage
();
std
::
vector
<
CVAAudioReproductionModuleInfo
>
voRepros
;
m_pRealCore
->
GetReproductionModules
(
voRepros
);
bool
bFilterEnabled
=
pMsg
->
ReadBool
();
std
::
vector
<
CVAAudioReproductionInfo
>
voRepros
;
m_pRealCore
->
GetReproductionModules
(
voRepros
,
bFilterEnabled
);
pMsg
->
WriteInt
(
(
int
)
voRepros
.
size
()
);
for
(
size_t
i
=
0
;
i
<
voRepros
.
size
();
i
++
)
...
...
@@ -4136,7 +4146,6 @@ void CVANetNetworkProtocol::ServerIsRenderingModuleMuted()
pMsg
->
WriteBool
(
bMuted
);
}
void
CVANetNetworkProtocol
::
ClientSetReproductionModuleGain
(
const
std
::
string
&
sID
,
double
dGain
)
{
CVANetMessage
*
pMsg
=
ClientInitMessage
(
VA_NP_REPRODUCTION_SET_GAIN
,
MESSAGE_ALLOWS_BUFFERING
);
...
...
src/VANetNetworkProtocol.h
View file @
1c2cce19
...
...
@@ -889,7 +889,7 @@ public:
virtual
double
ClientGetRenderingModuleGain
(
const
std
::
string
&
);
virtual
void
ServerGetRenderingModuleGain
();
virtual
void
ClientGetRenderingModuleInfos
(
std
::
vector
<
CVAAudioRender
ingModul
eInfo
>&
);
virtual
void
ClientGetRenderingModuleInfos
(
std
::
vector
<
CVAAudioRendere
r
Info
>&
,
bool
);
virtual
void
ServerGetRenderingModuleInfos
();
virtual
void
ClientSetReproductionModuleGain
(
const
std
::
string
&
,
double
);
...
...
@@ -904,7 +904,7 @@ public:
virtual
double
ClientGetReproductionModuleGain
(
const
std
::
string
&
);
virtual
void
ServerGetReproductionModuleGain
();
virtual
void
ClientGetReproductionModuleInfos
(
std
::
vector
<
CVAAudioReproduction
Module
Info
>&
);
virtual
void
ClientGetReproductionModuleInfos
(
std
::
vector
<
CVAAudioReproductionInfo
>&
,
bool
);
virtual
void
ServerGetReproductionModuleInfos
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment