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)