[Flac-dev] FlacPak

Josh Coalson xflac at yahoo.com
Mon Nov 17 11:06:15 PST 2003


--- Josh Green <jgreen at users.sourceforge.net> wrote:
> The audio data will be encoded with FLAC and thats where I have some
> questions. My current thinking is to combine audio of the same type
> together to minimize changing of parameters in the FLAC stream. Same
> sample type being data that has the same number of channels and bit
> width. There will also be cases where a pair of mono samples (in
> separate locations in the original file) could be encoded as stereo
> audio (and re-split on decode).
> 
> Last I posted to this list, there wasn't a way to change encoding
> parameters on the fly with the current FLAC API, is this still the
> case?
> If it is, would it be possible to add multiple separate (serial)
> streams
> in the same file? In other words, if the current API doesn't allow
> changing parameters on the fly, could the FLAC encoder instance be
> closed and then re-opened with different parameters and the decoding
> side still work?

could you clarify your plan... are you thinking about
1) encoding to a FLAC container and using metadata blocks
   for everything that is not data?
2) writing your own container?

1) seems kind of impractical to do in a general way.

if you're talking about 2) then:
you can't change encoding params on the fly (yet) but in this
case I would advise against it even if you could, because you
are storing to your own container, and each clip may not even
be contiguous.  better to use a fresh stream encoder for
each clip.  your decoder will be aware of the boundaries
somehow and use fresh stream decoders for each clip.  (I'd
advise against re-using the same stream decoder for the same
reason).

also, if using your own container, you don't really need the
STREAMINFO block, might as well just throw away all metadata
when encoding.

> Another question I have is about sample rate. Does this affect the
> encoding/decoding process at all or is it mainly informational for
> playback purposes? The samples in an instrument patch often differ in
> sample rate.

no, it will only really affect what the blocksize should be set
to for the best compression.

Josh


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree




More information about the Flac-dev mailing list