Skip to content

Commit

Permalink
Apply restrictions to FLAC decoder_config similar to Opus `decoder_…
Browse files Browse the repository at this point in the history
…config`.

  - The `decoder_config` is shared between substreams. Some values do not make sense to apply to all substreams.
  • Loading branch information
jwcullen authored and tdaede committed Jul 17, 2023
1 parent b48cb63 commit 5f370ee
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,16 @@ url: https://en.wikipedia.org/wiki/Q_(number_format); spec: Q-Format; type: dfn;

url: https://xiph.org/flac/format.html; spec: FLAC; type: dfn;
text: METADATA_BLOCK
text: METADATA_BLOCK_STREAMINFO
text: FRAME
text: FRAME_HEADER
text: SUBFRAME
text: FRAME_FOOTER
text: minimum block size
text: maximum block size
text: minimum frame size
text: maximum frame size
text: number of channels

url: https://xiph.org/flac/format.html; spec: FLAC; type: property;
text: fLaC
Expand Down Expand Up @@ -1618,7 +1624,13 @@ The sample rate used for computing offsets SHALL be the rate indicated by the [=

[=codec_id=] SHALL be 'fLaC', the FLAC stream marker in ASCII, meaning byte 0 of the stream is 0x66, followed by 0x4C 0x61 0x43.

[=decoder_config()=] for FLAC is [=METADATA_BLOCK=] of [[!FLAC]].
[=decoder_config()=] for FLAC are the [=METADATA_BLOCK=]s of [[!FLAC]]. The [=METADATA_BLOCK_STREAMINFO=] has the following constraints:
- [=minimum block size=] block SHALL be set to [=num_samples_per_frame=].
- [=maximum block size=] block SHALL be set to [=num_samples_per_frame=].
- [=minimum frame size=] block SHALL be set to 0.
- [=maximum frame size=] block SHALL be set to 0.
- [=number of channels=] block SHALL be set to 2. [=number of channels=] can be ignored because the real value can be determined from the [=Audio Element OBU=].


The format of [=audio_frame()=] is [=FRAME=] of [[!FLAC]], which is composed of [=FRAME_HEADER=], followed by [=SUBFRAME=](s) (one [=SUBFRAME=] per channel) and followed by [=FRAME_FOOTER=].

Expand Down

0 comments on commit 5f370ee

Please sign in to comment.