search for: internalbuffer

Displaying 6 results from an estimated 6 matches for "internalbuffer".

2004 Sep 10
2
FLAC++ SeekableStream write_callback not being called?
...e_callback looks like: ::FLAC__StreamDecoderWriteStatus K3bFLACDecoder::Private::write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]) { int i; // Note that in canDecode we made sure that the input is only 16 bit stereo. int samples = frame->header.blocksize; internalBuffer = new QBuffer(); internalBuffer->open(IO_ReadWrite); for(i=0; i < samples; i++) { internalBuffer->putch(buffer[i][0] >> 8); // msb left internalBuffer->putch(buffer[i][0] & 0xFF); // lsb left internalBuffer->putch(buffer[i][1] >> 8); // msb right i...
2004 Sep 10
0
FLAC++ SeekableStream write_callback not being called?
...WriteStatus > K3bFLACDecoder::Private::write_callback(const ::FLAC__Frame *frame, > const > FLAC__int32 * const buffer[]) { > int i; > // Note that in canDecode we made sure that the input is only 16 > bit stereo. > int samples = frame->header.blocksize; > > internalBuffer = new QBuffer(); > internalBuffer->open(IO_ReadWrite); > for(i=0; i < samples; i++) { > internalBuffer->putch(buffer[i][0] >> 8); // msb left > internalBuffer->putch(buffer[i][0] & 0xFF); // lsb left > internalBuffer->putch(buffer[i][1] >&g...
2015 Apr 30
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
I don't think we should make flush virtual. Why do you need to do it? Can't you set up the base class to write to use the tail of the memory region as the buffer? On 24 April 2015 at 06:46, Yaron Keren <yaron.keren at gmail.com> wrote: > Hi, > > Is this what you're thinking about? > The code is not tested yet, I'd like to know if the overall direction and >
2015 May 02
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
Could you dig into why: + raw_ostream &write(unsigned char C) override { + grow(1); + *OutBufCur++ = C; + return *this; + } Is 3 times as fast as raw_svector_ostream? I don't see a good reason why that should be any faster than: raw_ostream &operator<<(char C) { if (OutBufCur >= OutBufEnd) return write(C); *OutBufCur++ = C; return *this; }
2015 May 02
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
...======================== --- include/llvm/Support/raw_ostream.h (revision 236304) +++ include/llvm/Support/raw_ostream.h (working copy) @@ -52,17 +52,19 @@ /// OutBufEnd - OutBufStart >= 1). /// /// If buffered, then the raw_ostream owns the buffer if (BufferMode == - /// InternalBuffer); otherwise the buffer has been set via SetBuffer and is - /// managed by the subclass. + /// InternalBuffer or BufferMode == DirectBuffer); otherwise the buffer has + /// been set via SetBuffer and is managed by the subclass. /// /// If a subclass installs an external buffer using SetBuff...
2015 Apr 20
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
Sean, thanks for reminding this, Alp did commit a class derived from raw_svector_ostream conatining an internal SmallString he called small_string_ostream. The commit was reverted after a day due to a disagreement about the commit approval and apparently abandoned. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140623/223393.html