Since many are variable length we have to be careful about the memory management. We decree that all pointers to data in the object are owned by the object and memory-managed by the object.
Use the FLAC__metadata_object_new() and FLAC__metadata_object_delete() functions to create all instances. When using the FLAC__metadata_object_set_*() functions to set pointers to data, set copy to true to have the function make it's own copy of the data, or to false to give the object ownership of your data. In the latter case your pointer must be freeable by free() and will be free()d when the object is FLAC__metadata_object_delete()d. It is legal to pass a null pointer as the data pointer to a FLAC__metadata_object_set_*() function as long as the length argument is 0 and the copy argument is false.
The FLAC__metadata_object_new() and FLAC__metadata_object_clone() function will return NULL in the case of a memory allocation error, otherwise a new object. The FLAC__metadata_object_set_*() functions return false in the case of a memory allocation error.
We don't have the convenience of C++ here, so note that the library relies on you to keep the types straight. In other words, if you pass, for example, a FLAC__StreamMetadata* that represents a STREAMINFO block to FLAC__metadata_object_application_set_data(), you will get an assertion failure.
There is no need to recalculate the length field on metadata blocks you have modified. They will be calculated automatically before they are written back to a file.
|
|
Create a new metadata object instance of the given type.
The object will be "empty"; i.e. values and data pointers will be Do not pass in a value greater than or equal to FLAC__METADATA_TYPE_UNDEFINED unless you really know what you're doing.
|
|
|
Create a copy of an existing metadata object. The copy is a "deep" copy, i.e. dynamically allocated data within the object is also copied. The caller takes ownership of the new block and is responsible for freeing it with FLAC__metadata_object_delete().
|
|
|
Free a metadata object. Deletes the object pointed to by object. The delete is a "deep" delete, i.e. dynamically allocated data within the object is also deleted.
|
|
||||||||||||
|
Compares two metadata objects. The compare is "deep", i.e. dynamically allocated data within the object is also compared.
|
|
||||||||||||||||||||
|
Sets the application data of an APPLICATION block.
If copy is
|
|
||||||||||||
|
Resize the seekpoint array. If the size shrinks, elements will truncated; if it grows, new placeholder points will be added to the end.
|
|
||||||||||||||||
|
Set a seekpoint in a seektable.
|
|
||||||||||||||||
|
Insert a seekpoint into a seektable.
|
|
||||||||||||
|
Delete a seekpoint from a seektable.
|
|
|
Check a seektable to see if it conforms to the FLAC specification. See the format specification for limits on the contents of the seektable.
|
|
||||||||||||
|
Append a number of placeholder points to the end of a seek table.
|
|
||||||||||||
|
Append a specific seek point template to the end of a seek table.
|
|
||||||||||||||||
|
Append specific seek point templates to the end of a seek table.
|
|
||||||||||||||||
|
Append a set of evenly-spaced seek point templates to the end of a seek table.
|
|
||||||||||||
|
Sort a seek table's seek points according to the format specification, removing duplicates.
|
|
||||||||||||||||
|
Sets the vendor string in a VORBIS_COMMENT block.
If copy is
|
|
||||||||||||
|
Resize the comment array. If the size shrinks, elements will truncated; if it grows, new empty fields will be added to the end.
|
|
||||||||||||||||||||
|
Sets a comment in a VORBIS_COMMENT block.
If copy is
|
|
||||||||||||||||||||
|
Insert a comment in a VORBIS_COMMENT block at the given index.
If copy is
|
|
||||||||||||
|
Delete a comment in a VORBIS_COMMENT block at the given index.
|
|
||||||||||||||||
|
Check if the given Vorbis comment entry's field name matches the given field name.
|
|
||||||||||||||||
|
Find a Vorbis comment with the given field name. The search begins at entry number offset; use and offset of 0 to search from the beginning of the comment array.
|
|
||||||||||||
|
Remove first Vorbis comment matching the given field name.
|
|
||||||||||||
|
Remove all Vorbis comments matching the given field name.
|
|
|
Create a new CUESHEET track instance.
The object will be "empty"; i.e. values and data pointers will be
|
|
|
Create a copy of an existing CUESHEET track object. The copy is a "deep" copy, i.e. dynamically allocated data within the object is also copied. The caller takes ownership of the new object and is responsible for freeing it with FLAC__metadata_object_cuesheet_track_delete().
|
|
|
Delete a CUESHEET track object
|
|
||||||||||||||||
|
Resize a track's index point array. If the size shrinks, elements will truncated; if it grows, new blank indices will be added to the end.
|
|
||||||||||||||||||||
|
Insert an index point in a CUESHEET track at the given index.
|
|
||||||||||||||||
|
Insert a blank index point in a CUESHEET track at the given index. A blank index point is one in which all field values are zero.
|
|
||||||||||||||||
|
Delete an index point in a CUESHEET track at the given index.
|
|
||||||||||||
|
Resize the track array. If the size shrinks, elements will truncated; if it grows, new blank tracks will be added to the end.
|
|
||||||||||||||||||||
|
Sets a track in a CUESHEET block.
If copy is
|
|
||||||||||||
|
Insert a blank track in a CUESHEET block at the given index. A blank track is one in which all field values are zero.
|
|
||||||||||||
|
Delete a track in a CUESHEET block at the given index.
|
|
||||||||||||||||
|
Check a cue sheet to see if it conforms to the FLAC specification. See the format specification for limits on the contents of the cue sheet.
|
1.3.6