search for: speex_decoder_init

Displaying 20 results from an estimated 104 matches for "speex_decoder_init".

2005 Oct 17
6
Error Executing sampledec in VC++
...in SPXDEC.exe: 0xC0000005: Access violation reading location 0x0000000c. Unhandled exception at 0x004010fa in SPXDEC.exe: 0xC0000005: Access violation reading 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...
2005 Oct 17
3
Error Executing sampledec in VC++
...ot;); if (fo == NULL) cout << "Error!\n"; else cout << "Okay!\n"; fs = fopen ("pcmfile", "wb"); if (fs == NULL) cout << "Error creating file!\n"; else cout << "File created!\n"; while (!(feof(fo))) { 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); fread (&nbBytes, sizeof(int), 1, fo); fread (cbits, 1, nbBytes, fo); cout << "...
2005 Feb 09
1
encoding speex, (insanity looming)
...Thanks for your reply, I'm having a few difficulty's following you advise. You mention that I should be calling 'speex_encoder_int' & 'speex_decoder_int', I'm having problems finding these functions in the speex header. I am currenlty calling speex_encoder_init & speex_decoder_init in my test code, I have repeated the relevent bits of the example bellow. My version of speex is 1.1.6. Thanks once again for your help, David. enc_state = speex_encoder_init(&speex_wb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); speex_encoder...
2006 Nov 14
2
Quick survey for Speex 1.2
...st few bits of each frame. The encoder can change > bit-rate at any time without telling the decoder. Can you be more > precise as to what isn't clear? I think that one got me too. If mode is detected automatically by the decoder, what is the purpose of the 'mode' parameter in speex_decoder_init function? I'd file it under confusing API. Or am I missing something here (again)? Gregg
2006 Jun 27
3
Windows Mobile build, memory allocation
...pload the binary builds of static library files to my site www.phonestack.com. I am porting our LTP (lightweight telephony protocol) to some embedded systems. I require to run speex in an environment that doesn't support memory allocations. How difficult is it to convert speex_encoder_init and speex_decoder_init to use preallocated memory buffers (presumably passed by the initilisatio functions themselves)? - farhan - farhan -----Original Message----- From: speex-dev-bounces@xiph.org [mailto:speex-dev-bounces@xiph.org] On Behalf Of Gervase Markham Sent: Wednesday, June 28, 2006 2:55 AM To: Jean-Marc Val...
2005 Feb 09
2
encoding speex, (insanity looming)
...amp;enc_bits); enc_state = speex_encoder_init(&speex_wb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &rate); // setup decoder speex_bits_init(&dec_bits); dec_state = speex_decoder_init(&speex_wb_mode); speex_encoder_ctl(dec_state, SPEEX_SET_QUALITY, &quality); speex_encoder_ctl(dec_state, SPEEX_SET_SAMPLING_RATE, &rate); int file; // for the file to write. // setup file for writing the encoded => decoded audio out to if ((file=...
2005 Oct 17
0
Error Executing sampledec in VC++
...PXDEC.exe: 0xC0000005: Access violation reading location 0x0000000c. Unhandled exception at 0x004010fa in SPXDEC.exe: 0xC0000005: Access violation reading 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 {...
2006 May 21
2
Re: High pitched whine with Speex
...ats. My sample rate is 8000 Here's pretty much all my speex code: ENCODING INIT: channel->enc_state=speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(channel->enc_state, SPEEX_GET_FRAME_SIZE, &channel->speexOutgoingFrameSampleCount); DECODING INIT: channel->dec_state=speex_decoder_init(&speex_nb_mode); speex_decoder_ctl(channel->dec_state, SPEEX_GET_FRAME_SIZE, &channel->speexIncomingFrameSampleCount); ENCODING: speex_encode(channel->enc_state, (float *) inputBuffer, &speexBits); bytesWritten = speex_bits_write(&speexBits, tempOutput+1, 2048-1); DECODI...
2004 Aug 06
2
SPEEX_GET_SAMPLING_RATE of encoder is wrong
...query SPEEX_GET_SAMPLING_RATE as in speex_encoder_ctl ( m_pEncoderState, SPEEX_GET_SAMPLING_RATE, &m_SampleRate ); I get 2 The encoder is initialized with m_pEncoderState = speex_encoder_init ( &speex_wb_mode ); On the decoder side, the correct sampling rate is returned: m_pDecoderState = speex_decoder_init ( &speex_wb_mode ); speex_decoder_ctl ( m_pDecoderState, SPEEX_GET_SAMPLING_RATE, &m_SampleRate ); I debugged the encoder and the stack trace is as follows: -> speex_encoder_ctl ( m_pEncoderState, SPEEX_GET_SAMPLING_RATE, &m_SampleRate ); -> int speex_encoder_ctl(void *state, int...
2007 Dec 21
1
Continous decoding of several audio files without destroying speex_decoder
...e is a problem in the way we uses speex decoder API. Basically, we initialize speex decoder only once and just reset the decoder before we decoding another file. Do we need to intialize speex decoder and destory decoder for each audio file decoding ? Here is current pseudo code. main() { m_speex = speex_decoder_init(speex_nb_mode); speex_decoder_ctl(m_speex, SPEEX_SET_ENH, &tmp); speex_bits_init(&m_bits); while(end of files) { speex_decoder_ctl(m_speex, SPEEX_RESET_STATE, &tmp); speex_bits_reset(&m_bits); OpenFile(speex audio file); while(end of file) { fread(speex frame...
2008 Apr 30
1
decode problem
Hi I am using first time speex library, and this is my first problem. I need to decode AMR-NB packet to PCM. I read all manual instruction and I wrote these simple lines of code. bool CMMediaObj::AmrInit() { speex_bits_init(&bits); destate = speex_decoder_init(&speex_nb_mode); int tmp=1; speex_decoder_ctl(destate, SPEEX_SET_ENH, &tmp); return true; } void CMMediaObj::AmrFreeMemory() { if (destate){ speex_bits_destroy(&bits); speex_decoder_...
2009 Dec 15
1
encoding time
...noon! Thank you for your product Speex. We want to use it in microcontroller AT91SAM7S256 (48 MHz). We applied the following: #define FIXED_POINT #define DISABLE_WIDEBAND #define DISABLE_HIGHPASS #define MANUAL_ALLOC #define OS_SUPPORT_CUSTOM at speex_encoder_init(&speex_nb_mode); speex_decoder_init(&speex_nb_mode); tmp=2; speex_encoder_ctl(st, SPEEX_SET_QUALITY, &tmp); Encoding time for one frame (20 ms) is 46 ms, and decoding time is 4 ms. Is it possible to reduce encoding time? Thank you. Best regards, Dr Elyagin Sergei
2004 Aug 06
2
decode in ppc 2003
...FILE *fout; // output file FILE *fin; // input file short out[FRAME_SIZE]; short output[FRAME_SIZE]; char cbits[200]; int nbBytes; void *state; SpeexBits bits; int i, tmp; state = speex_decoder_init(&speex_nb_mode); tmp=1; speex_decoder_ctl(state, SPEEX_SET_ENH, &tmp); outFile = outfile; fout = fopen(outFile, "w"); inFile = infile; fin = fopen(inFile,"r"); speex_bits_init(&am...
2007 Jun 01
1
help on Blackfin
...speex_decode_int [_speex_decode_int]' referenced from 'Debug\Process_data.doj' 'speex_decoder_ctl [_speex_decoder_ctl]' referenced from 'Debug\Process_data.doj' 'speex_decoder_destroy [_speex_decoder_destroy]' referenced from 'Debug\Process_data.doj' 'speex_decoder_init [_speex_decoder_init]' referenced from 'Debug\Process_data.doj' 'speex_encode_int [_speex_encode_int]' referenced from 'Debug\Process_data.doj' 'speex_encoder_ctl [_speex_encoder_ctl]' referenced from 'Debug\Process_data.doj' 'speex_encoder_destroy [_...
2005 Oct 17
0
Error Executing sampledec in VC++
Mon, Here is feedback that I got concerning the access violation, i.e. the failure of the while loop below. Does this solve the problem? Steve My guess is that speex_decoder_init() should be outside the while().. loop as speex_decoder_destroy() is also outside. ----- Original Message ----- From: Mo Win To: speex-dev@xiph.org Sent: Monday, October 17, 2005 8:05 AM Subject: [Speex-dev] Error Executing sampledec in VC++ hey guys, I just compiled an application...
2005 Aug 12
1
Encode/Decode problem
...dio(UInt8 *data, long dataLength) { //data is a linear PCM stream from an attached microphone. sample rate is 8000, 16 bits per sample void *state; void *state2; SpeexBits bits; short tempShort; short tempPtr[160]; short tempPtrDecode[160]; state = speex_encoder_init(&speex_nb_mode); state2 = speex_decoder_init(&speex_nb_mode); speex_bits_init(&bits); //code simplified to just read in the first frame for (int i = 0; i < 320; i +=2) { tempShort = *((short*)(data + i)); tempPtr[i / 2] = tempShort; } speex_bits_reset(&bits); speex_encode_int(state, tempPtr, &bits); speex_bits_rewin...
2013 May 09
1
Moving from Speex to Opus (question 2)
...the following cpp file: #include "StdAfx.h" #include "spxcodec.h" #define MAX_FRAME_SIZE 2000 #define MAX_FRAME_BYTES 2000 CSpxCodec::CSpxCodec() : enh(1), rate(8000) { } CSpxCodec::~CSpxCodec() { } void CSpxCodec::Init() { speex_bits_init(&bits); decstate = speex_decoder_init(&speex_nb_mode); speex_decoder_ctl(decstate, SPEEX_SET_SAMPLING_RATE, &rate); speex_decoder_ctl(decstate, SPEEX_SET_ENH, &enh); int iFrameSize=0; speex_decoder_ctl(decstate, SPEEX_GET_FRAME_SIZE, &iFrameSize); } void CSpxCodec::Free() { speex_bits_destro...
2005 Sep 03
2
Library export file for Win32 (patch)
...ex.def =================================================================== --- speex.def (revision 9882) +++ speex.def (working copy) @@ -2,49 +2,71 @@ ; speex.def ; LIBRARY +NAME libspeex.dll EXPORTS ; -speex_encoder_init -speex_encoder_destroy -speex_encode -speex_encoder_ctl -speex_decoder_init -speex_decoder_destroy -speex_decode -speex_decoder_ctl -speex_mode_query -speex_lib_ctl -speex_lib_get_mode -speex_bits_init -speex_bits_init_buffer -speex_bits_destroy -speex_bits_reset -speex_bits_rewind -speex_bits_read_from -speex_bits_read_whole_bytes -speex_bits_write -speex_b...
2012 Mar 10
3
problem: The decoded frame is not as the original one
...;z++) { printf("%c",outBuffer[z]); } printf("\n \n"); /*===============================END OF ENCODING=========================================*/ /*===============================DECODING==============================================*/ speex_bits_init(&decBits); dec_state=speex_decoder_init(&speex_nb_mode); speex_decoder_ctl(dec_state, SPEEX_GET_FRAME_SIZE, &frame_size); //-----------TWO CALLS FOR DECODING------------------- speex_bits_read_from(&decBits,outBuffer,nbBytes); speex_decode_int(dec_state,&decBits,decFrame); //----------------------------------------------...
2004 Aug 06
1
About reducing noise..
...// copy bits to an array of chars nbBytes = speex_bits_write ( &bits, cbits, 200); // copy these cbits into a buffer CopyBuffer(pBuffer + dwLength, cbits, nbBytes); dwLength += nbBytes; } // uninitialize For decoding . SpeexBits bits; int i, tmp; state = speex_decoder_init(&speex_nb_mode); tmp =1; speex_decoder_ctl(state, SPEEX_SET_ENH, &tmp); speex_bits_init(&bits); char temp[10]; long sizeToRead = 4; while(1) { int ret = ReadFile(file,temp, sizeToRead , &bytesRead,NULL); if( bytesRead == 0 ) { break; } nbBytes =...