Menu

#114 I/O buffering should be disabled by an option

None
closed
Erik
None
5
2015-12-11
2015-12-03
radio42
No

In v1.3.1 you added a change to the FLAC encoder and introduced an I/O bufferiong.

That it is buffering 10MB of encoded data in memory before you produce any output on Windows.
This might be fine when encoding to a file!
But it is NOT good when using STDOUT for streaming, e.g. to an ICEcast server!

The Icecast server will probably timeout in the meantime.
This is the related FLAC changelog entry:
"I/O buffering improvements on Windows to reduce disk fragmentation when writing files"

Unfortunately, there doesn't seem to be any way to disable that; I guess
the FLAC developer didn't consider streaming when making the change.

So please add an option to disable this internal buffering (and to directly output your encoded data immediately).

Thanks,
Bernd

Discussion

  • Erik

    Erik - 2015-12-11

    This should be fixed in this commit:

    commit d570e8ce00fae46b18671b4807c9de401523c5ae
    Author: Erik de Castro Lopo <erikd@mega-nerd.com>
    Date:   Sat Dec 12 08:23:22 2015 +1100
    
    Win32: Only use large buffers when writing to disk
    
    Windows can suffer quite badly from disk fragmentations. To avoid
    this, on Windows, the FILE* buffer size was set to 10Meg. However, 
    this huge buffer is undesireable when writing to a eg a pipe.
    
    This patch updates the behaviour to only use the huge buffer when
    writing to disk.
    
    Patch-from: lvqcl <lvqcl.mail@gmail.com>
    Closes: https://sourceforge.net/p/flac/feature-requests/114/
    
     
  • Erik

    Erik - 2015-12-11
    • status: open --> closed
    • assigned_to: Erik
    • Group: -->
     

Log in to post a comment.