Commit 0c3d5614 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Adding sound receiver mute method implementations and removing active listener methods

parent b2da5325
......@@ -10,7 +10,7 @@ if( NOT DEFINED ITA_VANET_VERSION_MAJOR )
endif( )
if( NOT DEFINED ITA_VANET_VERSION_MINOR )
set( ITA_VANET_VERSION_MINOR "a" CACHE STRING "VANet version minor (usually a,b,c ...)" )
set( ITA_VANET_VERSION_MINOR "b" CACHE STRING "VANet version minor (usually a,b,c ...)" )
endif( )
if( NOT DEFINED ITA_VANET_DEFAULT_PORT )
......
......@@ -649,21 +649,7 @@ public:
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientCreateSoundReceiverExplicitRenderer( sRendererID, sName );
};
inline void SetActiveSoundReceiverExplicitRenderer( const int iSoundReceiverID, const std::string& sRendererID )
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientSetActiveSoundReceiverExplicitRenderer( iSoundReceiverID, sRendererID );
};
inline int GetActiveSoundReceiverExplicitRenderer( const std::string& sRendererID ) const
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetActiveSoundReceiverExplicitRenderer( sRendererID );
};
inline int DeleteSoundReceiver( const int iSoundReceiverID )
{
VA_REQUIRE_CONNECTED;
......@@ -748,6 +734,20 @@ public:
m_pProtocol->ClientSetSoundReceiverDirectivity( iSoundReceiverID, iDirectivityID );
};
inline bool GetSoundReceiverMuted( const int iID ) const
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetSoundReceiverMuted( iID );
};
inline void SetSoundReceiverMuted( const int iID, const bool bMuted = true )
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetSoundReceiverMuted( iID, bMuted );
};
inline void GetSoundReceiverPose( const int iID, VAVec3& v3Pos, VAQuat& qOrient ) const
{
VA_REQUIRE_CONNECTED;
......@@ -1228,20 +1228,6 @@ public:
m_pProtocol->ClientSetGlobalAuralizationMode( iAuralizationMode );
}
inline int GetActiveSoundReceiver() const
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetActiveSoundReceiver();
};
inline void SetActiveSoundReceiver( const int iID )
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetActiveSoundReceiver( iID );
};
inline double GetCoreClock() const
{
VA_REQUIRE_CONNECTED;
......
......@@ -315,10 +315,6 @@ void CVANetNetworkProtocol::ServerCallFunctionByMessageType( const int nMessageT
SERVER_FUNCTION_MAPPING( VA_NP_SET_OUTPUT_MUTED, ServerSetOutputMuted() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_GLOBAL_AURALIZATION_MODE, ServerGetGlobalAuralizationMode() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_GLOBAL_AURALIZATION_MODE, ServerSetGlobalAuralizationMode() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_ACTIVE_SOUND_RECEIVER, ServerGetActiveSoundReceiver() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_ACTIVE_SOUND_RECEIVER, ServerSetActiveSoundReceiver() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_ACTIVE_SOUND_RECEIVER_EXPLICIT_RENDERER, ServerGetActiveSoundReceiverExplicitRenderer() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_ACTIVE_SOUND_RECEIVER_EXPLICIT_RENDERER, ServerSetActiveSoundReceiverExplicitRenderer() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_CORE_CLOCK, ServerGetCoreClock() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_CORE_CLOCK, ServerSetCoreClock() );
SERVER_FUNCTION_MAPPING( VA_NP_SUBSTITUTE_MACROS, ServerSubstituteMacros() );
......@@ -2119,67 +2115,6 @@ void CVANetNetworkProtocol::ServerGetSoundReceiverEnabled()
pMsg->WriteBool( bEnabled );
}
void CVANetNetworkProtocol::ClientSetActiveSoundReceiverExplicitRenderer( const int iID, const std::string& sRendererID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_ACTIVE_SOUND_RECEIVER_EXPLICIT_RENDERER, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteInt( iID );
pMsg->WriteString( sRendererID );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetActiveSoundReceiverExplicitRenderer()
{
CVANetMessage* pMsg = ServerGetMessage();
int iID = pMsg->ReadInt();
std::string sRendererID = pMsg->ReadString();
m_pRealCore->SetActiveSoundReceiverExplicitRenderer( iID, sRendererID );
}
int CVANetNetworkProtocol::ClientGetActiveSoundReceiverExplicitRenderer( const std::string& sRendererID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_ACTIVE_SOUND_RECEIVER_EXPLICIT_RENDERER, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteString( sRendererID );
ClientSendCommand( pMsg );
const int iID = pMsg->ReadInt();
return iID;
}
void CVANetNetworkProtocol::ServerGetActiveSoundReceiverExplicitRenderer()
{
CVANetMessage* pMsg = ServerGetMessage();
const std::string sRendererID = pMsg->ReadString();
const int iID = m_pRealCore->GetActiveSoundReceiverExplicitRenderer( sRendererID );
pMsg->WriteInt( iID );
}
void CVANetNetworkProtocol::ClientSetActiveSoundReceiver( const int iID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_ACTIVE_SOUND_RECEIVER, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteInt( iID );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetActiveSoundReceiver()
{
CVANetMessage* pMsg = ServerGetMessage();
const int iID = pMsg->ReadInt();
m_pRealCore->SetActiveSoundReceiver( iID );
}
int CVANetNetworkProtocol::ClientGetActiveSoundReceiver()
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_ACTIVE_SOUND_RECEIVER, MESSAGE_WITH_ANSWER );
ClientSendCommand( pMsg );
return pMsg->ReadInt();
}
void CVANetNetworkProtocol::ServerGetActiveSoundReceiver()
{
CVANetMessage* pMsg = ServerGetMessage();
const int iID = m_pRealCore->GetActiveSoundReceiver();
pMsg->WriteInt( iID );
}
std::string CVANetNetworkProtocol::ClientGetSoundReceiverName( const int iID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_SOUND_RECEIVER_NAME, MESSAGE_WITH_ANSWER );
......@@ -2318,6 +2253,39 @@ void CVANetNetworkProtocol::ServerSetSoundReceiverDirectivity()
m_pRealCore->SetSoundReceiverDirectivity( iID, iDirectivity );
}
void CVANetNetworkProtocol::ClientSetSoundReceiverMuted( const int iID, const bool bMuted )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_SOUND_RECEIVER_MUTED, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteInt( iID );
pMsg->WriteBool( bMuted );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetSoundReceiverMuted()
{
CVANetMessage* pMsg = ServerGetMessage();
const int iSoundReceiverID = pMsg->ReadInt();
const bool bMuted = pMsg->ReadBool();
m_pRealCore->SetSoundReceiverMuted( iSoundReceiverID, bMuted );
}
bool CVANetNetworkProtocol::ClientGetSoundReceiverMuted( const int iSoundReceiverID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_SOUND_RECEIVER_MUTED, MESSAGE_WITH_ANSWER );
pMsg->WriteInt( iSoundReceiverID );
ClientSendCommand( pMsg );
return pMsg->ReadBool();
}
void CVANetNetworkProtocol::ServerGetSoundReceiverMuted()
{
CVANetMessage* pMsg = ServerGetMessage();
const int iSoundReceiverID = pMsg->ReadInt();
const bool bMuted = m_pRealCore->GetSoundReceiverMuted( iSoundReceiverID );
pMsg->WriteBool( bMuted );
}
void CVANetNetworkProtocol::ClientGetSoundReceiverPose( const int iID, VAVec3& v3Pos, VAQuat& qOrient )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_SOUND_RECEIVER_POSE, MESSAGE_WITH_ANSWER );
......
......@@ -169,6 +169,8 @@ public:
static const int VA_NP_SET_SOUND_RECEIVER_AURALIZATION_MODE = 906;
static const int VA_NP_GET_SOUND_RECEIVER_DIRECTIVITY = 907;
static const int VA_NP_SET_SOUND_RECEIVER_DIRECTIVITY = 908;
static const int VA_NP_GET_SOUND_RECEIVER_MUTED = 909;
static const int VA_NP_SET_SOUND_RECEIVER_MUTED = 910;
static const int VA_NP_SET_SOUND_RECEIVER_POSE = 919;
static const int VA_NP_GET_SOUND_RECEIVER_POSE = 920;
static const int VA_NP_SET_SOUND_RECEIVER_POSITION = 915;
......@@ -616,12 +618,7 @@ public:
void ServerSetSoundReceiverEnabled();
bool ClientGetSoundReceiverEnabled( int );
void ServerGetSoundReceiverEnabled();
void ClientSetActiveSoundReceiverExplicitRenderer( int, const std::string& );
void ServerSetActiveSoundReceiverExplicitRenderer();
int ClientGetActiveSoundReceiverExplicitRenderer( const std::string& );
void ServerGetActiveSoundReceiverExplicitRenderer();
std::string ClientGetSoundReceiverName( const int iID );
void ServerGetSoundReceiverName();
void ClientSetSoundReceiverName( int iID, const std::string& sName );
......@@ -642,6 +639,11 @@ public:
void ClientSetSoundReceiverDirectivity( const int iSoundReceiverID, const int iDirectivityID );
void ServerSetSoundReceiverDirectivity();
bool ClientGetSoundReceiverMuted( const int iID );
void ServerGetSoundReceiverMuted();
void ClientSetSoundReceiverMuted( const int iID, const bool bMuted );
void ServerSetSoundReceiverMuted();
void ClientGetSoundReceiverPose( const int iID, VAVec3& v3Pos, VAQuat& qOrient );
void ServerGetSoundReceiverPose();
void ClientSetSoundReceiverPose( const int iID, const VAVec3& v3Pos, const VAQuat& qOrient );
......@@ -823,12 +825,6 @@ public:
void ClientSetGlobalAuralizationMode( int iAuralizationMode );
void ServerSetGlobalAuralizationMode();
int ClientGetActiveSoundReceiver();
void ServerGetActiveSoundReceiver();
void ClientSetActiveSoundReceiver( const int iID );
void ServerSetActiveSoundReceiver();
std::string ClientSubstituteMacros( const std::string& sStr );
void ServerSubstituteMacros();
......
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