FrontendCommon: Add PlaySoundAsync()

This commit is contained in:
Connor McLaughlin
2022-09-21 22:44:52 +10:00
parent cba4bb4ab2
commit a4eb5f1d5d
10 changed files with 195 additions and 86 deletions

View File

@ -0,0 +1,10 @@
#include "common/window_info.h"
namespace FrontendCommon {
void SuspendScreensaver(const WindowInfo& wi);
void ResumeScreensaver();
/// Abstracts platform-specific code for asynchronously playing a sound.
/// On Windows, this will use PlaySound(). On Linux, it will shell out to aplay. On MacOS, it uses NSSound.
bool PlaySoundAsync(const char* path);
} // namespace FrontendCommon