From ebddfc210a22dbdc8b61798e459142b75832584e Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d8a302eb-03bc-478d-80e4-98257eca68ef> Date: Sun, 6 Jul 2014 17:33:56 +0000 Subject: [PATCH] xxx git-svn-id: svn://elaine/murooma/trunk@74 d8a302eb-03bc-478d-80e4-98257eca68ef --- chunk.h | 2 +- server.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chunk.h b/chunk.h index 8d1fcb5d..3046f2c7 100644 --- a/chunk.h +++ b/chunk.h @@ -1,7 +1,7 @@ #ifndef CHUNK_H #define CHUNK_H -#define SAMPLE_RATE (44100) +#define SAMPLE_RATE (48000) //#define SAMPLE_BIT (16) #define CHANNELS (2) diff --git a/server.cpp b/server.cpp index c25557d1..050cb783 100644 --- a/server.cpp +++ b/server.cpp @@ -38,9 +38,9 @@ int main () { timeval last; gettimeofday(&last, NULL); last.tv_sec -= 1000; - while (true) + while (cin.good()) { - c[0] = cin.get(); + c[0] = cin.get(c); c[1] = cin.get(); chunk->payload[idx++] = (int)c[0] + ((int)c[1] * 256); if (idx == WIRE_CHUNK_SIZE)