File diff r24596:eddf98238034 → r24597:afde5721a3b6
src/sound/xaudio2_s.cpp
Show inline comments
 
@@ -190,13 +190,13 @@ const char *SoundDriver_XAudio2::Start(c
 
	wfex.nSamplesPerSec = GetDriverParamInt(parm, "hz", 44100);
 
	wfex.nBlockAlign = (wfex.nChannels * wfex.wBitsPerSample) / 8;
 
	wfex.nAvgBytesPerSec = wfex.nSamplesPerSec * wfex.nBlockAlign;
 

	
 
	// Limit buffer size to prevent overflows
 
	int bufsize = GetDriverParamInt(parm, "bufsize", 8192);
 
	bufsize = min(bufsize, UINT16_MAX);
 
	bufsize = std::min<int>(bufsize, UINT16_MAX);
 

	
 
	_voice_context = new StreamingVoiceContext(bufsize * 4);
 

	
 
	if (_voice_context == nullptr)
 
	{
 
		_mastering_voice->DestroyVoice();