removed DirectSound useOldSync option (would wait with an evil while())
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@206 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
fc6989e710
commit
dd3c201018
|
@ -182,21 +182,19 @@ bool DirectSound::init()
|
|||
}
|
||||
|
||||
|
||||
if( !theApp.useOldSync ) {
|
||||
if( SUCCEEDED( hr = dsbSecondary->QueryInterface( IID_IDirectSoundNotify8, (LPVOID*)&dsbNotify ) ) ) {
|
||||
dsbEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
|
||||
DSBPOSITIONNOTIFY notify[10];
|
||||
for( i = 0; i < 10; i++ ) {
|
||||
notify[i].dwOffset = i * soundBufferLen;
|
||||
notify[i].hEventNotify = dsbEvent;
|
||||
}
|
||||
if( SUCCEEDED( hr = dsbSecondary->QueryInterface( IID_IDirectSoundNotify8, (LPVOID*)&dsbNotify ) ) ) {
|
||||
dsbEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
|
||||
DSBPOSITIONNOTIFY notify[10];
|
||||
for( i = 0; i < 10; i++ ) {
|
||||
notify[i].dwOffset = i * soundBufferLen;
|
||||
notify[i].hEventNotify = dsbEvent;
|
||||
}
|
||||
|
||||
if( FAILED( dsbNotify->SetNotificationPositions( 10, notify ) ) ) {
|
||||
dsbNotify->Release();
|
||||
dsbNotify = NULL;
|
||||
CloseHandle(dsbEvent);
|
||||
dsbEvent = NULL;
|
||||
}
|
||||
if( FAILED( dsbNotify->SetNotificationPositions( 10, notify ) ) ) {
|
||||
dsbNotify->Release();
|
||||
dsbNotify = NULL;
|
||||
CloseHandle(dsbEvent);
|
||||
dsbEvent = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -236,8 +236,6 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
|
|||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_SOUND_MUTE, OnUpdateOptionsSoundMute)
|
||||
ON_COMMAND(ID_OPTIONS_SOUND_ON, OnOptionsSoundOn)
|
||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_SOUND_ON, OnUpdateOptionsSoundOn)
|
||||
ON_COMMAND(ID_OPTIONS_SOUND_USEOLDSYNCHRONIZATION, OnOptionsSoundUseoldsynchronization)
|
||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_SOUND_USEOLDSYNCHRONIZATION, OnUpdateOptionsSoundUseoldsynchronization)
|
||||
ON_COMMAND(ID_OPTIONS_SOUND_ECHO, OnOptionsSoundEcho)
|
||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_SOUND_ECHO, OnUpdateOptionsSoundEcho)
|
||||
ON_COMMAND(ID_OPTIONS_SOUND_LOWPASSFILTER, OnOptionsSoundLowpassfilter)
|
||||
|
|
|
@ -273,8 +273,6 @@ class MainWnd : public CWnd
|
|||
afx_msg void OnUpdateOptionsSoundMute(CCmdUI* pCmdUI);
|
||||
afx_msg void OnOptionsSoundOn();
|
||||
afx_msg void OnUpdateOptionsSoundOn(CCmdUI* pCmdUI);
|
||||
afx_msg void OnOptionsSoundUseoldsynchronization();
|
||||
afx_msg void OnUpdateOptionsSoundUseoldsynchronization(CCmdUI* pCmdUI);
|
||||
afx_msg void OnOptionsSoundEcho();
|
||||
afx_msg void OnUpdateOptionsSoundEcho(CCmdUI* pCmdUI);
|
||||
afx_msg void OnOptionsSoundLowpassfilter();
|
||||
|
|
|
@ -1006,18 +1006,6 @@ void MainWnd::OnUpdateOptionsSoundOn(CCmdUI* pCmdUI)
|
|||
pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording);
|
||||
}
|
||||
|
||||
void MainWnd::OnOptionsSoundUseoldsynchronization()
|
||||
{
|
||||
theApp.useOldSync = !theApp.useOldSync;
|
||||
systemMessage(IDS_SETTING_WILL_BE_EFFECTIVE,
|
||||
"Setting will be effective the next time you start the emulator");
|
||||
}
|
||||
|
||||
void MainWnd::OnUpdateOptionsSoundUseoldsynchronization(CCmdUI* pCmdUI)
|
||||
{
|
||||
pCmdUI->SetCheck(theApp.useOldSync);
|
||||
}
|
||||
|
||||
void MainWnd::OnOptionsSoundEcho()
|
||||
{
|
||||
soundEcho = !soundEcho;
|
||||
|
|
|
@ -297,7 +297,6 @@ VBA::VBA()
|
|||
regEnabled = false;
|
||||
pauseWhenInactive = true;
|
||||
speedupToggle = false;
|
||||
useOldSync = false;
|
||||
winGbPrinterEnabled = false;
|
||||
threadPriority = 2;
|
||||
disableMMX = false;
|
||||
|
@ -1564,9 +1563,6 @@ void VBA::loadSettings()
|
|||
pauseWhenInactive = regQueryDwordValue("pauseWhenInactive", 1) ?
|
||||
true : false;
|
||||
|
||||
useOldSync = regQueryDwordValue("useOldSync", 0) ?
|
||||
TRUE : FALSE;
|
||||
|
||||
captureFormat = regQueryDwordValue("captureFormat", 0);
|
||||
|
||||
removeIntros = regQueryDwordValue("removeIntros", false) ? true : false;
|
||||
|
@ -2636,8 +2632,6 @@ void VBA::saveSettings()
|
|||
|
||||
regSetDwordValue("pauseWhenInactive", pauseWhenInactive);
|
||||
|
||||
regSetDwordValue("useOldSync", useOldSync);
|
||||
|
||||
regSetDwordValue("captureFormat", captureFormat);
|
||||
|
||||
regSetDwordValue("removeIntros", removeIntros);
|
||||
|
|
|
@ -172,7 +172,6 @@ class VBA : public CWinApp
|
|||
int skinButtons;
|
||||
bool pauseWhenInactive;
|
||||
bool speedupToggle;
|
||||
bool useOldSync;
|
||||
bool winGbPrinterEnabled;
|
||||
int threadPriority;
|
||||
bool disableMMX;
|
||||
|
|
|
@ -1706,7 +1706,6 @@ BEGIN
|
|||
POPUP "Output API"
|
||||
BEGIN
|
||||
MENUITEM "DirectSound", ID_OUTPUTAPI_DIRECTSOUND
|
||||
MENUITEM " Use &old synchronization", ID_OPTIONS_SOUND_USEOLDSYNCHRONIZATION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "OpenAL", ID_OUTPUTAPI_OPENAL
|
||||
MENUITEM " Configuration...", ID_OUTPUTAPI_OALCONFIGURATION
|
||||
|
|
|
@ -633,7 +633,6 @@
|
|||
#define ID_OPTIONS_VIDEO_LAYERS_WIN1 40133
|
||||
#define ID_OPTIONS_VIDEO_LAYERS_OBJWIN 40134
|
||||
#define ID_FILE_OPENGAMEBOY 40135
|
||||
#define ID_OPTIONS_SOUND_USEOLDSYNCHRONIZATION 40136
|
||||
#define ID_DEBUG_NEXTFRAME 40137
|
||||
#define ID_TOOLS_MAPVIEW 40138
|
||||
#define ID_TOOLS_PALETTEVIEW 40139
|
||||
|
|
Loading…
Reference in New Issue