# MusicCollection (/zh-CN/api-reference/rtc/unreal-cpp/class-musiccollection) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). ```cpp class MusicCollection : public RefCountInterface { public: virtual int getCount() = 0; virtual int getTotal() = 0; virtual int getPage() = 0; virtual int getPageSize() = 0; virtual Music* getMusic(int32_t index) = 0; protected: virtual ~MusicCollection() = default; }; ``` ## 方法 [#方法] 获取本次请求的音乐资源数量,详见 [getCount [2/2]](/zh-CN/api-reference/rtc/unreal-cpp/play/drm#api_musiccollection_getcount)。 获取列表内音乐资源的总数量,详见 [getTotal](/zh-CN/api-reference/rtc/unreal-cpp/play/drm#api_musiccollection_gettotal)。 获取音乐资源列表当前页的页码,详见 [getPage](/zh-CN/api-reference/rtc/unreal-cpp/play/drm#api_musiccollection_getpage)。 获取 SDK 实际返回的音乐资源数量,详见 [getPageSize](/zh-CN/api-reference/rtc/unreal-cpp/play/drm#api_musiccollection_getpagesize)。 获取当前页面列表中音乐资源的详细信息,详见 [getMusic](/zh-CN/api-reference/rtc/unreal-cpp/play/drm#api_musiccollection_getmusic)。