Displaying 5 results from an estimated 5 matches for "decodersession_construct".
2014 Sep 25
2
Patch to add buffering to decoding too
...ng the write buffer from the default 512 bytes to 10
MB already reduces the problem tremendously.
-------------- next part --------------
diff --git a/src/flac/decode.c b/src/flac/decode.c
index 5e5e17a..9e9405c 100644
--- a/src/flac/decode.c
+++ b/src/flac/decode.c
@@ -251,6 +251,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
DecoderSession_destroy(d, /*error_occurred=*/true);
return false;
}
+ setvbuf(d->fout, NULL, _IOFBF, 10*1024*1024); /* 10MB output buffer to help reduce disk fragmentation */
}
}
2014 Sep 26
0
Patch to add buffering to decoding too
...ac-dev/attachments/20140926/a0386298/attachment.htm
-------------- next part --------------
diff --git a/src/flac/decode.c b/src/flac/decode.c
index 5e5e17a..90e0b1a 100644
--- a/src/flac/decode.c
+++ b/src/flac/decode.c
@@ -101,7 +101,7 @@ static FLAC__bool is_big_endian_host_;
static FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__bool use_first_serial_number, long serial_number, FileFormat format, FLAC__bool treat_warnings_as_errors, FLAC__bool continue_through_decode_errors, FLAC__bool channel_map_none, replaygain_synthesis_spec_t replaygain_synthesis_spec, FLAC__bool analysis_mo...
2014 Sep 26
4
Patch to add buffering to decoding too
...ped in
> Win32 #ifdef or similar.
>
> Erik
-------------- next part --------------
diff --git a/src/flac/decode.c b/src/flac/decode.c
index 5e5e17a..7705107 100644
--- a/src/flac/decode.c
+++ b/src/flac/decode.c
@@ -101,7 +101,7 @@ static FLAC__bool is_big_endian_host_;
static FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__bool use_first_serial_number, long serial_number, FileFormat format, FLAC__bool treat_warnings_as_errors, FLAC__bool continue_through_decode_errors, FLAC__bool channel_map_none, replaygain_synthesis_spec_t replaygain_synthesis_spec, FLAC__bool analysis_mo...
2014 Sep 27
0
Patch to add buffering to decoding too
...39;t need changes as outputfilename was already
known. Attached is a fixed and improved version.
-------------- next part --------------
diff --git a/src/flac/decode.c b/src/flac/decode.c
index 5e5e17a..ed7eff8 100644
--- a/src/flac/decode.c
+++ b/src/flac/decode.c
@@ -263,6 +263,23 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
void DecoderSession_destroy(DecoderSession *d, FLAC__bool error_occurred)
{
if(0 != d->fout && d->fout != stdout) {
+#ifdef _WIN32
+ if(!error_occurred) {
+ FLAC__off_t written_size = ftello(d->fout);
+ if(written_size > 0) {...
2014 Sep 26
3
Patch to add buffering to decoding too
Can you please wrap the setvbuf in _WIN32 IFDEFs too? Currently
memory usage of FLAC decoding is about 1MB, so this patch is
increasing memory usage tenfold, also for platforms that do not
need this. It is a non-problem on my system anyway.
Op 26-09-14 om 10:36 schreef Janne Hyv?rinen:
> I made some changes to the previous patch. I don't know why I
> originally didn't put the