Displaying 5 results from an estimated 5 matches for "cspeexcodec".
Did you mean:
speexcodec
2010 Apr 13
1
Another newbie question on encoding
....can I use 8, 16, 24..and so on?)
2. If I have this situation:
SAMPLE RATE.....: 8000
BITS PER SAMPLE.: 16
CHANNELS........: 1
DATA TYPE.......: float
And I need to encode a buffer of 640 PCM float frames, the following
Encode method is correct?
Thanks in advance for the help!
Daniele.
class CSpeexCodec
{
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 *...
2010 Jun 10
0
speex multi frame
Hi Alls
Sorry for my newbe question
I want to decode a speex multi frame stream
I got 38 bytes packets and make 800 bytes buffer
this is my simple code
CSpeexCodec::CSpeexCodec(void)
{
//
speex_bits_init(&m_speexBitsOut);
m_pSpeexEncStateOut = speex_encoder_init(&speex_nb_mode);
int nEhc=1;
int nSamplePerSec = SAMPLES_PER_SEC;
static int nQuality = 8;
speex_encoder_ctl(m_pSpeexEncStateOut, SPEEX_SET_SAMPLING_RATE,
&nSampleP...
2010 Apr 14
3
Decoded output buffer size
...s 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 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_...
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.
2010 Apr 14
0
Decoded output buffer size
...>> 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 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)
&...