mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 00:34:03 +02:00
DirectSound: Increase the size of the default buffer size.
Public issue https://github.com/mackron/miniaudio/issues/429
This commit is contained in:
+5
-2
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user