本文整理汇总了C++中music_info::CMusicInfoTag::SetArtist方法的典型用法代码示例。如果您正苦于以下问题:C++ CMusicInfoTag::SetArtist方法的具体用法?C++ CMusicInfoTag::SetArtist怎么用?C++ CMusicInfoTag::SetArtist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类music_info::CMusicInfoTag
的用法示例。
在下文中一共展示了CMusicInfoTag::SetArtist方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetMetadataFromBuffer
void CAirTunesServer::SetMetadataFromBuffer(const char *buffer, unsigned int size)
{
MUSIC_INFO::CMusicInfoTag tag;
std::map<std::string, std::string> metadata = decodeDMAP(buffer, size);
if(metadata["asal"].length())
tag.SetAlbum(metadata["asal"]);//album
if(metadata["minm"].length())
tag.SetTitle(metadata["minm"]);//title
if(metadata["asar"].length())
tag.SetArtist(metadata["asar"]);//artist
CApplicationMessenger::Get().SetCurrentSongTag(tag);
}
示例2: RefreshMetadata
void CAirTunesServer::RefreshMetadata()
{
CSingleLock lock(m_metadataLock);
MUSIC_INFO::CMusicInfoTag tag;
if (m_metadata[0].length())
tag.SetAlbum(m_metadata[0]);//album
if (m_metadata[1].length())
tag.SetTitle(m_metadata[1]);//title
if (m_metadata[2].length())
tag.SetArtist(m_metadata[2]);//artist
CApplicationMessenger::Get().SetCurrentSongTag(tag);
}
示例3: RefreshMetadata
void CAirTunesServer::RefreshMetadata()
{
CSingleLock lock(m_metadataLock);
MUSIC_INFO::CMusicInfoTag tag;
if (g_infoManager.GetCurrentSongTag())
tag = *g_infoManager.GetCurrentSongTag();
if (m_metadata[0].length())
tag.SetAlbum(m_metadata[0]);//album
if (m_metadata[1].length())
tag.SetTitle(m_metadata[1]);//title
if (m_metadata[2].length())
tag.SetArtist(m_metadata[2]);//artist
CApplicationMessenger::GetInstance().PostMsg(TMSG_UPDATE_CURRENT_ITEM, 1, -1, static_cast<void*>(new CFileItem(tag)));
}
示例4: Load
bool CAudioDecoder::Load(const std::string& fileName,
MUSIC_INFO::CMusicInfoTag& tag,
MUSIC_INFO::EmbeddedArt* art)
{
if (!Initialized())
return false;
char title[256];
char artist[256];
int length;
if (m_pStruct->ReadTag(fileName.c_str(), title, artist, &length))
{
tag.SetTitle(title);
tag.SetArtist(artist);
tag.SetDuration(length);
return true;
}
return false;
}