[flac-dev] Windows file buffering
lvqcl.mail at gmail.com
Thu Dec 10 08:58:56 PST 2015
Erik de Castro Lopo wrote:
> Would you be able to have alook at this one? I think its
> Windows related:
The relevant changes are
the current code:
* Windows can suffer quite badly from disk fragmentation. This can be
* reduced significantly by setting the output buffer size to be 10MB.
setvbuf(file, NULL, _IOFBF, 10*1024*1024);
LRN <lrn1986 at gmail.com> wrote:
> The commit mentioned in the feature request should not cause such
> behaviour, as it only does short-lived operations (opens a file, does
> stuff, closes the file immediately after) and is clearly distinguishing
> between disk files and pipes (which is how you, presumably, stream data to
> other processes for whatever reasons).
> I don't claim that FLAC doesn't do buffering, as the OP described, just
> that this commit is unlikely to be the cause.
Maybe you mean some other commit? For example,
Because setvbuf() should definitely change libFLAC behaviour regardless of files/pipes/etc.
The attached patch *should* resolve the issue. libFLAC will call setvbuf(file, ...)
only if GetFileType(...file...) == FILE_TYPE_DISK.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 615 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20151210/c3bffdd5/attachment.obj
More information about the flac-dev