DirectSound: Increase the size of the default buffer size.

Public issue https://github.com/mackron/miniaudio/issues/429
This commit is contained in:
David Reid
2022-02-11 18:35:08 +10:00
parent 320b0e0536
commit 75b64cabf5
+5 -2
View File
@@ -23173,8 +23173,11 @@ static ma_result ma_config_to_WAVEFORMATEXTENSIBLE(ma_format format, ma_uint32 c
static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__dsound(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__dsound(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile)
{ {
/* DirectSound has a minimum period size of 20ms. */ /*
ma_uint32 minPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(20, nativeSampleRate); DirectSound has a minimum period size of 20ms. In practice, this doesn't seem to be enough for
reliable glitch-free processing so going to use 30ms instead.
*/
ma_uint32 minPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(30, nativeSampleRate);
ma_uint32 periodSizeInFrames; ma_uint32 periodSizeInFrames;
periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, nativeSampleRate, performanceProfile); periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, nativeSampleRate, performanceProfile);