Yes of course. What I had in mind, was to create VorbisComment::append_comment(char const *field_name, char const *field_value) functions, without the need for an Entry object. And similar for insert_comment, replace_comment and others. The idea coming from uses as in the file encode example code, where the Entry object is really not used by itself.
The easy way to implement this would be to just create the Entry object in the new function and then call the old function with the Entry object. But I thought this was inefficient and didn't improve on just typing 'append_comment(FLAC::Metadata::VorbisComment::Entry("ARTIST", "Justin Bieber"))', except it would be a shorter line. The efficient way, when a user controlled Entry object isn't necessary, would really bypass creating the Entry object altogether and copy the char * directly into the underlying FLAC__StreamMetadata struct. But looking at the code (which I did a while ago, so I forgot the details) it would require either duplicating a lot of code or splitting the existing code into some separate functions so the relevant parts can be used by both versions of the append_comment(). It all just seems too much trouble for what it's worth. Bas ----- Original Message ----- From: Martin Leese <martin.le...@stanfordalumni.org> To: flac-dev@xiph.org Cc: Sent: Tuesday, September 11, 2012 9:25 PM Subject: Re: [flac-dev] Patch for Metadata::Padding Bastiaan Timmer wrote: ... > In a > previous message I mentioned writing some more convenience functions, but on > closer inspection they would either be inefficient or very difficult > to implement. Could you briefly list these, in case somebody else wants to have a go. Many thanks, Martin -- Martin J Leese E-mail: martin.leeseĀ stanfordalumni.org Web: http://members.tripod.com/martin_leese/ _______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev _______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev