本文整理汇总了C++中Metadata::GetAlbumTitleSortOrder方法的典型用法代码示例。如果您正苦于以下问题:C++ Metadata::GetAlbumTitleSortOrder方法的具体用法?C++ Metadata::GetAlbumTitleSortOrder怎么用?C++ Metadata::GetAlbumTitleSortOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Metadata
的用法示例。
在下文中一共展示了Metadata::GetAlbumTitleSortOrder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void SFB::Audio::Metadata::CopyMetadata(const Metadata& metadata, unsigned kind)
{
if(Basic & kind) {
SetValue(kTitleKey, metadata.GetTitle());
SetValue(kAlbumTitleKey, metadata.GetAlbumTitle());
SetValue(kArtistKey, metadata.GetArtist());
SetValue(kAlbumArtistKey, metadata.GetAlbumArtist());
SetValue(kGenreKey, metadata.GetGenre());
SetValue(kComposerKey, metadata.GetComposer());
SetValue(kReleaseDateKey, metadata.GetReleaseDate());
SetValue(kCompilationKey, metadata.GetCompilation());
SetValue(kTrackNumberKey, metadata.GetTrackNumber());
SetValue(kTrackTotalKey, metadata.GetTrackTotal());
SetValue(kDiscNumberKey, metadata.GetDiscNumber());
SetValue(kDiscTotalKey, metadata.GetDiscTotal());
SetValue(kLyricsKey, metadata.GetLyrics());
SetValue(kBPMKey, metadata.GetBPM());
SetValue(kRatingKey, metadata.GetRating());
SetValue(kCommentKey, metadata.GetComment());
SetValue(kISRCKey, metadata.GetISRC());
SetValue(kMCNKey, metadata.GetMCN());
SetValue(kMusicBrainzReleaseIDKey, metadata.GetMusicBrainzReleaseID());
SetValue(kMusicBrainzRecordingIDKey, metadata.GetMusicBrainzRecordingID());
}
if(Sorting & kind) {
SetValue(kTitleSortOrderKey, metadata.GetTitleSortOrder());
SetValue(kAlbumTitleSortOrderKey, metadata.GetAlbumTitleSortOrder());
SetValue(kArtistSortOrderKey, metadata.GetArtistSortOrder());
SetValue(kAlbumArtistSortOrderKey, metadata.GetAlbumArtistSortOrder());
SetValue(kComposerSortOrderKey, metadata.GetComposer());
}
if(Grouping & kind)
SetValue(kGroupingKey, metadata.GetGrouping());
if(Additional & kind)
SetValue(kAdditionalMetadataKey, metadata.GetAdditionalMetadata());
if(ReplayGain & kind) {
SetValue(kReferenceLoudnessKey, metadata.GetReplayGainReferenceLoudness());
SetValue(kTrackGainKey, metadata.GetReplayGainTrackGain());
SetValue(kTrackPeakKey, metadata.GetReplayGainTrackPeak());
SetValue(kAlbumGainKey, metadata.GetReplayGainAlbumGain());
SetValue(kAlbumPeakKey, metadata.GetReplayGainAlbumPeak());
}
}
示例2: if
//.........这里部分代码省略.........
if(nullptr != musicBrainzReleaseIDFrame)
tag->removeFrame(musicBrainzReleaseIDFrame);
CFStringRef musicBrainzReleaseID = metadata.GetMusicBrainzReleaseID();
if(musicBrainzReleaseID) {
auto frame = new TagLib::ID3v2::UserTextIdentificationFrame();
frame->setDescription("MusicBrainz Album Id");
frame->setText(TagLib::StringFromCFString(musicBrainzReleaseID));
tag->addFrame(frame);
}
auto musicBrainzRecordingIDFrame = TagLib::ID3v2::UserTextIdentificationFrame::find(const_cast<TagLib::ID3v2::Tag *>(tag), "MusicBrainz Track Id");
if(nullptr != musicBrainzRecordingIDFrame)
tag->removeFrame(musicBrainzRecordingIDFrame);
CFStringRef musicBrainzRecordingID = metadata.GetMusicBrainzRecordingID();
if(musicBrainzRecordingID) {
auto frame = new TagLib::ID3v2::UserTextIdentificationFrame();
frame->setDescription("MusicBrainz Track Id");
frame->setText(TagLib::StringFromCFString(musicBrainzRecordingID));
tag->addFrame(frame);
}
// Sorting and grouping
tag->removeFrames("TSOT");
if(metadata.GetTitleSortOrder()) {
auto frame = new TagLib::ID3v2::TextIdentificationFrame("TSOT", TagLib::String::UTF8);
frame->setText(TagLib::StringFromCFString(metadata.GetTitleSortOrder()));
tag->addFrame(frame);
}
tag->removeFrames("TSOA");
if(metadata.GetAlbumTitleSortOrder()) {
auto frame = new TagLib::ID3v2::TextIdentificationFrame("TSOA", TagLib::String::UTF8);
frame->setText(TagLib::StringFromCFString(metadata.GetAlbumTitleSortOrder()));
tag->addFrame(frame);
}
tag->removeFrames("TSOP");
if(metadata.GetArtistSortOrder()) {
auto frame = new TagLib::ID3v2::TextIdentificationFrame("TSOP", TagLib::String::UTF8);
frame->setText(TagLib::StringFromCFString(metadata.GetArtistSortOrder()));
tag->addFrame(frame);
}
tag->removeFrames("TSO2");
if(metadata.GetAlbumArtistSortOrder()) {
auto frame = new TagLib::ID3v2::TextIdentificationFrame("TSO2", TagLib::String::UTF8);
frame->setText(TagLib::StringFromCFString(metadata.GetAlbumArtistSortOrder()));
tag->addFrame(frame);
}
tag->removeFrames("TSOC");
if(metadata.GetComposerSortOrder()) {
auto frame = new TagLib::ID3v2::TextIdentificationFrame("TSOC", TagLib::String::UTF8);
frame->setText(TagLib::StringFromCFString(metadata.GetComposerSortOrder()));
tag->addFrame(frame);
}
tag->removeFrames("TIT1");
if(metadata.GetGrouping()) {
auto frame = new TagLib::ID3v2::TextIdentificationFrame("TIT1", TagLib::String::UTF8);
frame->setText(TagLib::StringFromCFString(metadata.GetGrouping()));
tag->addFrame(frame);
}