[Flac-dev] Re: Flac File Size

Brian Willoughby brianw at sounds.wa.com
Mon Jun 26 13:13:37 PDT 2006


Hello,

I'm not sure, but your description makes it seem like you're trying to write  
your own FLAC-parsing and FLAC-creation code based on the file format  
descriptions.  Things would go a lot more easily for you if you simply used the  
Standard C or C++ libraries provided in the FLAC distribution.  The file  
format is documented for completeness, to encourage widespread adoption of  
FLAC, it is not intended as the starting point for new code.  That's what the  
FLAC libraries are intended for.

You could use the FLAC library to open your big flac file, then write out  
several smaller FLAC files by breaking up the data.  Using the FLAC library,  
you wouldn't have to worry because the files you create would always play  
properly.

I realize that jumping from Visual Basic to Standard C or C++ might sound like  
a big leap, but you're already trying to do some very advanced things by  
pulling apart file formats and write new files based on a very complex format.   
It would be much simpler to learn C and use the FLAC library.

... unless someone else out there has put a Visual Basic front-end on the FLAC  
library!

Brian Willoughby
Sound Consulting


Begin forwarded message:

I have a big flac file, i can divide this flac file into chunks by visual  
basic code, i can add header to these chunks by copying first 1K to other  
chunks, but chunks can not play properly, i think i need to change filesize  
from file headers of these chunks, i can read samplerate and samples count from  
header, but i do not know how can i calculate file size without reading all  
file, what must i change from these chunks too? I want to play each chunks  
themself,
I read http://flac.sourceforge.net/format.html but i can not understand how  
can i change header for each chunk

Thanks
Alper ASMA


More information about the Flac-dev mailing list