From f444f63d252f0d32de67d2b91d2f51e33a6fab2f Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d8a302eb-03bc-478d-80e4-98257eca68ef> Date: Tue, 1 Jul 2014 20:31:27 +0000 Subject: [PATCH] optimizations git-svn-id: svn://elaine/murooma/trunk@52 d8a302eb-03bc-478d-80e4-98257eca68ef --- chunk.h | 2 +- client.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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;