1 #pragma once 2 #include "SongInfo.h" 3 #include "CommonData.h" 4 class CSongInfoHelper 5 { 6 public: 7 static CString GetBitrateString(const SongInfo& song); 8 static wstring GetChannelsString(BYTE channels); 9 static CString GetFreqString(const SongInfo& song); 10 static CString GetBitsString(const SongInfo& song); 11 12 struct ChannelInfo 13 { 14 int bitrate{}; 15 int freq{}; 16 int bits{}; 17 int channels{}; 18 }; 19 static void SetSongChannelInfo(SongInfo& song, const ChannelInfo& channel_info); 20 static ChannelInfo GetSongChannelInfo(const SongInfo& song); 21 static std::wstring GetDisplayStr(const SongInfo& song_info, DisplayFormat display_format); //根据display_format指定的显示格式,返回一首曲目显示的字符串 22 static std::wstring GetPlaylistItemToolTip(const SongInfo& song_info, bool show_title, bool show_full_path); 23 24 }; 25