Improve sound smoothness on Android

This commit is contained in:
raven02 2013-04-12 14:03:51 -07:00
parent d586d7ddd2
commit 25ab9292e4

View File

@ -37,13 +37,18 @@ int mixFrequency = 44100;
const int hwSampleRate = 44100;
const int hwBlockSize = 64;
const int hostAttemptBlockSize = 256;
const int hostAttemptBlockSize = 2048;
const int audioIntervalUs = (int)(1000000ULL * hwBlockSize / hwSampleRate);
const int audioHostIntervalUs = (int)(1000000ULL * hostAttemptBlockSize / hwSampleRate);
// High and low watermarks, basically.
const int chanQueueMaxSizeFactor = 4;
const int chanQueueMinSizeFactor = 1;
#ifdef ANDROID
const int chanQueueMaxSizeFactor = 8;
const int chanQueueMinSizeFactor = 4;
#else
const int chanQueueMaxSizeFactor = 2;
const int chanQueueMinSizeFactor = 1;
#endif
FixedSizeQueue<s16, hostAttemptBlockSize * 16> outAudioQueue;