search for: speexbit

Displaying 20 results from an estimated 148 matches for "speexbit".

Did you mean: speexbits
2008 Nov 07
1
Patch : Make speex_bits_read_from and speex_bits_read_whole_bytes const correct
...n-Marc, The following patch makes the above two read functions const correct. Cheers, Erik diff --git a/include/speex/speex_bits.h b/include/speex/speex_bits.h index a26fb4c..234ec53 100644 --- a/include/speex/speex_bits.h +++ b/include/speex/speex_bits.h @@ -77,7 +77,7 @@ void speex_bits_reset(SpeexBits *bits); void speex_bits_rewind(SpeexBits *bits); /** Initializes the bit-stream from the data in an area of memory */ -void speex_bits_read_from(SpeexBits *bits, char *bytes, int len); +void speex_bits_read_from(SpeexBits *bits, const char *bytes, int len); /** Append bytes to the bit-strea...
2008 Mar 29
0
GCC/ELF Visibility patch
...gt;= SPEEX_NB_MODES) return NULL; Index: libspeex/bits.c =================================================================== --- libspeex/bits.c (revision 14645) +++ libspeex/bits.c (working copy) @@ -45,7 +45,7 @@ #define MAX_CHARS_PER_FRAME (2000/BYTES_PER_CHAR) #endif -void speex_bits_init(SpeexBits *bits) +EXPORT void speex_bits_init(SpeexBits *bits) { bits->chars = (char*)speex_alloc(MAX_CHARS_PER_FRAME); if (!bits->chars) @@ -58,7 +58,7 @@ speex_bits_reset(bits); } -void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size) +EXPORT void speex_bits_init_buf...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...gt;= SPEEX_NB_MODES) return NULL; Index: libspeex/bits.c =================================================================== --- libspeex/bits.c (revision 14645) +++ libspeex/bits.c (working copy) @@ -45,7 +45,7 @@ #define MAX_CHARS_PER_FRAME (2000/BYTES_PER_CHAR) #endif -void speex_bits_init(SpeexBits *bits) +EXPORT void speex_bits_init(SpeexBits *bits) { bits->chars = (char*)speex_alloc(MAX_CHARS_PER_FRAME); if (!bits->chars) @@ -58,7 +58,7 @@ speex_bits_reset(bits); } -void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size) +EXPORT void speex_bits_init_buf...
2009 Nov 25
1
SpeexBits ...
Hi Marian, I took a brief look at RFC 5574 and as far as I understand, you can simply do it like this: SpeexBits b; speex_encode(state, some320bytePCM1, &b); speex_encode(state, some320bytePCM2, &b); After that, get the encoded data with speex_bits_write and put it in your packet. Mark -----Original Message----- From: speex-dev-bounces at xiph.org [mailto:speex-dev-bounces at xiph.org] On Behalf O...
2006 Dec 29
0
using speex in C#
...library and I used that instead of speex_encoder_init simply. void *speex_encoder_init_new(int modeID) { const SpeexMode *mode; mode = speex_lib_get_mode(modeID); return mode->enc_init(mode); } Maybe following codes that I have been using in a class can help you. /* structs */ public struct SpeexBits { char *chars; /* "raw" data */ int nbBits; /* Total number of bits stored in the stream*/ int charPtr; /* Position of the byte "cursor" */ int bitPtr; /* Position of the bit "cursor" within the current char */ int owner; /* Does the struct "ow...
2004 Aug 06
2
encoder/ decoder sharing SpeexBits
>From the sample encoder/ decoder demo in the documentation it seems that I only have to call speex_bits_reset before encoding a new frame. Is this still the case if I reuse the SpeexBits to both encode and decode different streams? Thanks, -- Daniel, Epic Games Inc. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the w...
2007 Jan 22
2
How to detect SpeexBits corruption
Hello, im using speex library on my vo ip project, but some times, after it works ok, it begins to play noises (like voice hits) decoding the packets of one source (the others sound ok). I finally found that reseting SpeexBits and decoder state it solves. If i cant avoid this problem, i wish to solve when it occours, but ?how to detect this? Please, if anyone has experiment this issue i will thank any help. by MJM.
2006 May 21
2
Re: High pitched whine with Speex
...t;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); DECODING: speex_bits_read_from(&speexBits, (char*)(packet->data+1), packet->length-1); speex_decode(channel->dec_state, &speexBits, (float*)tempOutput); That's pretty much the extent of the Speex code....
2005 Jun 06
1
SpeexBits Questions
...it makes more sense to me now. Does speex_bit_read_from also append in that manner? Jean-Marc Valin wrote: > speex_bits_reset is before encoding, not decoding. If you don't call it, > then everything you encode will be appended so it will grow without end. > As for the point of the SpeexBits struct, it's there as a sort of "array > of bits" to it's easy to pack and unpack bits. > > Jean-Marc > > Le lundi 06 juin 2005 ? 13:54 -0500, Matt DeMoss a ?crit : > > >> The example in the documentation demonstrates using speex_bits_reset >&...
2006 Dec 09
1
New function for manipulating SpeexBits
It would be nice to have the following function added to the speex bits... void speex_bits_read_from_buffer( SpeexBits * const bits, void * const buff, const int buf_size) { bits->bytes = (char*)buff; bits->buf_size = buf_size; bits->nbBits = buf_size << 3; bits->bytePtr = 0; bits->bitPtr = 0; bits->owner = 0; bits->overflow =...
2011 Jun 02
1
Any tips for speeding up encoding on iPhone?
...he quality and setting the recorder frequency to 16 Khz but didn't worked. Is there any way to optimize the encoding so it can keep up with the recording? Below you can find the code I'm using. Maybe you notice some obvious problems. - (void)initSpeexEncoder { speex_bits_init(&speexBits); speexEncoderState = speex_encoder_init(&speex_wb_mode); // get the frame size (expressed in samples) speexFrameSize = 0; speex_encoder_ctl(speexEncoderState, SPEEX_GET_FRAME_SIZE, & speexFrameSize); // set quality parameter that controls the quality vs bit-ra...
2004 Dec 21
2
Jitter buffer
...break; case AST_FORMAT_G729A: samples = 160 * (f->datalen / 20); break; [...] } In this case, though, chan_iax2.c doesn't necessarily know if the speex codec is loaded.. And later, it might also be useful to have an API which takes a bunch of SpeexBits, and gives the caller a way to split up the SpeexBits into separate 20ms frames. [The first API could be a subset of this]. The main API would be: int speex_decode_bits(SpeexBits *inBits, SpeexBits*outBits). inBits is SpeexBits containing the bits we're interested in. outBits may be NULL...
2004 Aug 06
0
encoder/ decoder sharing SpeexBits
Le mer 12/03/2003 à 23:46, Daniel Vogel a écrit : > >From the sample encoder/ decoder demo in the documentation it seems that I > only have to call speex_bits_reset before encoding a new frame. Is this > still the case if I reuse the SpeexBits to both encode and decode different > streams? I'm not sure I fully understand you question... what speex_bits_reset is to make the SpeexBits struct exactly as it was after you initialized it. It's possible to use the reuse the struct for the encoder and decoder (though it's a poss...
2005 Jun 06
1
SpeexBits Questions
...speex_bits_reset before encoding and decoding each frame. " speex_bits_reset(&bits); speex_encode(enc_state, input_frame, &bits); nbBytes = speex_bits_write(&bits, byte_ptr, MAX_NB_BYTES); " What happens if this is not done? I think I'm missing the point of having a SpeexBits object.
2006 Dec 11
0
New function for manipulating SpeexBits
speex_bits_init_buffer(), clears the buffer. -----Original Message----- From: Jean-Marc Valin [mailto:jean-marc.valin@usherbrooke.ca] Sent: Saturday, December 09, 2006 11:20 AM To: Miles, Stewart Cc: speex-dev@xiph.org Subject: Re: [Speex-dev] New function for manipulating SpeexBits How's that different from the current speex_bits_init_buffer()? Jean-Marc Miles, Stewart a ?crit : > It would be nice to have the following function added to the speex > bits... > > void speex_bits_read_from_buffer( > SpeexBits * const bits, > void * const...
2007 Jan 22
0
SV: How to detect SpeexBits corruption
...g samples of your source code and describe what platform/compiler/os you're using. //JT -----Ursprungligt meddelande----- Fr?n: speex-dev-bounces@xiph.org [mailto:speex-dev-bounces@xiph.org] F?r jesus Skickat: den 22 januari 2007 19:43 Till: speex-dev@xiph.org ?mne: [Speex-dev] How to detect SpeexBits corruption Hello, im using speex library on my vo ip project, but some times, after it works ok, it begins to play noises (like voice hits) decoding the packets of one source (the others sound ok). I finally found that reseting SpeexBits and decoder state it solves. If i cant avoid this prob...
2007 Jan 25
0
SV: How to detect SpeexBits corruption
...s, Jean-Marc > Good luck, > > Tom > > jesus <jmorion@toomeeting.com> wrote: >> thank you, i will explain it more detailed: >> >> I use libspeex in an activeX project compiled on Visual C++ 2003 >> (Windows XP). >> >> I have one array of SpeexBits and other of decoder states. The first >> time a user speaks, i create and initialize the elements of those arrays >> who correspond to his user_id. Next packets of this user are decoded >> using those elements. The decoder instance is always the same for every >> user...
2008 Jul 30
1
Speex in VB .NET
...Const Frame_Size As Integer = 160 Public Const Max_Frame_Size As Integer = 2000 Public Const Speex_Get_Frame_Size As Integer = 3 Public Const Speex_Set_Quality As Integer = 4 Public Const Speex_nb_Mode As Integer = 3 'create the structure that will hold the speexbits <StructLayout(LayoutKind.Sequential)> _ Public Structure SpeexBits Public chars As IntPtr ' "raw" data Public nbBits As Integer ' Total number of bits stored in thestream Public charPtr As Integer...
2007 Jan 25
0
SV: How to detect SpeexBits corruption
...t; Tom > > > > jesus <jmorion@toomeeting.com> wrote: > >> thank you, i will explain it more detailed: > >> > >> I use libspeex in an activeX project compiled on Visual C++ 2003 > >> (Windows XP). > >> > >> I have one array of SpeexBits and other of decoder states. The first > >> time a user speaks, i create and initialize the elements of those arrays > >> who correspond to his user_id. Next packets of this user are decoded > >> using those elements. The decoder instance is always the same for every...
2007 Feb 09
1
speex in C# please help
...public const string libpath = "libspeex.dll"; public const int Frame_Size = 160; public const int Max_Frame_Size = 2000; public const int Speex_Get_Frame_Size = 3; public const int Speex_Set_Quality = 4; public const int Speex_nb_Mode = 3; //create the structure that will hold the speexbits public struct SpeexBits { public char *chars; /* "raw" data */ public int nbBits; /* Total number of bits stored in thestream*/ public int charPtr; /* Position of the byte "cursor" */ public int bitPtr; /* Position of the bit "cursor" within thecurrent char */...