search for: buffersize

Displaying 20 results from an estimated 128 matches for "buffersize".

Did you mean: buffer_size
2009 Dec 17
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Wednesday 16 December 2009 13:35, David Greene wrote: > > Please make BufferSize an 'unsigned' and default it to 8192. Please use > > PRESERVE_STREAM instead of 'false'. Here's an updated version of the circular buffer. Ok to check in? -Dave Index: include/llvm/Support/circular_raw_ostream.h ===========================...
2009 Dec 18
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...> > > > + // settings from this raw_ostream back to the underlying > > > > stream. + if (!TheStream) > > > > + return; > > > > + if (DeleteStream) > > > > + delete TheStream; > > > > + else if (BufferSize > 0) > > > > + TheStream->SetBufferSize(BufferSize); > > > > + else > > > > + TheStream->SetUnbuffered(); > > > > > > Another issue is that this is transfering the circular stream's > > > buffer to the un...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Dec 17, 2009, at 3:41 PM, David Greene wrote: > On Wednesday 16 December 2009 13:35, David Greene wrote: > >>> Please make BufferSize an 'unsigned' and default it to 8192. Please use >>> PRESERVE_STREAM instead of 'false'. > > Here's an updated version of the circular buffer. Ok to check in? This is looking a lot better, here are some more comments: > + /// current_pos - Return the cu...
2009 Dec 18
4
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...circular_raw_ostream(raw_ostream &Stream, unsigned BuffSize = 8192, > > + bool Delete = false) > > + : raw_ostream(/*unbuffered*/true), > > + TheStream(0), > > + DeleteStream(PRESERVE_STREAM), > > + BufferSize(BuffSize), > > + BufferArray(0) { > > + if (BufferSize > 0) > > + BufferArray = new char[BufferSize]; > > How about just asserting that BufferSize is not zero? This stream won't > work well and doesn't make sense with a buffer of zero....
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...// settings from this raw_ostream back to the > > > > > underlying stream. + if (!TheStream) > > > > > + return; > > > > > + if (DeleteStream) > > > > > + delete TheStream; > > > > > + else if (BufferSize > 0) > > > > > + TheStream->SetBufferSize(BufferSize); > > > > > + else > > > > > + TheStream->SetUnbuffered(); > > > > > > > > Another issue is that this is transfering the circular stream's > &...
2009 Dec 16
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...o prepare a patch that shows just that. >> >> I want a patch that does one thing (e.g. implements dbgs(), > > Ok, let's start with that. Here's the patch to add the circular raw_ostream. This idea of the patch makes sense to me, but here are a few questions: + int BufferSize; + std::vector<char> BufferArray; + bool DelayOutput; + std::vector<char>::iterator Cur; Please doxygenify these. Instead of using a std::vector for BufferArray, please just new[] an array since it is fixed size. Why is BufferSize needed with the vector? Isn't it always...
2009 Sep 02
3
voice sound like robot voice :)
..., same as below http://barvanjekode.gama.us/temp/1257361243.html thanx. code ----------------------- #include "codec.h" ///////////////////////////////////////////////////////////////// // Constants ///////////////////////////////////////////////////////////////// #define Cvoicecodecrawbuffersize 16 * Ckilobyte ///////////////////////////////////////////////////////////////// // // TVoiceCodec // ///////////////////////////////////////////////////////////////// TVoiceCodec::TVoiceCodec() : pMode( NULL ), pPreprocessorState( NULL ), pCodecEncoderState( NULL ), encoderQuality( 5 ), enc...
2009 Dec 18
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
.../// TheStream - The real stream we output to. We set it to be + /// unbuffered, since we're already doing our own buffering. + /// + raw_ostream *TheStream; + + /// DeleteStream - Do we need to delete TheStream in the + /// destructor? + /// + bool DeleteStream; + + /// BufferSize - The size of the buffer in bytes. + /// + size_t BufferSize; + + /// BufferArray - The actual buffer storage. + /// + char *BufferArray; + + /// Cur - Pointer to the current output point in BufferArray. + /// + char *Cur; + + /// printLog - Dump the contents of the b...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...therwise, transfer the buffer > > > + // settings from this raw_ostream back to the underlying stream. > > > + if (!TheStream) > > > + return; > > > + if (DeleteStream) > > > + delete TheStream; > > > + else if (BufferSize > 0) > > > + TheStream->SetBufferSize(BufferSize); > > > + else > > > + TheStream->SetUnbuffered(); > > Another issue is that this is transfering the circular stream's > > buffer to the underlying stream. Would it make more sen...
2009 Dec 16
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Wednesday 16 December 2009 13:19, Chris Lattner wrote: > + int BufferSize; > + std::vector<char> BufferArray; > + bool DelayOutput; > + std::vector<char>::iterator Cur; > > Please doxygenify these. Ok. > Instead of using a std::vector for BufferArray, please just new[] an array > since it is fixed size. Ok. > Why is Buffer...
2009 Aug 08
2
[PATCH] pxe: fix OACK packet handling
...t a/core/pxe.c b/core/pxe.c index 81d3e23..a4b8a14 100644 --- a/core/pxe.c +++ b/core/pxe.c @@ -913,8 +913,10 @@ static void pxe_searchdir(char *filename, struct file *file) * Now we need to parse the OACK packet to get the transfer * and packet sizes. */ - if (!buffersize) + if (!buffersize) { + filesize = -1; goto done; /* No options acked */ + } /* * If we find an option which starts with a NUL byte, @@ -928,15 +930,9 @@ static void pxe_searchdir(char *filename, struct file *file) if...
2005 Nov 05
1
buffer overruns for small files
...tal. Though ov_read returns zero, I overflow the buffer and crash on ov_clear. These are my TRACE statements: >= 10kb: Opening Audio File 'no_0.ogg' vi->channels = '2' vi->rate = '44100' pcmTotal = '15341' pcmTotal * vi->channels * 2 = '61364' BufferSize = '61364' dwBufferLength = '61364' BufferSize = '61364' dwBufferLength - BufferSize = '0' ------------ < 10kb: Opening Audio File 'Steel guitar_4.ogg' vi->channels = '2' vi->rate = '44100' pcmTotal = '9876' pcmTotal * vi->...
2009 Sep 03
1
Speex-dev Digest, Vol 64, Issue 2
...> code > > ----------------------- > > #include "codec.h" > > > > ///////////////////////////////////////////////////////////////// > > // Constants > > ///////////////////////////////////////////////////////////////// > > #define Cvoicecodecrawbuffersize 16 * Ckilobyte > > > > ///////////////////////////////////////////////////////////////// > > // > > // TVoiceCodec > > // > > ///////////////////////////////////////////////////////////////// > > TVoiceCodec::TVoiceCodec() : > > pMode( NULL ), &...
2009 Dec 19
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...tream will be errs() which is already unbuffered. Might circular_raw_ostream be used with other streams at some point? > > + /// printLog - Dump the contents of the buffer to Stream. > > + /// > > + void printLog(void) { > > + TheStream->write(BufferArray, BufferSize); > > + Cur = BufferArray; > > + } > > If the buffer has circled around, won't this print it out-of-order? > If the current pointer is 5 and the length is 10, it seems like this > should do a write([5..9]) then write([0..4])? Aha! Good catch. This worked diffe...
2004 Aug 06
2
Darkice memory leak
Kristjan Gu?ni Bjarnason wrote: > I was looking more closely on the source for Darkice. I found the code for > calulating the buffersize somewhat strange. Your is snapshot taken from the > init function in CastSink.cpp : > > int bufferSize = bitRate ? (bitRate * 1024 / 8) * bufferDuration > : (128 * 1024 / 8) * bufferDuration; > bufferedSink = socket ? new BufferedSi...
2009 Dec 21
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
.../// TheStream - The real stream we output to. We set it to be + /// unbuffered, since we're already doing our own buffering. + /// + raw_ostream *TheStream; + + /// OwnsStream - Are we responsible for managing the underlying + /// stream? + /// + bool OwnsStream; + + /// BufferSize - The size of the buffer in bytes. + /// + size_t BufferSize; + + /// BufferArray - The actual buffer storage. + /// + char *BufferArray; + + /// Cur - Pointer to the current output point in BufferArray. + /// + char *Cur; + + /// flushBuffer - Dump the contents of th...
2004 Aug 06
2
Darkice memory leak
Unfortunately I can't reproduce your memory leak reports. For example, here is the line about my production darkice instance from top: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 27516 root 20 0 3564 3564 1340 S 95.6 1.3 47:06 darkice <p>this as after approx 50 minutes from start, but the memory load doesn't change for the whole 4 hours it
2009 Dec 19
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...th the underlying buffering of TheStream. In the dbgs() use case, the underlying stream will be errs() which is already unbuffered. > > + /// printLog - Dump the contents of the buffer to Stream. > + /// > + void printLog(void) { > + TheStream->write(BufferArray, BufferSize); > + Cur = BufferArray; > + } If the buffer has circled around, won't this print it out-of-order? If the current pointer is 5 and the length is 10, it seems like this should do a write([5..9]) then write([0..4])? > + /// current_pos - Return the current position with...
2006 Sep 08
2
problem with compression and decompression
...en uncompress, and then playback that frame before I move on to the next frame. While initializing the device for reading the sound information, I give it the following parameters: 22050 (which is the frequency with which to take sound samples) AL_FORMAT_MONO16 (which is the OpenAL format in use) BUFFERSIZE (which is 1024, the size of the frames which I read) As for the arguments for "Compress()", pData is the ALchar pointer which contains the data. iFrameSize is the integer which will store the number of bytes actually written to the compressed frame. cComeFrame is the character array whic...
2009 Sep 03
0
voice sound like robot voice :)
...7361243.html > > thanx. > > code > ----------------------- > #include "codec.h" > > ///////////////////////////////////////////////////////////////// > // Constants > ///////////////////////////////////////////////////////////////// > #define Cvoicecodecrawbuffersize 16 * Ckilobyte > > ///////////////////////////////////////////////////////////////// > // > // TVoiceCodec > // > ///////////////////////////////////////////////////////////////// > TVoiceCodec::TVoiceCodec() : > pMode( NULL ), > pPreprocessorState( NULL ), > pCo...