Audio播放逻辑

This commit is contained in:
2024-02-23 16:24:42 +08:00
parent 5e794cf825
commit f005b19ee4
8 changed files with 206 additions and 36 deletions

View File

@@ -8,7 +8,7 @@
#include <cstring>
#include <string_view>
enum class FileType {
MUSIC,
AUDIO,
VIDEO,
IMG,
ERRORTYPE
@@ -64,7 +64,7 @@ private:
}
public:
static FileType GetFileType(const path& filepath) {
if (IsMusic(filepath)) return FileType::MUSIC;
if (IsMusic(filepath)) return FileType::AUDIO;
if (IsVideo(filepath)) return FileType::VIDEO;
if (IsImg(filepath)) return FileType::IMG;
return FileType::ERRORTYPE;