In my opinion in a FLAC audio streaming (i.e not in a file, but something like a web radio) a STREAMINFO should be sent when the connection is established, and then resent only if at least one of its fields is changed (e.g when bitrate or block sizes changes).<div>
<br></div><div>Lorenzo<br><br><div class="gmail_quote">2010/11/16 Brian Willoughby <span dir="ltr"><<a href="mailto:brianw@sounds.wa.com">brianw@sounds.wa.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
It's certainly best to honor what the specification says. My<br>
assumption is that a "stream" could also be a continuous broadcast,<br>
not just a file. With a hypothetical server streaming FLAC<br>
bitstreams, I would assume that the most recent STREAMINFO is valid<br>
until another one comes along. If you're writing a file player, then<br>
perhaps you can trust the spec and assume that there will never be<br>
more than one. But I suppose it all depends upon which is easier to<br>
handle in your code. Some implementations might make it more<br>
complicated to ignore spurious STREAMINFO blocks. I'd say do<br>
whatever is easiest, and bank on files not having more than one anyway.<br>
<br>
Brian Willoughby<br>
Sound Consulting<br>
<br>
On Nov 16, 2010, at 00:00, Lorenzo wrote:<br>
> As far as I know one and only one STREAMINFO should be present at<br>
<div class="im">> the beginning of the file: <a href="http://flac.sourceforge.net/format.html" target="_blank">http://flac.sourceforge.net/format.html</a><br>
><br>
> "A FLAC bitstream consists of the "fLaC" marker at the beginning of<br>
> the stream, followed by a mandatory metadata block (called the<br>
> STREAMINFO block), any number of other metadata blocks, then the<br>
> audio frames."<br>
><br>
</div><div class="im">> 2010/11/16 Brian Waters <<a href="mailto:brianmwaters@gmail.com">brianmwaters@gmail.com</a>><br>
>> I'm writing a program that plays FLAC files using the libFLAC API's.<br>
>> Is there a specific way I'm supposed to handle multiple STREAMINFO<br>
>> metadata blocks?<br>
>><br>
>> For example, should I ignore all but the first, or all but the last?<br>
>><br>
>> The format spec doesn't mention anything.<br>
<br>
</div><div><div></div><div class="h5">_______________________________________________<br>
Flac-dev mailing list<br>
<a href="mailto:Flac-dev@xiph.org">Flac-dev@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/flac-dev" target="_blank">http://lists.xiph.org/mailman/listinfo/flac-dev</a><br>
</div></div></blockquote></div><br></div>