search for: speex_encode_stereo_int

Displaying 9 results from an estimated 9 matches for "speex_encode_stereo_int".

2007 Apr 16
4
Stereo speex on Blackfin
...ut much luck. This is a standalone application with no OS using the speex library provided in the blackfin multimedia sdk. I believe this library was ported to run using Visual DSP++ by Jean-Marc (may be wrong). I have mono encoding working fine, to add stereo encoding I just added a call to speex_encode_stereo_int() before I encode the mono channel. The data passed to speex_encode_stereo_int() is the two channels interleaved. The resulting file (after being wrapped in Ogg with channels set to two) is decoded as stereo but is missing the separation, ie. the two channels have been mixed but there is no i...
2011 Jan 02
0
Newbie problem with encoding
...; } This returns 320 as the expected frame size. 1. I assume this is the block size I have to call the encoder with. int lib_speex_encode(short *samples, char*encoded_bytes) { // Encode the data int bytes_written; if(enc_state == NULL) return -100; speex_bits_reset(&bits); speex_encode_stereo_int(samples,320, &bits); bytes_written = speex_bits_write(&bits, encoded_bytes, 1024); return bytes_written; } This goes wrong. 1. Is speex_encode_stereo_int() the right thing to call with interleaved samples. I note it has a different signature to speex_encode_int(). 2. How big should...
2011 Nov 28
1
Speex stereo encoding
...Create output .flv file FlvFileFormat flvFile(8, "StereoSpeex.flv", 11, 1, 1, channels - 1); //Encode frame by frame while (nbBytes > 0) { nbBytes = fread(input, 1, frame_size * 2, fin); speex_bits_reset(&bits); //If the input file is stereo calling to speex_encode_stereo_int if (channels==2) { speex_encode_stereo_int(input, frame_size, &bits); } //Encode the input data and write it to the cbits speex_encode_int(enc_state, input, &bits); nbBytes = speex_bits_write(&bits, cbits, MAX_FRAME_BYTES); //Add enc...
2007 Apr 02
1
Problems with stereo data
..._QUALITY, &Tmp); FILE* fin = fopen(argv[1], "rb"); FILE* fout = fopen(argv[2], "wb"); SpeexBits Bits; speex_bits_init(&Bits); short Frame[FrameSize]; char Cbits[200]; while (!feof(fin)) { speex_bits_reset(&Bits); fread(Frame, sizeof(short), FrameSize, fin); speex_encode_stereo_int(Frame, FrameSize, &Bits); speex_encode_int(State, Frame, &Bits); short BytesToWrite = speex_bits_write(&Bits, Cbits, 200); fwrite(&BytesToWrite, sizeof(short), 1, fout); fwrite(Cbits, 1, BytesToWrite, fout); } speex_encoder_destroy(State); speex_bits_destroy(&Bits); fclo...
2007 Apr 25
0
echo cancellation on Blackfin DSK
...HROUGH // Mux the Speex output onto the stereo audio stream for(i = 0; i < SPEEX_FRAME_SIZE; i++) { *out++ = *out_left; // channel 1 *out++ = *out_left++; // channel 2 } #else //ACTIVATE_STEREO speex_bits_reset(&g_Bits); // Encode the frame speex_encode_stereo_int((spx_int16_t *)in, SPEEX_FRAME_SIZE, &g_Bits); speex_encode_int(g_pvEnc, (spx_int16_t *)in, &g_Bits); g_nBits = speex_bits_write(&g_Bits, g_cBits, 200); speex_bits_rewind(&g_Bits); // Decode the frame speex_decode_int(g_pvDec, &g_Bits, (spx_int16_t *)out...
2007 Nov 14
0
Audio glitches/Configuration problem !!?
...essing short* input = (short*)m_pBuffer; char* output = outBuffer; *outSize = 0; int tmpBufferSize = m_BufferSize; while(tmpBufferSize >= m_FrameSizeInBytes + m_SpeexLookAheadInBytes) { speex_bits_reset(&m_SpeexBits); if(m_Channels == 2) speex_encode_stereo_int(input, m_FrameSizeInSamples, &m_SpeexBits); if (m_SpeexPreprocessState != NULL) speex_preprocess(m_SpeexPreprocessState, input, NULL); speex_encode_int(m_SpeexState, input, &m_SpeexBits); int bytes = speex_bits_write(&m_SpeexBits, output, outMAXSize...
2005 Sep 03
2
Library export file for Win32 (patch)
...td_stereo_request_handler @41 +speex_std_vbr_quality_request_handler @42 +speex_std_vbr_request_handler @43 +speex_decode_int @44 +speex_decode_stereo_int @45 +speex_echo_cancel @46 +speex_echo_state_destroy @47 +speex_echo_state_init @48 +speex_echo_state_reset @49 +speex_encode_int @50 +speex_encode_stereo_int @51 +speex_jitter_destroy @52 +speex_jitter_get @53 +speex_jitter_get_pointer_timestamp @54 +speex_jitter_init @55 +speex_jitter_put @56 +speex_lib_get_mode @57 +speex_preprocess @58 +speex_preprocess_ctl @59 +speex_preprocess_estimate_update @60 +speex_preprocess_state_destroy @61 +spee...
2008 Mar 29
0
GCC/ELF Visibility patch
...DISABLE_FLOAT_API -void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits) +EXPORT void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits) { int i, tmp; float e_left=0, e_right=0, e_tot=0; @@ -143,7 +143,7 @@ } #endif /* #ifndef DISABLE_FLOAT_API */ -void speex_encode_stereo_int(spx_int16_t *data, int frame_size, SpeexBits *bits) +EXPORT void speex_encode_stereo_int(spx_int16_t *data, int frame_size, SpeexBits *bits) { int i, tmp; spx_word32_t e_left=0, e_right=0, e_tot=0; @@ -218,7 +218,7 @@ } #ifndef DISABLE_FLOAT_API -void speex_decode_stereo(float *data, i...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...DISABLE_FLOAT_API -void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits) +EXPORT void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits) { int i, tmp; float e_left=0, e_right=0, e_tot=0; @@ -143,7 +143,7 @@ } #endif /* #ifndef DISABLE_FLOAT_API */ -void speex_encode_stereo_int(spx_int16_t *data, int frame_size, SpeexBits *bits) +EXPORT void speex_encode_stereo_int(spx_int16_t *data, int frame_size, SpeexBits *bits) { int i, tmp; spx_word32_t e_left=0, e_right=0, e_tot=0; @@ -218,7 +218,7 @@ } #ifndef DISABLE_FLOAT_API -void speex_decode_stereo(float *data, i...