Commit graph

5 commits

Author SHA1 Message Date
Kyle Neideck
1171bee102
Refactor non-UI code out of BGMAppVolumes. 2017-10-28 18:13:08 +11:00
Kyle Neideck
b715212cab
Ignore UI sounds when auto-pausing.
On macOS, apps are supposed to play UI-related sounds using the "system
default" device. This commit creates a new instance of BGM_Driver, which
BGMApp sets as the system default device. BGMApp ignores audio played to
that device when deciding whether to pause/unpause the user's music
player.

Since UI sounds are short, this helps avoid pausing the music player and
unpausing it shortly after.
2017-07-30 18:16:25 +10:00
Kyle Neideck
5a657a01a6
Fix dropped frames when starting IO.
It turns out that the HAL will sometimes call BGM_Driver::StartIO before
sending kAudioDevicePropertyDeviceIsRunning to BGMPlayThrough. In that
case, BGMApp would start playthrough and tell BGMDriver to return from
StartIO immediately, which meant we would drop the initial frames while
the output device started up.

So now BGMApp waits for the output device in that case as well.

Fixes #7.
2017-06-22 19:36:17 +10:00
Kyle Neideck
9b5d5bf921
Remove BGMAppTests, which was essentially empty. 2017-02-18 18:59:32 +11:00
Kyle Neideck
07c1c2320b
Reorganise the BGMApp test dirs slightly. 2017-02-18 18:12:40 +11:00