mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:41:20 +02:00
hook audio-mixer up to new domain server check in method
This commit is contained in:
parent
0585d6756d
commit
d95d3eba3b
1 changed files with 9 additions and 1 deletions
|
@ -80,7 +80,6 @@ int main(int argc, const char* argv[]) {
|
||||||
agentList->linkedDataCreateCallback = attachNewBufferToAgent;
|
agentList->linkedDataCreateCallback = attachNewBufferToAgent;
|
||||||
|
|
||||||
agentList->startSilentAgentRemovalThread();
|
agentList->startSilentAgentRemovalThread();
|
||||||
agentList->startDomainServerCheckInThread();
|
|
||||||
|
|
||||||
unsigned char* packetData = new unsigned char[MAX_PACKET_SIZE];
|
unsigned char* packetData = new unsigned char[MAX_PACKET_SIZE];
|
||||||
|
|
||||||
|
@ -99,7 +98,16 @@ int main(int argc, const char* argv[]) {
|
||||||
|
|
||||||
gettimeofday(&startTime, NULL);
|
gettimeofday(&startTime, NULL);
|
||||||
|
|
||||||
|
timeval lastDomainServerCheckIn = {};
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
|
// send a check in packet to the domain server if DOMAIN_SERVER_CHECK_IN_USECS has elapsed
|
||||||
|
if (usecTimestampNow() - usecTimestamp(&lastDomainServerCheckIn) >= DOMAIN_SERVER_CHECK_IN_USECS) {
|
||||||
|
gettimeofday(&lastDomainServerCheckIn, NULL);
|
||||||
|
AgentList::getInstance()->sendDomainServerCheckIn();
|
||||||
|
}
|
||||||
|
|
||||||
for (AgentList::iterator agent = agentList->begin(); agent != agentList->end(); agent++) {
|
for (AgentList::iterator agent = agentList->begin(); agent != agentList->end(); agent++) {
|
||||||
PositionalAudioRingBuffer* positionalRingBuffer = (PositionalAudioRingBuffer*) agent->getLinkedData();
|
PositionalAudioRingBuffer* positionalRingBuffer = (PositionalAudioRingBuffer*) agent->getLinkedData();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue