chunks have shorts

git-svn-id: svn://elaine/murooma/trunk@56 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
(no author) 2014-07-03 19:11:30 +00:00
parent 332bacd4ee
commit f72c213407
3 changed files with 5 additions and 5 deletions

View file

@ -13,7 +13,6 @@
#define FRAMES_PER_BUFFER (PLAYER_CHUNK_SIZE/CHANNELS)
int bufferMs;
template <size_t T>
struct ChunkT

View file

@ -29,6 +29,7 @@ std::deque<int> timeDiffs;
std::mutex mtx;
std::mutex mutex;
std::condition_variable cv;
int bufferMs;
void player()
@ -334,7 +335,7 @@ int main (int argc, char *argv[])
timeval now;
gettimeofday(&now, NULL);
std::cerr << "New chunk: " << chunkTime(*chunk) << "\t" << timeToStr(now) << "\t" << getAge(*chunk) << "\n";
for (size_t n=0; n<WIRE_CHUNK_MS/PLAYER_CHUNK_MS; ++n)
/* for (size_t n=0; n<WIRE_CHUNK_MS/PLAYER_CHUNK_MS; ++n)
{
PlayerChunk* playerChunk = new PlayerChunk();
playerChunk->tv_sec = chunk->tv_sec;
@ -346,7 +347,7 @@ int main (int argc, char *argv[])
mutex.unlock();
cv.notify_all();
}
}
*/ }
delete chunk;
return 0;
}

View file

@ -42,7 +42,7 @@ int main () {
{
c[0] = cin.get();
c[1] = cin.get();
chunk.payload[idx++] = (int)c[0] + ((int)c[1] << 8);
chunk.payload[idx++] = (int)c[0] + ((int)c[1] * 256);
if (idx == WIRE_CHUNK_SIZE)
{
timeval now;
@ -63,7 +63,7 @@ int main () {
// snprintf ((char *) message.data(), size, "%05d %d", zipcode, c);
// message.data()[0] = c;
publisher.send(message);
addMs(ts, WIRE_CHUNK_MS);
/// addMs(ts, WIRE_CHUNK_MS);
idx = 0;
// msg[0] = '0';
}