To read and decode FLAC file or stream you need to follow these steps:
- Open a FLAC file/Get a stream with element type
(unsigned-byte 8). - Pass the stream to
flac:open-flacfunction which will create and returnbitreader:readerobject. This object allowseasy-audiolibrary to read not just octets, but any amount of bits from audio stream. - Read metadata blocks from the stream, passing the object from previous
step to
flac:read-metadata. - Do whatever you want with metadata and read the first audio frame with
flac:read-frame. - Decode the frame with
flac:decode-frameand repeat previous step until all data is read and decoded.
API
Conditions.No node with name
flac-error.No node with name
flac-bad-metadata.No node with name
Metadata blocks.
flac-bad-frame.No node with name
streaminfo.No node with name
streaminfo-minblocksize.No node with name
streaminfo-maxblocksize.No node with name
streaminfo-minframesize.No node with name
streaminfo-maxframesize.No node with name
streaminfo-samplerate.No node with name
streaminfo-channels.No node with name
streaminfo-bitspersample.No node with name
streaminfo-totalsamples.No node with name
streaminfo-md5.No node with name
padding.No node with name
vorbis-comment.No node with name
seektable.No node with name
seekpoint.No node with name
cuesheet.No node with name
cuesheet-catalog-id.No node with name
cuesheet-lead-in.No node with name
cuesheet-cdp.No node with name
cuesheet-tracks.No node with name
cuesheet-track.No node with name
cuesheet-index.No node with name
picture.No node with name
picture-type.No node with name
picture-mime-type.No node with name
picture-description.No node with name
picture-width.No node with name
picture-height.No node with name
picture-depth.No node with name
picture-color-num.No node with name
Working with audio frames.
picture-picture.No node with name
read-frame.No node with name
decode-frame.No node with name
blocksize.No node with name
frame.No node with name
frame-blocking-strategy.No node with name
frame-block-size.No node with name
frame-sample-rate.No node with name
+left-side+.No node with name
+right-side+.No node with name
+mid-side+.No node with name
frame-channel-assignment.No node with name
frame-sample-size.No node with name
frame-number.No node with name
frame-crc-8.No node with name
frame-subframes.No node with name
Other functions / helpers.
frame-crc-16.No node with name
open-flac.No node with name
read-metadata.No node with name
seek-sample.No node with name
It also can decode FLAC data from OGG container. There are
metadata-find-seektable.flac:open-ogg-flac, flac:read-ogg-metadata and flac:read-ogg-frame
functions for that purpose. Seeking does not work with OGG container.