Displaying 20 results from an estimated 25 matches for "outbuffer".
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
...IDEBAND // 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_, SPEEX_GET_FRAME_SIZE, &frameSize_);
// Create the output buffer
outBuffer_ = new char[frameSize_];
speex_bits_init(&spx_bits_);
}
UINT CSpeexCodec::Encode( float...
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 d...
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,
E...
2019 Nov 06
0
【SPEEX】 use speex resample make noise
Look, how about you start from the testresample.c file? Oh, and you seem
to be reading 320 samples at a time and processing 640, so that can't be
good (and even beyond that your code is wrong for other reasons).
Jean-Marc
On 11/6/19 1:56 AM, zhouyuchen at iauto.com wrote:
> Hello,
> I printed the log, in/out len is not truncated, which means that the
> input and output are not
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 = Cr...
2009 Mar 18
1
sprintf("%d", integer(0)) aborts
In R's sprintf() if any of the arguments has length 0
the function aborts. E.g.,
> sprintf("%d", integer(0))
Error in sprintf("%d", integer(0)) : zero-length argument
> sprintf(character(), integer(0))
Error in sprintf(character(), integer(0)) :
'fmt' is not a non-empty character vector
This comes up in code like
x[nchar(x)==0] <-
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 noi...
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 noi...
2019 Nov 05
0
【SPEEX】 use speex resample make noise
Be aware that inlen is an in/out parameter. It tells you how many
samples the resampler read. That number can be smaller than what you
passed -- in which case it means you need to buffer them and give them
to the resampler again in the next call.
Jean-Marc
On 11/5/19 8:27 AM, zhouyuchen at iauto.com wrote:
> Hello,
> I have encountered some problems. I want to use speex to convert the
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
&g...
2010 Apr 14
3
Decoded output buffer size
Il 14/04/2010 14:37, Randy Yates wrote:
>
> Usually a buffer is one frame of data, and a frame is 20 milliseconds.
> Since the sample rate is typically 8 kHz in narrowband mode, this
> corresponds to a buffer size 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
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
&g...
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
&g...
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.