[Flac-dev] How do you set the Application ID value in an an Application Metadata Block?
Chris Angelli
christineangelli at gmail.com
Wed Apr 21 12:50:49 PDT 2010
Hi,
I have written an application that uses the FLAC C API to insert an
application metadata block into a FLAC file. Everything appears to be
working, but I have one nagging issue.
I have used all my best google and source code searching skills and I cannot
for the life of me find an API call to set the Application ID value in my
metadata object. I am currently working around the issue by setting the
value manually, but that hurts my good coding sense.
(Note: I have already registered my ID.)
Is there an API call to set the application metadata ID?
Here's what I'm doing:
myFlacMetadata = FLAC__metadata_object_new
(FLAC__METADATA_TYPE_APPLICATION);
FLAC__metadata_object_application_set_data (uitsFlacMetadata,
myMetadata, myMetadataSize, FALSE);
/* this is a BIG FAT NO NO, but I cannot for the life of me find any way
in the FLAC API to set */
/* the Application block application ID, therefore I am going rogue and
setting it explicitly */
myFlacMetadata->data.application.id[0] = 'M';
myFlacMetadata->data.application.id[1] = 'Y';
myFlacMetadata->data.application.id[2] = 'I';
myFlacMetadata->data.application.id[3] = 'D';
Thanks for any help.
-chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20100421/f252ef98/attachment.htm
More information about the Flac-dev
mailing list