search for: file_curr

Displaying 8 results from an estimated 8 matches for "file_curr".

Did you mean: file_ctrl
2016 Feb 09
2
Compilation failure using mingw-w64 and gcc-5.3.0
...11: error: request for member 'QuadPart' in something not a structure or union size.QuadPart = written_size; ^ decode.c:275:10: warning: implicit declaration of function 'SetFilePointerEx' [-Wimplicit-function-declaration] if(SetFilePointerEx(fh, size, NULL, FILE_CURRENT)) /* correct the file size */ ^ decode.c:275:7: warning: nested extern declaration of 'SetFilePointerEx' [-Wnested-externs] if(SetFilePointerEx(fh, size, NULL, FILE_CURRENT)) /* correct the file size */ ^ decode.c:275:43: error: 'FILE_CURRENT' undeclared (...
2016 Feb 08
2
Compilation failure using mingw-w64 and gcc-5.3.0
Hello, Upon compiling the flac tree today, after many successful compilations over the last few weeks, a new error is appearing before compilation bails out. This is a cross-compilation using gcc-5.3.0 running on GNU/Linux, with the objects being built for a mingw-w64-x86_64 host. Among other things, the compiler is looking for windows_unicode_filenames.h but it isn't there. Also, I'm
2014 Sep 26
4
Patch to add buffering to decoding too
...2:1; i < d->foreign_metadata->num_blocks; i++) { + if(i != d->foreign_metadata->format_block && i != d->foreign_metadata->audio_block) + size.QuadPart += d->foreign_metadata->blocks[i].size; + } + } + + if(SetFilePointerEx(fh, size, NULL, FILE_CURRENT)) /* tell filesystem the expected filesize to eliminate fragmentation */ + SetEndOfFile(fh); + } + CloseHandle(fh); + } + } +#endif if(!write_iff_headers(d->fout, d, d->total_samples)) { d->abort_flag = true; return false;
2014 Sep 27
0
Patch to add buffering to decoding too
...RIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if(fh != INVALID_HANDLE_VALUE) { + if(GetFileType(fh) == FILE_TYPE_DISK) { + LARGE_INTEGER size; + size.QuadPart = written_size; + if(SetFilePointerEx(fh, size, NULL, FILE_CURRENT)) /* correct the file size */ + SetEndOfFile(fh); + } + CloseHandle(fh); + } + } + } +#endif fclose(d->fout); if(error_occurred) flac_unlink(d->outfilename); @@ -364,6 +381,32 @@ FLAC__bool DecoderSession_process(DecoderSession *d) } } +#ifdef _WIN32 +...
2014 Sep 26
0
Patch to add buffering to decoding too
...2:1; i < d->foreign_metadata->num_blocks; i++) { + if(i != d->foreign_metadata->format_block && i != d->foreign_metadata->audio_block) + size.QuadPart += d->foreign_metadata->blocks[i].size; + } + } + + if(SetFilePointerEx(fh, size, NULL, FILE_CURRENT)) /* tell filesystem the expected filesize to eliminate fragmentation */ + SetEndOfFile(fh); + } + CloseHandle(fh); + } + } +#endif if(!write_iff_headers(d->fout, d, d->total_samples)) { d->abort_flag = true; return false;
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
2007 Oct 04
0
Prototyping the Dir class
...? begin yield @handle ensure close end end @pos = 0 @handle end def close FindClose(@handle) end # Broken because the @handle isn''t valid def pos SetFilePointer(@handle, 0, 0, FILE_CURRENT) end def read if @pos > 0 @fdata = 0.chr * 320 unless FindNextFile(@handle, @fdata) raise ArgumentError, get_last_error end end @pos += 1 @fdata[44, MAX_PATH].unpack("Z*")[0] end def each...
2014 Sep 25
2
Patch to add buffering to decoding too
Decoding flac files is also prone to producing fragmented files. NTFS has the ability to completely avoid fragmentation if it is told the file size before hand, but that would require using special Windows-only functions. Increasing the write buffer from the default 512 bytes to 10 MB already reduces the problem tremendously. -------------- next part -------------- diff --git