Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8f46c3f

Browse files
committed
fix Mq-b#27 注意播放类的初始化问题,提示
1 parent 89ee36d commit 8f46c3f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎md/04同步操作.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@ private:
370370

371371
该代码实现了一个简单的**后台音频播放类型**,通过**条件变量****互斥量**确保播放线程 `playMusic` 只在只在**有音频任务需要播放时工作**(当外部通过调用 `addAudioPath()` 向队列添加播放任务时)。在没有任务时,线程保持等待状态,避免占用 CPU 资源影响主程序的运行。
372372

373+
> ### 注意
374+
> 其实这段代码还存在着一个初始化顺序导致的问题,见 [**#27**](https://github.com/Mq-b/ModernCpp-ConcurrentProgramming-Tutorial/issues/27)
375+
376+
此外,关于提示音的播报,为了避免每次都手动添加路径,我们可以创建一个音频资源数组,便于使用:
377+
373378
此外,关于提示音的播报,为了避免每次都手动添加路径,我们可以创建一个音频资源数组,便于使用:
374379

375380
```cpp

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /