summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Midgley <bmidgley@xmission.com>2008-01-14 15:03:23 +0000
committerBrad Midgley <bmidgley@xmission.com>2008-01-14 15:03:23 +0000
commit23f3e84ba43efde94aa52c77455ff28662ed2b79 (patch)
tree9e54d18a9c4196277e280a9429ab5db92eaabdf2
parentd4d085c9a00d2d457b1a97b46b5f52bf68cd4a1a (diff)
fix initialization
-rw-r--r--sbc/sbc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbc/sbc.c b/sbc/sbc.c
index 8e2aff62..d8385bd8 100644
--- a/sbc/sbc.c
+++ b/sbc/sbc.c
@@ -705,7 +705,10 @@ static void sbc_encoder_init(struct sbc_encoder_state *state,
{
memset(&state->X, 0, sizeof(state->X));
state->subbands = frame->subbands;
- state->position[0] = state->position[1] = 80;
+ if(frame->subbands == 8)
+ state->position[0] = state->position[1] = 72;
+ else
+ state->position[0] = state->position[1] = 36;
}
static inline void _sbc_analyze_four(const int32_t *in, int32_t *out)