use D3DCREATE_FPU_PRESERVE when initializing Direct3D to fix low frequency noise in DirectSound

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@268 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
spacy51 2008-01-06 20:57:35 +00:00
parent 637926b6c1
commit 6f6ab0c4fa
2 changed files with 1 additions and 10 deletions

View File

@ -27,10 +27,6 @@
#include "Util.h" #include "Util.h"
#include "Port.h" #include "Port.h"
#ifdef _WIN32
//#include <float.h>
#endif
#include "gb/gb_apu/Gb_Apu.h" #include "gb/gb_apu/Gb_Apu.h"
#include "gb/gb_apu/Multi_Buffer.h" #include "gb/gb_apu/Multi_Buffer.h"
@ -451,12 +447,6 @@ static void remake_stereo_buffer()
if ( !ioMem ) if ( !ioMem )
return; return;
#ifdef _WIN32
// Direct3D might mess with FPU mode. Try uncommenting if more sound problems
// occur (also need to uncomment #include <float.h> above).
//_fpreset();
#endif
// Clears pointers kept to old stereo_buffer // Clears pointers kept to old stereo_buffer
pcm [0].pcm.init(); pcm [0].pcm.init();
pcm [1].pcm.init(); pcm [1].pcm.init();

View File

@ -303,6 +303,7 @@ bool Direct3DDisplay::initialize()
D3DADAPTER_DEFAULT, D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL, D3DDEVTYPE_HAL,
theApp.m_pMainWnd->GetSafeHwnd(), theApp.m_pMainWnd->GetSafeHwnd(),
D3DCREATE_FPU_PRESERVE |
D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&dpp, &dpp,
&pDevice); &pDevice);