Implementding new API methods

parent 482fb5b8
......@@ -1278,6 +1278,34 @@ public:
return m_pProtocol->ClientGetRenderingModuleMuted( sModuleID );
};
inline void SetRenderingModuleAuralizationMode( const std::string& sModuleID, const int iAuraMode )
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetRenderingModuleAuralizationMode( sModuleID, iAuraMode );
};
inline int GetRenderingModuleAuralizationMode( const std::string& sModuleID ) const
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetRenderingModuleAuralizationMode( sModuleID );
};
inline void SetRenderingModuleParameters( const std::string& sID, const CVAStruct& oParams )
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetRenderingModuleParameters( sID, oParams );
};
inline CVAStruct GetRenderingModuleParameters( const std::string& sID, const CVAStruct& oParams ) const
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetRenderingModuleParameters( sID, oParams );
};
inline void SetRenderingModuleGain( const std::string& sModuleID, const double dGain )
{
VA_REQUIRE_CONNECTED;
......@@ -1326,6 +1354,20 @@ public:
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetReproductionModuleGain( sModuleID );
};
inline void SetReproductionModuleParameters( const std::string& sID, const CVAStruct& oParams )
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetReproductionModuleParameters( sID, oParams );
};
inline CVAStruct GetReproductionModuleParameters( const std::string& sID, const CVAStruct& oParams ) const
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetReproductionModuleParameters( sID, oParams );
};
inline int CreateAcousticMaterial( const CVAAcousticMaterial& oMaterial, const std::string& sName = "" )
......
......@@ -426,7 +426,7 @@ void CVANetMessage::WriteEvent( const CVAEvent& oEvent )
WriteDouble( oEvent.dState );
WriteBool( oEvent.bMuted );
WriteString( oEvent.sName );
WriteString( oEvent.sFilename );
WriteString( oEvent.sFilenPath );
WriteVec3( oEvent.vPos );
WriteVec3( oEvent.vView );
WriteVec3( oEvent.vUp );
......@@ -459,7 +459,7 @@ CVAEvent CVANetMessage::ReadEvent()
oEvent.dState = ReadDouble();
oEvent.bMuted = ReadBool();
oEvent.sName = ReadString();
oEvent.sFilename = ReadString();
oEvent.sFilenPath = ReadString();
oEvent.vPos = ReadVec3();
oEvent.vView = ReadVec3();
oEvent.vUp = ReadVec3();
......
......@@ -327,12 +327,18 @@ void CVANetNetworkProtocol::ServerCallFunctionByMessageType( const int nMessageT
SERVER_FUNCTION_MAPPING( VA_NP_RENDERER_SET_GAIN, ServerSetRenderingModuleGain() );
SERVER_FUNCTION_MAPPING( VA_NP_RENDERER_GET_MUTED, ServerGetRenderingModuleMuted() );
SERVER_FUNCTION_MAPPING( VA_NP_RENDERER_SET_MUTED, ServerSetRenderingModuleMuted() );
SERVER_FUNCTION_MAPPING( VA_NP_RENDERER_GET_PARAMETERS, ServerGetRenderingModuleParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_RENDERER_SET_PARAMETERS, ServerSetRenderingModuleParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_RENDERER_GET_AURALIZATION_MODE, ServerGetRenderingModuleAuralizationMode() );
SERVER_FUNCTION_MAPPING( VA_NP_RENDERER_SET_AURALIZATION_MODE, ServerSetRenderingModuleAuralizationMode() );
SERVER_FUNCTION_MAPPING( VA_NP_REPRODUCTION_GET_INFOS, ServerGetReproductionModuleInfos() );
SERVER_FUNCTION_MAPPING( VA_NP_REPRODUCTION_GET_GAIN, ServerGetReproductionModuleGain() );
SERVER_FUNCTION_MAPPING( VA_NP_REPRODUCTION_SET_GAIN, ServerSetReproductionModuleGain() );
SERVER_FUNCTION_MAPPING( VA_NP_REPRODUCTION_GET_MUTED, ServerGetReproductionModuleMuted() );
SERVER_FUNCTION_MAPPING( VA_NP_REPRODUCTION_SET_MUTED, ServerSetReproductionModuleMuted() );
SERVER_FUNCTION_MAPPING( VA_NP_REPRODUCTION_GET_PARAMETERS, ServerGetReproductionModuleParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_REPRODUCTION_SET_PARAMETERS, ServerSetReproductionModuleParameters() );
case VA_NP_INVALID:
default:
......@@ -3500,6 +3506,79 @@ void CVANetNetworkProtocol::ServerGetRenderingModuleGain()
pMsg->WriteDouble( dGain );
}
void CVANetNetworkProtocol::ClientSetRenderingModuleAuralizationMode( const std::string& sID, const int iAM )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_RENDERER_SET_AURALIZATION_MODE, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteString( sID );
pMsg->WriteInt( iAM );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetRenderingModuleAuralizationMode()
{
CVANetMessage* pMsg = ServerGetMessage();
const std::string sID = pMsg->ReadString();
const int iAM = pMsg->ReadInt();
m_pRealCore->SetRenderingModuleAuralizationMode( sID, iAM );
}
int CVANetNetworkProtocol::ClientGetRenderingModuleAuralizationMode( const std::string& sID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_RENDERER_GET_AURALIZATION_MODE, MESSAGE_WITH_ANSWER );
pMsg->WriteString( sID );
ClientSendCommand( pMsg );
return pMsg->ReadInt();
}
void CVANetNetworkProtocol::ServerGetRenderingModuleAuralizationMode()
{
CVANetMessage* pMsg = ServerGetMessage();
const std::string sID = pMsg->ReadString();
const int iAM = m_pRealCore->GetRenderingModuleAuralizationMode( sID );
pMsg->WriteInt( iAM );
}
void CVANetNetworkProtocol::ClientSetRenderingModuleParameters( const std::string& sID, const CVAStruct& oParams )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_RENDERER_SET_PARAMETERS, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteString( sID );
pMsg->WriteVAStruct( oParams );
ClientSendCommand( pMsg );
return;
}
void CVANetNetworkProtocol::ServerSetRenderingModuleParameters()
{
CVANetMessage* pMsg = ServerGetMessage();
std::string sID = pMsg->ReadString();
CVAStruct oParams;
pMsg->ReadVAStruct( oParams );
m_pRealCore->SetRenderingModuleParameters( sID, oParams );
return;
}
CVAStruct CVANetNetworkProtocol::ClientGetRenderingModuleParameters( const std::string& sID, const CVAStruct& oParams )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_RENDERER_GET_PARAMETERS, MESSAGE_WITH_ANSWER );
pMsg->WriteString( sID );
pMsg->WriteVAStruct( oParams );
ClientSendCommand( pMsg );
CVAStruct oRet;
pMsg->ReadVAStruct( oRet );
return oRet;
}
void CVANetNetworkProtocol::ServerGetRenderingModuleParameters()
{
CVANetMessage* pMsg = ServerGetMessage();
std::string sID = pMsg->ReadString();
CVAStruct oParams;
pMsg->ReadVAStruct( oParams );
CVAStruct oRet = m_pRealCore->GetRenderingModuleParameters( sID, oParams );
pMsg->WriteVAStruct( oRet );
return;
}
void CVANetNetworkProtocol::ClientGetRenderingModuleInfos( std::vector< CVAAudioRendererInfo >& voRenderer, const bool bFilterEnabled )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_RENDERER_GET_INFOS, MESSAGE_WITH_ANSWER );
......@@ -3544,6 +3623,47 @@ void CVANetNetworkProtocol::ServerGetReproductionModuleInfos()
pMsg->WriteAudioReproductionModuleInfo( voRepros[ i ] );
}
void CVANetNetworkProtocol::ClientSetReproductionModuleParameters( const std::string& sID, const CVAStruct& oParams )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_REPRODUCTION_SET_PARAMETERS, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteString( sID );
pMsg->WriteVAStruct( oParams );
ClientSendCommand( pMsg );
return;
}
void CVANetNetworkProtocol::ServerSetReproductionModuleParameters()
{
CVANetMessage* pMsg = ServerGetMessage();
std::string sID = pMsg->ReadString();
CVAStruct oParams;
pMsg->ReadVAStruct( oParams );
m_pRealCore->SetReproductionModuleParameters( sID, oParams );
return;
}
CVAStruct CVANetNetworkProtocol::ClientGetReproductionModuleParameters( const std::string& sID, const CVAStruct& oParams )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_REPRODUCTION_GET_PARAMETERS, MESSAGE_WITH_ANSWER );
pMsg->WriteString( sID );
pMsg->WriteVAStruct( oParams );
ClientSendCommand( pMsg );
CVAStruct oRet;
pMsg->ReadVAStruct( oRet );
return oRet;
}
void CVANetNetworkProtocol::ServerGetReproductionModuleParameters()
{
CVANetMessage* pMsg = ServerGetMessage();
std::string sID = pMsg->ReadString();
CVAStruct oParams;
pMsg->ReadVAStruct( oParams );
CVAStruct oRet = m_pRealCore->GetReproductionModuleParameters( sID, oParams );
pMsg->WriteVAStruct( oRet );
return;
}
int CVANetNetworkProtocol::ClientCreateAcousticMaterial( const CVAAcousticMaterial& oMaterial, const std::string& sName )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_CREATE_ACOUSTIC_MATERIAL, MESSAGE_WITH_ANSWER );
......
......@@ -289,6 +289,10 @@ public:
static const int VA_NP_RENDERER_GET_MUTED = 1202;
static const int VA_NP_RENDERER_GET_GAIN = 1203;
static const int VA_NP_RENDERER_SET_GAIN = 1204;
static const int VA_NP_RENDERER_GET_AURALIZATION_MODE = 1205;
static const int VA_NP_RENDERER_SET_AURALIZATION_MODE = 1206;
static const int VA_NP_RENDERER_GET_PARAMETERS = 1207;
static const int VA_NP_RENDERER_SET_PARAMETERS = 1208;
// Reproductions
static const int VA_NP_REPRODUCTION_GET_INFOS = 1300;
......@@ -296,6 +300,8 @@ public:
static const int VA_NP_REPRODUCTION_GET_MUTED = 1302;
static const int VA_NP_REPRODUCTION_GET_GAIN = 1303;
static const int VA_NP_REPRODUCTION_SET_GAIN = 1304;
static const int VA_NP_REPRODUCTION_GET_PARAMETERS = 1305;
static const int VA_NP_REPRODUCTION_SET_PARAMETERS = 1306;
// Internally used literals
static const int VA_NP_SPECIAL_BUFFERED_MESSAGE = 42001;
......@@ -833,6 +839,18 @@ public:
double ClientGetRenderingModuleGain( const std::string& );
void ServerGetRenderingModuleGain();
void ClientSetRenderingModuleParameters( const std::string&, const CVAStruct& );
void ServerSetRenderingModuleParameters();
CVAStruct ClientGetRenderingModuleParameters( const std::string&, const CVAStruct& );
void ServerGetRenderingModuleParameters();
void ClientSetRenderingModuleAuralizationMode( const std::string&, const int );
void ServerSetRenderingModuleAuralizationMode();
int ClientGetRenderingModuleAuralizationMode( const std::string& );
void ServerGetRenderingModuleAuralizationMode();
void ClientGetRenderingModuleInfos( std::vector< CVAAudioRendererInfo >&, bool );
void ServerGetRenderingModuleInfos();
......@@ -851,6 +869,12 @@ public:
void ClientGetReproductionModuleInfos( std::vector< CVAAudioReproductionInfo >&, const bool );
void ServerGetReproductionModuleInfos();
void ClientSetReproductionModuleParameters( const std::string&, const CVAStruct& );
void ServerSetReproductionModuleParameters();
CVAStruct ClientGetReproductionModuleParameters( const std::string&, const CVAStruct& );
void ServerGetReproductionModuleParameters();
int ClientCreateAcousticMaterial( const CVAAcousticMaterial& oMaterial, const std::string& sName );
void ServerCreateAcousticMaterial();
......
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