Merge pull request #538 from ZappoMan/localmode

added local mode to audio-mixer
This commit is contained in:
Philip Rosedale 2013-06-14 10:08:47 -07:00
commit b637408b54

View file

@ -71,9 +71,20 @@ void attachNewBufferToAgent(Agent *newAgent) {
}
}
bool wantLocalDomain = false;
int main(int argc, const char* argv[]) {
setvbuf(stdout, NULL, _IOLBF, 0);
// Handle Local Domain testing with the --local command line
const char* local = "--local";
::wantLocalDomain = cmdOptionExists(argc, argv,local);
if (::wantLocalDomain) {
printf("Local Domain MODE!\n");
int ip = getLocalAddress();
sprintf(DOMAIN_IP,"%d.%d.%d.%d", (ip & 0xFF), ((ip >> 8) & 0xFF),((ip >> 16) & 0xFF), ((ip >> 24) & 0xFF));
}
AgentList* agentList = AgentList::createInstance(AGENT_TYPE_AUDIO_MIXER, MIXER_LISTEN_PORT);
ssize_t receivedBytes = 0;