From 6f6ab0c4fabb3b655f9aff49dcaef7b4cdf34349 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sun, 6 Jan 2008 20:57:35 +0000 Subject: [PATCH] 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 --- src/Sound.cpp | 10 ---------- src/win32/Direct3D.cpp | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Sound.cpp b/src/Sound.cpp index 1cd34c20..38b831fe 100644 --- a/src/Sound.cpp +++ b/src/Sound.cpp @@ -27,10 +27,6 @@ #include "Util.h" #include "Port.h" -#ifdef _WIN32 -//#include -#endif - #include "gb/gb_apu/Gb_Apu.h" #include "gb/gb_apu/Multi_Buffer.h" @@ -451,12 +447,6 @@ static void remake_stereo_buffer() if ( !ioMem ) return; -#ifdef _WIN32 - // Direct3D might mess with FPU mode. Try uncommenting if more sound problems - // occur (also need to uncomment #include above). - //_fpreset(); -#endif - // Clears pointers kept to old stereo_buffer pcm [0].pcm.init(); pcm [1].pcm.init(); diff --git a/src/win32/Direct3D.cpp b/src/win32/Direct3D.cpp index cd3606e3..ebdbe4ad 100644 --- a/src/win32/Direct3D.cpp +++ b/src/win32/Direct3D.cpp @@ -303,6 +303,7 @@ bool Direct3DDisplay::initialize() D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, theApp.m_pMainWnd->GetSafeHwnd(), + D3DCREATE_FPU_PRESERVE | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &dpp, &pDevice);