Commit 2facfe7a authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Finishing sequencer methods

parent 27dd4326
......@@ -338,6 +338,27 @@ public:
return m_pProtocol->ClientGetSignalSourceParameters( sSignalSourceID, oParams );
};
inline int AddSignalSourceSequencerSample( const std::string& sSignalSourceID, const CVAStruct& oArgs )
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientAddSignalSourceSequencerSample( sSignalSourceID, oArgs );
};
inline int AddSignalSourceSequencerPlayback( const std::string& sSignalSourceID, const int iSoundID, const int iFlags, const double dTimeCode )
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientAddSignalSourceSequencerPlayback( sSignalSourceID, iSoundID, iFlags, dTimeCode );
};
inline void RemoveSignalSourceSequencerSample( const std::string& sSignalSourceID, const int iSoundID )
{
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientRemoveSignalSourceSequencerSample( sSignalSourceID, iSoundID );
};
inline bool GetUpdateLocked() const
{
......
......@@ -152,11 +152,11 @@ void CVANetNetworkProtocol::ServerCallFunctionByMessageType( const int nMessageT
SERVER_FUNCTION_MAPPING( VA_NP_SET_SIGNAL_SOURCE_BUFFER_PLAYBACK_POSITION, ServerSetAudiofileSignalSourcePlaybackPosition() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SIGNAL_SOURCE_BUFFER_LOOPING, ServerSetSignalSourceBufferLooping() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SIGNAL_SOURCE_BUFFER_LOOPING, ServerGetSignalSourceBufferLooping() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SIGNALSOURCE_PARAMETERS, ServerGetSignalSourceParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SIGNAL_SOURCE_PARAMETERS, ServerGetSignalSourceParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SIGNALSOURCE_PARAMETERS, ServerSetSignalSourceParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_SOUND_SAMPLE, ServerAddSignalSourceSequencerSample() );
SERVER_FUNCTION_MAPPING( VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_SOUND_PLAYBACK, ServerAddSignalSourceSequencerSoundPlayback() );
SERVER_FUNCTION_MAPPING( VA_NP_REMOVE_SIGNAL_SOURCE_SEQUENCER_SOUND_SAMPLE, ServerRemoveSignalSourceSequencerSoundSample() );
SERVER_FUNCTION_MAPPING( VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_SAMPLE, ServerAddSignalSourceSequencerSample() );
SERVER_FUNCTION_MAPPING( VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_PLAYBACK, ServerAddSignalSourceSequencerPlayback() );
SERVER_FUNCTION_MAPPING( VA_NP_REMOVE_SIGNAL_SOURCE_SEQUENCER_SAMPLE, ServerRemoveSignalSourceSequencerSample() );
// Synchronization functions
SERVER_FUNCTION_MAPPING( VA_NP_LOCK_SCENE, ServerLockUpdate() );
......@@ -1162,7 +1162,7 @@ void CVANetNetworkProtocol::ServerSetSignalSourceParameters()
CVAStruct CVANetNetworkProtocol::ClientGetSignalSourceParameters( const std::string& sSignalSourceID, const CVAStruct& oParams )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_SIGNALSOURCE_PARAMETERS, MESSAGE_WITH_ANSWER );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_SIGNAL_SOURCE_PARAMETERS, MESSAGE_WITH_ANSWER );
pMsg->WriteString( sSignalSourceID );
pMsg->WriteVAStruct( oParams );
ClientSendCommand( pMsg );
......@@ -1184,17 +1184,26 @@ void CVANetNetworkProtocol::ServerGetSignalSourceParameters()
int CVANetNetworkProtocol::ClientAddSignalSourceSequencerSample( const std::string& sSignalSourceID, const CVAStruct& oArgs )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_SAMPLE, MESSAGE_WITH_ANSWER );
pMsg->WriteString( sSignalSourceID );
pMsg->WriteVAStruct( oArgs );
ClientSendCommand( pMsg );
return pMsg->ReadInt();
}
void CVANetNetworkProtocol::ServerAddSignalSourceSequencerSample()
{
CVANetMessage* pMsg = ServerGetMessage();
std::string sID = pMsg->ReadString();
CVAStruct oParams;
pMsg->ReadVAStruct( oParams );
const int iSoundID = m_pRealCore->AddSignalSourceSequencerSample( sID, oParams );
pMsg->WriteInt( iSoundID );
}
int CVANetNetworkProtocol::ClientAddSignalSourceSequencerSoundPlayback( const std::string& sSignalSourceID, const int iSoundID, const int iFlags, const double dTimeCode )
int CVANetNetworkProtocol::ClientAddSignalSourceSequencerPlayback( const std::string& sSignalSourceID, const int iSoundID, const int iFlags, const double dTimeCode )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_SOUND_PLAYBACK, MESSAGE_WITH_ANSWER );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_PLAYBACK, MESSAGE_WITH_ANSWER );
pMsg->WriteString( sSignalSourceID );
pMsg->WriteInt( iSoundID );
pMsg->WriteInt( iFlags );
......@@ -1204,26 +1213,32 @@ int CVANetNetworkProtocol::ClientAddSignalSourceSequencerSoundPlayback( const st
return iRet;
}
void CVANetNetworkProtocol::ServerAddSignalSourceSequencerSoundPlayback()
void CVANetNetworkProtocol::ServerAddSignalSourceSequencerPlayback()
{
CVANetMessage* pMsg = ServerGetMessage();
const std::string sID = pMsg->ReadString();
const int iSoundID = pMsg->ReadInt();
const int iFlags = pMsg->ReadInt();
const double dTimeCode = pMsg->ReadDouble();
const int iRet = m_pRealCore->AddSignalSourceSequencerSoundPlayback( sID, iSoundID, iFlags, dTimeCode );
const int iRet = m_pRealCore->AddSignalSourceSequencerPlayback( sID, iSoundID, iFlags, dTimeCode );
pMsg->WriteInt( iRet );
return;
}
void CVANetNetworkProtocol::ClientRemoveSignalSourceSequencerSoundSample( const std::string& sSignalSourceID, const int iSoundID )
void CVANetNetworkProtocol::ClientRemoveSignalSourceSequencerSample( const std::string& sSignalSourceID, const int iSoundID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_PLAYBACK, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteString( sSignalSourceID );
pMsg->WriteInt( iSoundID );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerRemoveSignalSourceSequencerSoundSample()
void CVANetNetworkProtocol::ServerRemoveSignalSourceSequencerSample()
{
CVANetMessage* pMsg = ServerGetMessage();
const std::string sID = pMsg->ReadString();
const int iSoundID = pMsg->ReadInt();
m_pRealCore->RemoveSignalSourceSequencerSample( sID, iSoundID );
}
void CVANetNetworkProtocol::ClientLockUpdate()
......
......@@ -88,12 +88,12 @@ public:
static const int VA_NP_SET_DIRECTIVITY_PARAMETERS = 305;
static const int VA_NP_GET_DIRECTIVITY_NAME = 306;
static const int VA_NP_SET_DIRECTIVITY_NAME = 307;
// Signal sources
static const int VA_NP_GET_SIGNALSOURCE_INFO = 600;
static const int VA_NP_GET_SIGNALSOURCE_INFOS = 601;
static const int VA_NP_DELETE_SIGNALSOURCE = 602;
static const int VA_NP_GET_SIGNALSOURCE_PARAMETERS = 603;
static const int VA_NP_GET_SIGNAL_SOURCE_PARAMETERS = 603;
static const int VA_NP_SET_SIGNALSOURCE_PARAMETERS = 604;
static const int VA_NP_CREATE_SIGNAL_SOURCE_BUFFER_FROM_PARAMETERS = 610;
......@@ -104,9 +104,9 @@ public:
static const int VA_NP_SET_SIGNAL_SOURCE_BUFFER_LOOPING = 615;
static const int VA_NP_CREATE_SIGNAL_SOURCE_SEQUENCER = 620;
static const int VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_SOUND_SAMPLE = 621;
static const int VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_SOUND_PLAYBACK = 622;
static const int VA_NP_REMOVE_SIGNAL_SOURCE_SEQUENCER_SOUND_SAMPLE = 623;
static const int VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_SAMPLE = 621;
static const int VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_PLAYBACK = 622;
static const int VA_NP_REMOVE_SIGNAL_SOURCE_SEQUENCER_SAMPLE = 623;
static const int VA_NP_CREATE_SIGNAL_SOURCE_NETWORK_STREAM = 630;
......@@ -188,8 +188,8 @@ public:
static const int VA_NP_GET_SOUND_RECEIVER_REAL_WORLD_HEAD_ABOVE_TORSO_ORIENTATION = 937;
static const int VA_NP_SET_SOUND_RECEIVER_REAL_WORLD_HEAD_ABOVE_TORSO_ORIENTATION = 938;
static const int VA_NP_GET_SOUND_RECEIVER_INFO = 939;
// Scene
static const int VA_NP_SCENE_CREATE = 1000;
......@@ -481,10 +481,11 @@ public:
int ClientAddSignalSourceSequencerSample( const std::string& sSignalSourceID, const CVAStruct& oArgs );
void ServerAddSignalSourceSequencerSample();
int ClientAddSignalSourceSequencerSoundPlayback( const std::string& sSignalSourceID, const int iSoundID, const int iFlags, const double dTimeCode );
void ServerAddSignalSourceSequencerSoundPlayback();
void ClientRemoveSignalSourceSequencerSoundSample( const std::string& sSignalSourceID, const int iSoundID );
void ServerRemoveSignalSourceSequencerSoundSample();
int ClientAddSignalSourceSequencerPlayback( const std::string& sSignalSourceID, const int iSoundID, const int iFlags, const double dTimeCode );
void ServerAddSignalSourceSequencerPlayback();
void ClientRemoveSignalSourceSequencerSample( const std::string& sSignalSourceID, const int iSoundID );
void ServerRemoveSignalSourceSequencerSample();
void ClientLockUpdate();
void ServerLockUpdate();
......@@ -892,7 +893,7 @@ public:
void ClientSetHomogeneousMediumParameters( const CVAStruct& oParams );
void ServerSetHomogeneousMediumParameters();
CVAStruct ClientGetHomogeneousMediumParameters( const CVAStruct& oArgs);
CVAStruct ClientGetHomogeneousMediumParameters( const CVAStruct& oArgs );
void ServerGetHomogeneousMediumParameters();
......
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