Commit 75b64cab authored by David Reid's avatar David Reid

DirectSound: Increase the size of the default buffer size.

Public issue https://github.com/mackron/miniaudio/issues/429
parent 320b0e05
......@@ -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)
{
/* 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;
periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, nativeSampleRate, performanceProfile);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment