Skip to content

Commit

Permalink
test3
Browse files Browse the repository at this point in the history
  • Loading branch information
lrisora committed Aug 17, 2024
1 parent 731508f commit c36f42f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MusicPlayer2/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ class CPlayer
static CPlayer m_instance; //CPlayer类唯一的对象
CCriticalSection m_critical;
CCriticalSection m_album_cover_sync; //用于专辑封面的线程同步对象
std::timed_mutex m_play_status_sync; // 更改播放状态时加锁,请使用GetPlayStatusMutex获取
std::mutex m_play_status_sync; // 更改播放状态时加锁,请使用GetPlayStatusMutex获取
public:
// 在“稳态”(稳定的播放/暂停/停止)之间切换期间请先持有此锁
// 避免其他线程中途介入以及当前操作发生重入
std::timed_mutex& GetPlayStatusMutex() { return m_play_status_sync; }
std::mutex& GetPlayStatusMutex() { return m_play_status_sync; }

public:
//获取CPlayer类的唯一的对象
Expand Down

0 comments on commit c36f42f

Please sign in to comment.