Upgrade Playlist Features
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
#define MUSIC_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// 前向声明
|
||||
struct SongInfo;
|
||||
|
||||
class Music {
|
||||
public:
|
||||
@@ -15,16 +19,22 @@ public:
|
||||
virtual bool StopStreaming() = 0; // 停止流式播放
|
||||
virtual size_t GetBufferSize() const = 0;
|
||||
virtual bool IsDownloading() const = 0;
|
||||
virtual bool IsPlaying() const = 0;
|
||||
virtual bool IsPaused() const = 0;
|
||||
virtual int16_t* GetAudioData() = 0;
|
||||
|
||||
// MCP工具需要的方法
|
||||
virtual bool PlaySong() = 0;
|
||||
virtual bool SetVolume(int volume) = 0;
|
||||
virtual bool StopSong() = 0;
|
||||
virtual bool PauseSong() = 0;
|
||||
virtual bool ResumeSong() = 0;
|
||||
// 音乐播放信息获取方法
|
||||
virtual int GetCurrentSongDurationSeconds() const = 0;
|
||||
virtual int GetCurrentPlayTimeSeconds() const = 0;
|
||||
virtual float GetPlayProgress() const = 0;
|
||||
|
||||
// 播放队列相关方法
|
||||
virtual bool PlayPlaylist(const std::vector<SongInfo>& songs) = 0;
|
||||
virtual bool NextSong() = 0;
|
||||
virtual bool PreviousSong() = 0;
|
||||
virtual void StopPlaylist() = 0;
|
||||
virtual bool IsPlaylistMode() const = 0;
|
||||
virtual int GetCurrentPlaylistIndex() const = 0;
|
||||
virtual size_t GetPlaylistSize() const = 0;
|
||||
virtual SongInfo GetCurrentSong() const = 0;
|
||||
};
|
||||
|
||||
#endif // MUSIC_H
|
||||
Reference in New Issue
Block a user