feat: add lyricResolve for resole .lrc file

feat: add backgroundDisplay for play ascii video in terminal
	feat: add musicPlayer for play music in terminal
This commit is contained in:
2026-08-30 11:35:47 +08:00
parent fdfbf5262f
commit 00b7c0b324
16 changed files with 97267 additions and 15 deletions
+22
View File
@@ -0,0 +1,22 @@
// musicPlayer.h
//
// Play an audio file (MP3 / WAV / FLAC) through the system audio device.
// Backed by the vendored miniaudio library (third_party/miniaudio.h), which
// decodes and plays these formats natively and works on both Linux and
// Windows. The header deliberately does not include miniaudio.
#pragma once
#include <atomic>
#include <string>
namespace mp {
// Blocking playback of `path`. Returns 0 on success (played to the end or
// stopped early via `stop`). Non-zero return values:
// 1 argument error
// 2 could not open/decode the file
// 3 no audio device available (caller should degrade gracefully)
int play(const std::string& path, std::atomic<bool>* stop = nullptr);
} // namespace mp