使用 libFLAC++ 将 vorbis 注释元数据(标签)写入现有 FLAC 文件
如何使用 libFLAC++ (http:// /flac.sourceforge.net)?
例如:
const char* fileName = "/path/to/file.flac";
// read tags from the file
FLAC::Metadata::VorbisComment vorbisComment;
FLAC::Metadata::get_tags(fileName, vorbisComment);
// make some changes
vorbisComment.append_comment("TITLE", "This is title");
// write changes back to the file ...
// :-( there is no API for that, i.e. something like this:
// FLAC::Metadata::write_tags(fileName, vorbisComment);
How to write vorbis comments metadata, i.e. tags (for example "TITLE"), to the existing FLAC file using libFLAC++ (http://flac.sourceforge.net)?
For example:
const char* fileName = "/path/to/file.flac";
// read tags from the file
FLAC::Metadata::VorbisComment vorbisComment;
FLAC::Metadata::get_tags(fileName, vorbisComment);
// make some changes
vorbisComment.append_comment("TITLE", "This is title");
// write changes back to the file ...
// :-( there is no API for that, i.e. something like this:
// FLAC::Metadata::write_tags(fileName, vorbisComment);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经分析了metaflac源代码(按照建议),这是问题的解决方案:
I've analysed metaflac source code (as suggested) and here is a solution to the problem: