mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
send client their own packet for solo mixer testing
This commit is contained in:
parent
4fc9dd6323
commit
4270cfe2b4
2 changed files with 6 additions and 8 deletions
|
@ -171,10 +171,11 @@ void *sendBuffer(void *args)
|
|||
}
|
||||
|
||||
for(int as = 0; as < BUFFER_LENGTH_SAMPLES; as++) {
|
||||
long longSample = previousOutput != NULL
|
||||
? masterMix[as] - previousOutput[as]
|
||||
: masterMix[as];
|
||||
// long longSample = previousOutput != NULL
|
||||
// ? masterMix[as] - previousOutput[as]
|
||||
// : masterMix[as];
|
||||
|
||||
long longSample = masterMix[as];
|
||||
|
||||
int16_t shortSample;
|
||||
|
||||
|
@ -195,7 +196,7 @@ void *sendBuffer(void *args)
|
|||
|
||||
}
|
||||
|
||||
sentBytes = audioSocket->send(agents[a].address, agents[a].port, (void *) clientMix, BUFFER_LENGTH_BYTES);
|
||||
sentBytes = audioSocket->send(agents[a].address, agents[a].port, clientMix, BUFFER_LENGTH_BYTES);
|
||||
|
||||
if (sentBytes < BUFFER_LENGTH_BYTES) {
|
||||
std::cout << "Error sending mix packet! " << sentBytes << strerror(errno) << "\n";
|
||||
|
|
|
@ -51,10 +51,7 @@ UDPSocket::~UDPSocket() {
|
|||
// Receive data on this socket with retrieving address of sender
|
||||
bool UDPSocket::receive(void *receivedData, int *receivedBytes) {
|
||||
|
||||
*receivedBytes = recvfrom(handle, receivedData, MAX_BUFFER_LENGTH_BYTES,
|
||||
0, (sockaddr *)&senderAddress, &addLength);
|
||||
|
||||
return (*receivedBytes > 0);
|
||||
return receive(&senderAddress, receivedData, receivedBytes);
|
||||
}
|
||||
|
||||
// Receive data on this socket with the address of the sender
|
||||
|
|
Loading…
Reference in a new issue