mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
eba3a9838e
1 changed files with 9 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <fstream>
|
||||
#include <pthread.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
#include "Audio.h"
|
||||
#include "Util.h"
|
||||
#include "AudioSource.h"
|
||||
|
@ -204,16 +205,22 @@ void *receiveAudioViaUDP(void *args) {
|
|||
int16_t *receivedData = new int16_t[BUFFER_LENGTH_SAMPLES];
|
||||
int *receivedBytes = new int;
|
||||
|
||||
timeval previousReceiveTime, currentReceiveTime;
|
||||
timeval previousReceiveTime, currentReceiveTime = {};
|
||||
|
||||
if (LOG_SAMPLE_DELAY) {
|
||||
gettimeofday(&previousReceiveTime, NULL);
|
||||
|
||||
char *directory = new char[50];
|
||||
char *filename = new char[50];
|
||||
sprintf(filename, "%s/Desktop/%ld.csv", getenv("HOME"), previousReceiveTime.tv_sec);
|
||||
|
||||
sprintf(directory, "%s/Desktop/echo_tests", getenv("HOME"));
|
||||
|
||||
mkdir(directory, S_IRWXU | S_IRWXG | S_IRWXO);
|
||||
sprintf(filename, "%s/%ld.csv", directory, previousReceiveTime.tv_sec);
|
||||
|
||||
logFile.open(filename, std::ios::out);
|
||||
|
||||
delete[] directory;
|
||||
delete[] filename;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue