summaryrefslogtreecommitdiff
path: root/platform/haiku
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-03-07 10:29:37 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-04-06 12:37:25 +0200
commitd450220baec506a627b7c9dc33a0d3afcb732046 (patch)
treeacb1e18c1c1eafb53f4befec6c0b9d86c5a7701b /platform/haiku
parent506ff1f065936153efef0ace24e0d922b999b9e6 (diff)
Use mix rate and output latency constants in audio drivers
Fix default mix rate in Xaudio2 and potential shadowing issue in JAndroid.
Diffstat (limited to 'platform/haiku')
-rw-r--r--platform/haiku/audio_driver_media_kit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/haiku/audio_driver_media_kit.cpp b/platform/haiku/audio_driver_media_kit.cpp
index 8b7dd08bb7..3c4e31da36 100644
--- a/platform/haiku/audio_driver_media_kit.cpp
+++ b/platform/haiku/audio_driver_media_kit.cpp
@@ -39,11 +39,11 @@ int32_t *AudioDriverMediaKit::samples_in = NULL;
Error AudioDriverMediaKit::init() {
active = false;
- mix_rate = 44100;
+ mix_rate = GLOBAL_DEF_RST("audio/mix_rate", DEFAULT_MIX_RATE);
speaker_mode = SPEAKER_MODE_STEREO;
channels = 2;
- int latency = GLOBAL_DEF_RST("audio/output_latency", 25);
+ int latency = GLOBAL_DEF_RST("audio/output_latency", DEFAULT_OUTPUT_LATENCY);
buffer_size = next_power_of_2(latency * mix_rate / 1000);
samples_in = memnew_arr(int32_t, buffer_size * channels);