win32: dont reset spu from sound config dialog unless the core changes
This commit is contained in:
parent
e9537e2468
commit
c6c2ec7137
|
@ -40,6 +40,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
|
||||
SPU_struct *SPU_core = 0;
|
||||
SPU_struct *SPU_user = 0;
|
||||
int SPU_currentCoreNum = SNDCORE_DUMMY;
|
||||
|
||||
static SoundInterface_struct *SNDCore=NULL;
|
||||
extern SoundInterface_struct *SNDCoreList[];
|
||||
|
@ -274,6 +275,8 @@ int SPU_ChangeSoundCore(int coreid, int buffersize)
|
|||
if (coreid == SNDCORE_DEFAULT)
|
||||
coreid = 0; // Assume we want the first one
|
||||
|
||||
SPU_currentCoreNum = coreid;
|
||||
|
||||
// Go through core list and find the id
|
||||
for (i = 0; SNDCoreList[i] != NULL; i++)
|
||||
{
|
||||
|
|
|
@ -49,6 +49,7 @@ struct SoundInterface_struct
|
|||
|
||||
extern SoundInterface_struct SNDDummy;
|
||||
extern SoundInterface_struct SNDFile;
|
||||
extern int SPU_currentCoreNum;
|
||||
|
||||
class ADPCMCacheItem;
|
||||
|
||||
|
|
|
@ -4050,6 +4050,7 @@ LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||
sscanf(tempstr, "%d", &sndbuffersize);
|
||||
WritePrivateProfileString("Sound", "SoundBufferSize", tempstr, IniName);
|
||||
|
||||
if(sndcoretype != SPU_currentCoreNum)
|
||||
{
|
||||
Lock lock;
|
||||
SPU_ChangeSoundCore(sndcoretype, sndbuffersize);
|
||||
|
|
Loading…
Reference in New Issue