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

Implementing API changes

parent 03ee8864
......@@ -1073,11 +1073,11 @@ public:
* | | *
* +----------------------------------------------------------+ */
virtual void GetRenderingModules( std::vector< CVAAudioRenderingModuleInfo >& voRenderer ) const
virtual void GetRenderingModules( std::vector< CVAAudioRendererInfo >& 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< CVAAudioReproductionModuleInfo >& 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 )
......
......@@ -764,30 +764,38 @@ void CVANetMessage::ClearConnection()
m_pConnection = NULL;
}
void CVANetMessage::WriteAudioRenderingModuleInfo( const CVAAudioRenderingModuleInfo& oRenderer )
void CVANetMessage::WriteAudioRenderingModuleInfo( const CVAAudioRendererInfo& oRenderer )
{
WriteString( oRenderer.sID );
WriteString( oRenderer.sClass );
WriteBool( oRenderer.bEnabled );
WriteString( oRenderer.sDescription );
}
void CVANetMessage::WriteAudioReproductionModuleInfo( const CVAAudioReproductionModuleInfo& oRepro )
void CVANetMessage::WriteAudioReproductionModuleInfo( const CVAAudioReproductionInfo& oRepro )
{
WriteString( oRepro.sID );
WriteString( oRepro.sClass );
WriteBool( oRepro.bEnabled );
WriteString( oRepro.sDescription );
}
CVAAudioRenderingModuleInfo CVANetMessage::ReadAudioRenderingModuleInfo()
CVAAudioRendererInfo CVANetMessage::ReadAudioRenderingModuleInfo()
{
CVAAudioRenderingModuleInfo oRenderer;
CVAAudioRendererInfo oRenderer;
oRenderer.sID = ReadString();
oRenderer.sClass = ReadString();
oRenderer.bEnabled = ReadBool();
oRenderer.sDescription = ReadString();
return oRenderer;
}
CVAAudioReproductionModuleInfo CVANetMessage::ReadAudioReproductionModuleInfo()
CVAAudioReproductionInfo CVANetMessage::ReadAudioReproductionModuleInfo()
{
CVAAudioReproductionModuleInfo oRepro;
CVAAudioReproductionInfo oRepro;
oRepro.sID = ReadString();
oRepro.sClass = ReadString();
oRepro.bEnabled = ReadBool();
oRepro.sDescription = ReadString();
return oRepro;
}
......@@ -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 CVAAudioRenderingModuleInfo& );
void WriteAudioReproductionModuleInfo( const CVAAudioReproductionModuleInfo& );
void WriteAudioRenderingModuleInfo( const CVAAudioRendererInfo& );
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 );
CVAAudioRenderingModuleInfo ReadAudioRenderingModuleInfo();
CVAAudioReproductionModuleInfo ReadAudioReproductionModuleInfo();
CVAAudioRendererInfo ReadAudioRenderingModuleInfo();
CVAAudioReproductionInfo ReadAudioReproductionModuleInfo();
VistaConnectionIP* GetConnection() const;
void ClearConnection();
......
......@@ -4073,10 +4073,13 @@ void CVANetNetworkProtocol::ServerGetRenderingModuleGain()
pMsg->WriteDouble( dGain );
}
void CVANetNetworkProtocol::ClientGetRenderingModuleInfos( std::vector< CVAAudioRenderingModuleInfo >& voRenderer )
void CVANetNetworkProtocol::ClientGetRenderingModuleInfos( std::vector< CVAAudioRendererInfo >& 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< CVAAudioReproductionModuleInfo >& 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 );
......
......@@ -889,7 +889,7 @@ public:
virtual double ClientGetRenderingModuleGain( const std::string& );
virtual void ServerGetRenderingModuleGain();
virtual void ClientGetRenderingModuleInfos( std::vector< CVAAudioRenderingModuleInfo >& );
virtual void ClientGetRenderingModuleInfos( std::vector< CVAAudioRendererInfo >&, 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< CVAAudioReproductionModuleInfo >& );
virtual void ClientGetReproductionModuleInfos( std::vector< CVAAudioReproductionInfo >&, bool );
virtual void ServerGetReproductionModuleInfos();
......
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