search for: amountsamples

Displaying 1 result from an estimated 1 matches for "amountsamples".

2009 Apr 13
0
encoding -> decoding doesnt work
...der_ctl(enc_state, SPEEX_SET_VBR_QUALITY, &tmp); tmp = 2; speex_encoder_ctl( enc_state, SPEEX_SET_COMPLEXITY, &tmp ); tmp = 1; speex_encoder_ctl( enc_state, SPEEX_SET_DTX, &tmp ); tmp = 1; speex_encoder_ctl( enc_state, SPEEX_SET_VAD, &tmp ); int numBytesEncoded = 0; int amountSamples = defaultfrequency * numchannels * 5; // frequency is 16000, channels = 1, 5 is for 5 seconds unsigned int total = 0; char *encoded = NULL; for( int j = 0; j < amountSamples/frame_size; j++ ) { // Encode the voice data speex_bits_reset(&bits); speex_encode_int(enc_state, (short...