search for: spxbits

Displaying 5 results from an estimated 5 matches for "spxbits".

2005 Oct 17
6
Error Executing sampledec in VC++
...location 0x0000000c. It looks like the same error. I've attached the code below Thanks, Mon Portion of the revised code: decstate = speex_decoder_init (&speex_nb_mode); // Set default options for decoding: temp = 1; speex_decoder_ctl(decstate, SPEEX_SET_ENH, &temp); // Initialize spxbits (structure SpeexBits) speex_bits_init (&spxbits); while (!(feof(fo))) // this is where the problem starts { fread (&nbBytes, sizeof(int), 1, fo); fread (cbits, 1, nbBytes, fo); cout << "1"; // just to see whether the loop iterates speex_bits_read_from (&spxbits, cbits...
2005 Oct 17
3
Error Executing sampledec in VC++
.../speex.h" #include <stdio.h> #include <iostream.h> void main () { // Definitions #define FRAME_SIZE 160 #define FIXED_POINT // Variable Declarations FILE *fo, *fs; short spx [FRAME_SIZE]; float pcm [FRAME_SIZE]; char cbits [200]; int nbBytes, n, temp; void *decstate; SpeexBits spxbits; // Program starts here: cout << "Starting spxdec...\n"; fo = fopen("samp.spx","rb"); if (fo == NULL) cout << "Error!\n"; else cout << "Okay!\n"; fs = fopen ("pcmfile", "wb"); if (fs == NULL) cout <<...
2005 Oct 17
0
Error Executing sampledec in VC++
.... It looks like the same error. I've attached the code below Thanks, Mon Portion of the revised code: decstate = speex_decoder_init (&speex_nb_mode); // Set default options for decoding: temp = 1; speex_decoder_ctl(decstate, SPEEX_SET_ENH, &temp); // Initialize spxbits (structure SpeexBits) speex_bits_init (&spxbits); while (!(feof(fo))) // this is where the problem starts { fread (&nbBytes, sizeof(int), 1, fo); fread (cbits, 1, nbBytes, fo); cout << "1"; // just to see whether the loop iterates...
2005 Oct 17
0
Error Executing sampledec in VC++
...void main () { // Definitions #define FRAME_SIZE 160 #define FIXED_POINT // Variable Declarations FILE *fo, *fs; short spx [FRAME_SIZE]; float pcm [FRAME_SIZE]; char cbits [200]; int nbBytes, n, temp; void *decstate; SpeexBits spxbits; // Program starts here: cout << "Starting spxdec...\n"; fo = fopen("samp.spx","rb"); if (fo == NULL) cout << "Error!\n"; else cout << "Okay!\n"; fs = fopen ("pcmfile...
2006 Sep 19
0
Multiple frame encode and decode
...r didn`t find the terminator bits. And no sound at all. Did I do anything wrong? Speex setting: narrow band, 8000 khz,20ms,8000 bps. 1 frame encoded size = 20 bytes 1 frame decoded size = 160 bytes, but i got 960 bytes(160 x 6 frames) Code sample: Encode: speex_encode_int(mEncState, input, &mSpxBits); length = speex_bits_write(&mSpxBits, encodedData, 200); memcpy(&mRtpBuffer[mCopyIndex],encodedData,length); Decode: ------ speex_bits_read_from(&mSpxBits, input, inputLength); while(speex_decode_int(decState, &spxBits, buff) != -1) { written = mSpxBits.nbBits; //hope i get 160 by...