PREFSMAN->m_iSoundPreferredSampleRate == 0 means "do what's right for the hardware". We want a 44.1khz default for most systems, but KS should default to 48khz.

This commit is contained in:
Glenn Maynard
2006-12-06 06:26:24 +00:00
parent 650ece9cec
commit 10fa6ceb2e
7 changed files with 19 additions and 3 deletions
@@ -95,6 +95,8 @@ RString RageSound_DSound_Software::Init()
/* Create a DirectSound stream, but don't force it into hardware. */
m_pPCM = new DSoundBuf;
m_iSampleRate = PREFSMAN->m_iSoundPreferredSampleRate;
if( m_iSampleRate == 0 )
m_iSampleRate = 44100;
sError = m_pPCM->Init( ds, DSoundBuf::HW_DONT_CARE, channels, m_iSampleRate, 16, g_iMaxWriteahead );
if( sError != "" )
return sError;