Consolidate BackgroundAudio.cpp into a class

This commit is contained in:
Henrik Rydgård committed 2020-08-03 10:43:26 +02:00
1 parent 60683cf4a4
commit 6f02844b5b
6 files changed
+42 -33

No files matched your search

+2 -2
View File
@@ -271,7 +271,7 @@ std::string NativeQueryConfig(std::string query) {
int NativeMix(short *audio, int num_samples) {
if (GetUIState() != UISTATE_INGAME) {
PlayBackgroundAudio();
g_BackgroundAudio.Play();
}
int sample_rate = System_GetPropertyInt(SYSPROP_AUDIO_SAMPLE_RATE);
@@ -1040,7 +1040,7 @@ void NativeRender(GraphicsContext *graphicsContext) {
if (GetUIState() != UISTATE_INGAME) {
// Note: We do this from NativeRender so that the graphics context is
// guaranteed valid, to be safe - g_gameInfoCache messes around with textures.
UpdateBackgroundAudio();
g_BackgroundAudio.Update();
}
float xres = dp_xres;