search for: packetcount

Displaying 7 results from an estimated 7 matches for "packetcount".

2006 Jul 20
1
Invalid sideband mode encountered
...r, int myBufferSize) { SpeexDecoder speexDecoder = new SpeexDecoder(); byte[] payload = new byte[FRAME_SIZE*2]; byte[] completebuffer = new byte[4000000]; int mode = 0; int samplerate = 8000; int channels = 1; speexDecoder.init(mode, samplerate, channels, true); for (int packetCount = 0; packetCount < getNbPackets();packetCount++) { System.arraycopy(decbuffer, packetCount*encodedNbBytes(), payload, 0, encodedNbBytes()); try { speexDecoder.processData(payload,0, encodedNbBytes()); byte[] decoded = new byte[FRAME_SIZE*2]; decodedNbBytes = speexDecoder.getP...
2006 Jul 18
1
SpeexEncoder requires 320 samples to process a Frame, not 160
...etEncoder().setDtx(dtx); } int pcmPacketSize = 320; speexEncoder.processData(cmbuffer, 0, pcmPacketSize); nbBytes = speexEncoder.getProcessedData(temp, 0); return temp; } public static byte[] decode(byte[] decbuffer) { SpeexDecoder speexDecoder = new SpeexDecoder(); int packetCount = 0; byte[] payload = new byte[65536]; int bodybytes = nbBytes; int decsize = 0; int Totsize = 0; byte[] completebuffer = new byte[4000000]; Totsize = myNum * bodybytes; speexDecoder.init(1, 8000, 1, true); while((packetCount*nbBytes) <= Totsize) { System.arrayco...
2006 Oct 09
1
Vorbis primitive API examples (LONG)
...serial number later os = ogg_stream_create(-1); // CAUTION: Just about anything you do wrong pops a bus error. // You need to be fairly aggressive about checking return codes // and initializing properly. int flgBailError = 0; int pageCount = -1; int flgPacketsConsumed = 0; int packetCount = -1; int flgEOSPage = 0; while(!flgBailError) { dprintf("Page: %d\n", pageCount); if (pageCount != -1) { if (pageCount == 0) { // FIXME: Silly pageCount used to indicate serial number change // because ogg_stream_pagein does braindead release on error and // ogg_p...
2005 Oct 01
2
Changing the meaning of jitter buffer timestamp
Hi everyone, I just changed the meaning of the timestamp in the jitter buffer. If you don't know what I'm talking about, then you're not affected. If you do use the jitter buffer, than you will need to change your code accordingly, so instead of bumping the timestamp by 20 (ms) for each frame, you'll have to increase by 160 (samples) for narrowband or 320 for wideband. The new
2005 Oct 05
3
Changing the meaning of jitter buffer timestamp
...= 32768, that happens after 102 puts... I would say that an int is 32 bits :-) Actually, RTP defines the timestamp as a 32-bit value. Now, what happens when it overflows (3 days for narrowband), I don't know what the RFC says about it. > In my current > implementation I do "((long)packetCounter * 20) % 32760", but speex doesn't > like me starting over at zero, and resets the buffer (every 32 seconds)...How > to do it right? Why do you insist on having considering only 16 bits? Jean-Marc
2005 Oct 05
0
Changing the meaning of jitter buffer timestamp
...ld be closer to what RTP does (and not > have fractional value for sample rates like 44.1 kHz). Hi, what happens if this number flows over? It is just a "int", so it might reach its limits at 2^15 = 32768, that happens after 102 puts...In my current implementation I do "((long)packetCounter * 20) % 32760", but speex doesn't like me starting over at zero, and resets the buffer (every 32 seconds)...How to do it right? Peter -- The absent ones are always at fault. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: applic...
2005 Oct 05
0
Changing the meaning of jitter buffer timestamp
...puts... > > I would say that an int is 32 bits :-) Actually, RTP defines the > timestamp as a 32-bit value. Now, what happens when it overflows (3 days > for narrowband), I don't know what the RFC says about it. > > > In my current > > implementation I do "((long)packetCounter * 20) % 32760", but speex > > doesn't like me starting over at zero, and resets the buffer (every 32 > > seconds)...How to do it right? > > Why do you insist on having considering only 16 bits? My C book taught me an int is only guaranteed to be 16bits or bigger, and...