search for: outbuff

Displaying 20 results from an estimated 25 matches for "outbuff".

Did you mean: outbuf
2012 Mar 10
3
problem: The decoded frame is not as the original one
...ason for this?.thanks for any help #include<stdio.h> #include"intel16.h" #include <speex/speex.h> #define FRAME_SIZE 160 #define MAX_NB_BYTES 25 SpeexBits bits; void *enc_state; int quality=4;?????? int nbBytes; int byte_ptr; int frame_size; short frame[FRAME_SIZE];? char outBuffer[20]; SpeexBits decBits; void *dec_state; short decFrame[FRAME_SIZE]; /*===========END ===============================*/ int z=0; int frame_size; int main (int argc,char **argv) { for( z=0;z<160;z++) ??? { ??? frame[z]=intel_theme[z];? //array of short from "intel16" header file...
2010 Apr 05
2
Regarding problem with encoding / decoding
Hi, Tank you for your reply. I have tried the sample programs given the manual and done encoding and decoding a wave file. That is working fine. I have already read the manual and API reference. But this problem did not occured with the wave file encoding/decoding. While capturing the data from MIC and encoding/decoding is giving this problem. Thanks and Regards, Vijender Reddy, -----
2010 Apr 13
1
Another newbie question on encoding
...{ public: enum ESpeexCodecType { SC_ENCODER, SC_DECODER }; enum ESpeexCodecMode { SC_NARROWBAND, // 8 kHz SC_WIDEBAND, // 16 kHz SC_ULTRAWIDEBAND // 32 kHz }; CSpeexCodec(); ~CSpeexCodec(); BOOL Init(); UINT Encode( sample_type *inBuff, char **outBuff, UINT BufferFrames ); private: SpeexBits spx_bits_; void* spx_state_; UINT spx_quality_; UINT frameSize_; char* outBuffer_; }; BOOL CSpeexCodec::Init() { spx_state_ = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(spx_state...
2004 Aug 06
2
Please 30 second to look a my code
...ied with the definition of FIXED_POINT... Regards Fabio P.S. Rodrigo did u do something similar? This is the code, what could be wrong? void CRegistratoreDlg::OnEncode() { Sleep(500); //Wait because drawing send window SpeexBits bits; void *state; short InBuffer[FRAME_SIZE]; char OutBuffer[200]; char waveheader[WAVEHEADER]; HANDLE WaveFile; HANDLE SpeexFile; DWORD NrOfBytesRead, NrOfBytesWritten; char nrBytes = 0; int nbBytes = 0; int bit_rate, frame_size, test=0; bool first=true; WaveFile = CreateFile(_T("\\Temp\\tempsound.wav"), GENERIC_READ, 0...
2010 Apr 20
0
Regarding problem with encoding / decoding
...eading the data from buffer in the following way where data is short[] type and buffer is char[]. for(int j=0;j < 160;j++) data[j]= (buffer[i+j]<<8)^0x8000; speex_encode_int(state, data, &bits); nbBytes = speex_bits_write(&bits, cbits, 200); outbuffer[k]= (char) nbBytes; // Storing length of encoded data first in outbuffer int writ= k+nbBytes,m=0; for(k=k+1;k<= writ; k++) // storing the encoded data in outbuffer outbuffer[k]= cbits[m++]; I am repeatedly doing until the input buffer is over. The encoded...
2012 Mar 11
0
problem: The decoded frame is not as the original one
...ason for this?.thanks for any help #include<stdio.h> #include"intel16.h" #include <speex/speex.h> #define FRAME_SIZE 160 #define MAX_NB_BYTES 25 SpeexBits bits; void *enc_state; int quality=4;?????? int nbBytes; int byte_ptr; int frame_size; short frame[FRAME_SIZE];? char outBuffer[20]; SpeexBits decBits; void *dec_state; short decFrame[FRAME_SIZE]; /*===========END ===============================*/ int z=0; int frame_size; int main (int argc,char **argv) { for( z=0;z<160;z++) ??? { ??? frame[z]=intel_theme[z];? //array of short from "intel16" header file...
2007 Nov 04
3
WaveIn/WaveOut and Speex
...Then, my decoding routine accepts the char buffer that was encoded with Speex: Decode(char* encBuffer, DWORD bufferLength) ... float* output = new float[frameSize]; ... speex_bits_read_from(&bits, encBuffer + offset, bytesToRead); speex_decode(dec_state, &bits, output); char* outBuffer=... for(UINT i = 0; i < frameSize; i++) { outBuffer[retValIndex] = output[i]; retValIndex++; } When I try to play outBuffer with waveOut, I can hear the voice "somewhere far", but there is a lot of distortion noise. Any help would be greatly appreciated!!! Thank you,...
2019 Nov 06
0
【SPEEX】 use speex resample make noise
...ampler; >     speex_resampler = speex_resampler_init(1, 16000, 48000, 10, &err); >     FILE *fp = fopen("/data/zhou.wav", "rb+"); >     FILE *fp2 = fopen("/data/zhou2.wav", "ab+"); >     spx_int16_t inbuff[640] = {0}; >     spx_int16_t outbuff[1920] = {0}; >     spx_uint32_t inlen = 640; >     spx_uint32_t outlen = 1920; >     while (1) >     { >         speex_resampler_reset_mem(speex_resampler); >         int len = fread(inbuff, 2, 320, fp); >         if (len <= 0) >         { >             break;...
2004 Aug 06
0
Please 30 second to look a my code
...; Rodrigo did u do something similar? > > This is the code, what could be wrong? > void CRegistratoreDlg::OnEncode() > { > Sleep(500); //Wait because drawing send window > > SpeexBits bits; > > void *state; > > short InBuffer[FRAME_SIZE]; > char OutBuffer[200]; > char waveheader[WAVEHEADER]; > > HANDLE WaveFile; > HANDLE SpeexFile; > > DWORD NrOfBytesRead, NrOfBytesWritten; > > char nrBytes = 0; > int nbBytes = 0; > int bit_rate, frame_size, test=0; > bool first=true; > > WaveFile =...
2009 Mar 18
1
sprintf("%d", integer(0)) aborts
...tfire Division wdunlap tibco.com ------------------------------------------------------------------- Index: sprintf.c =================================================================== --- sprintf.c (revision 48148) +++ sprintf.c (working copy) @@ -79,13 +79,13 @@ static R_StringBuffer outbuff = {NULL, 0, MAXELTSIZE}; Rboolean use_UTF8; - outputString = R_AllocStringBuffer(0, &outbuff); - /* grab the format string */ nargs = length(args); format = CAR(args); - if (!isString(format) || length(format) == 0) + if (!isString(format)) error(_("...
2007 Nov 04
2
WaveIn/WaveOut and Speex
...; > > Decode(char* encBuffer, DWORD bufferLength) > > ... > > float* output = new float[frameSize]; > > ... > > speex_bits_read_from(&bits, encBuffer + offset, bytesToRead); > > speex_decode(dec_state, &bits, output); > > > > char* outBuffer=... > > for(UINT i = 0; i < frameSize; i++) > > { > > outBuffer[retValIndex] = output[i]; > > retValIndex++; > > } > > > > When I try to play outBuffer with waveOut, I can hear the voice > ?somewhere far?, but there is a lot of distortion n...
2007 Nov 14
0
Audio glitches/Configuration problem !!?
...n and sample code's. I am facing audio glitches when encoding - decoding PCM data. The encoder and decoder procedures are copied below. What about the lookahead size ? how shouw we apply it in encoding stage ? thanks in advance bool SpeexEncoder::EncodeData(char * inBuffer, int inSize, char * outBuffer, int outMAXSize, int* outSize) { if(!m_Initialized) return false; // Copy data into the local buffer memcpy(m_pBuffer + m_BufferSize, inBuffer, inSize); m_BufferSize += inSize; // check if we have enougth data for the encoder, if(m_BufferSize < m_FrameSizeInBytes )...
2007 Nov 04
0
WaveIn/WaveOut and Speex
...; > > Decode(char* encBuffer, DWORD bufferLength) > > ... > > float* output = new float[frameSize]; > > ... > > speex_bits_read_from(&bits, encBuffer + offset, bytesToRead); > > speex_decode(dec_state, &bits, output); > > > > char* outBuffer=... > > for(UINT i = 0; i < frameSize; i++) > > { > > outBuffer[retValIndex] = output[i]; > > retValIndex++; > > } > > > > When I try to play outBuffer with waveOut, I can hear the voice > ?somewhere far?, but there is a lot of distortion n...
2019 Nov 05
0
【SPEEX】 use speex resample make noise
...nt err; >     speex_resampler = speex_resampler_init(1, 16000, 48000, 10, &err); >     FILE *fp = fopen("/data/zhou.wav", "rb+"); >     FILE *fp2 = fopen("/data/zhou2.wav", "ab+"); >     spx_int16_t inbuff[640] = {0}; >     spx_int16_t outbuff[1920] = {0}; >     spx_uint32_t inlen = 640; >     spx_uint32_t outlen = 1920; >     speex_resampler_skip_zeros(speex_resampler); >     while (1) >     { >         int len = fread(inbuff, 2, 320, fp); >         if (len <= 0) >         { >             break; &g...
2007 Nov 04
0
WaveIn/WaveOut and Speex
...th) >> >> ... >> >> float* output = new float[frameSize]; >> >> ... >> >> speex_bits_read_from(&bits, encBuffer + offset, bytesToRead); >> >> speex_decode(dec_state, &bits, output); >> >> >> >> char* outBuffer=... >> >> for(UINT i = 0; i < frameSize; i++) >> >> { >> >> outBuffer[retValIndex] = output[i]; >> >> retValIndex++; >> >> } >> >> >> >> When I try to play outBuffer with waveOut, I can hear the voice...
2010 Apr 14
3
Decoded output buffer size
...ze of 160 samples. Hi Randy, thanks for the reply. So, suppose I encode an audio buffer (8000 kHz, MONO, float) of 640 PCM frames. In output I have 4 speex frame of 20 byte each that I put in a RPT payload of 80 bytes: UINT CSpeexCodec::Encode( float *inBuff, const char**outBuff, UINT BufferFrames ) { speex_encoder_ctl(spx_state_, SPEEX_GET_FRAME_SIZE, &spx_frame_size_); while (BufferFrames>0) { speex_bits_reset(&spx_bits_); speex_encode(spx_state_, inBuff, &spx_bits_); nbBy...
2007 Nov 05
0
Fw: RE: WaveIn/WaveOut and Speex
...th) >> >> ... >> >> float* output = new float[frameSize]; >> >> ... >> >> speex_bits_read_from(&bits, encBuffer + offset, bytesToRead); >> >> speex_decode(dec_state, &bits, output); >> >> >> >> char* outBuffer=... >> >> for(UINT i = 0; i < frameSize; i++) >> >> { >> >> outBuffer[retValIndex] = output[i]; >> >> retValIndex++; >> >> } >> >> >> >> When I try to play outBuffer with waveOut, I can hear the voice...
2007 Nov 05
2
WaveIn/WaveOut and Speex
...th) >> >> ... >> >> float* output = new float[frameSize]; >> >> ... >> >> speex_bits_read_from(&bits, encBuffer + offset, bytesToRead); >> >> speex_decode(dec_state, &bits, output); >> >> >> >> char* outBuffer=... >> >> for(UINT i = 0; i < frameSize; i++) >> >> { >> >> outBuffer[retValIndex] = output[i]; >> >> retValIndex++; >> >> } >> >> >> >> When I try to play outBuffer with waveOut, I can hear the voice...
2009 Jul 15
1
[LLVMdev] llc can't generate object files on Windows
...ext, I tried a bitcode file whose first line was "target triple = "i686-pc-linux"". llc gave me the following error: FIXME: This code needs to be updated for changes in the CodeEmitter interfaces. In particular, this should set BufferBegin/BufferEnd/CurBufferPtr, not deal with OutBuffer! This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Any help would be appreciated. Thanks, Jon
2010 Apr 14
2
Decoded output buffer size
Hi, in a VoIP application, the endpoint A send speex payload to B. B doesn't know how A acquire audio, it only know that the channel is narrowband so, how can B know the size of the output buffer to pass to the speex_decode()? Thanks, Daniele.