diff --git a/chunk.h b/chunk.h index 67bb3fc1..6a51fcf1 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/client.cpp b/client.cpp index 5c2bd504..ce80235e 100644 --- a/client.cpp +++ b/client.cpp @@ -211,8 +211,8 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer, for( i=0; ipayload[4*i+1]*256) + chunk->payload[4*i+0]; - *out++ = (chunk->payload[4*i+3]*256) + chunk->payload[4*i+2]; + *out++ = (chunk->payload[4*i+1] << 8) + chunk->payload[4*i+0]; + *out++ = (chunk->payload[4*i+3] << 8) + chunk->payload[4*i+2]; } delete chunk;