disable some sound settings while recording sound

This commit is contained in:
spacy51 2007-12-15 18:12:15 +00:00
parent d1032f568b
commit 51a38b16e8
3 changed files with 16 additions and 0 deletions

View File

@ -458,6 +458,7 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
ON_COMMAND(ID_OUTPUTAPI_OPENAL, &MainWnd::OnOutputapiOpenal) ON_COMMAND(ID_OUTPUTAPI_OPENAL, &MainWnd::OnOutputapiOpenal)
ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_OPENAL, &MainWnd::OnUpdateOutputapiOpenal) ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_OPENAL, &MainWnd::OnUpdateOutputapiOpenal)
ON_COMMAND(ID_OUTPUTAPI_OALCONFIGURATION, &MainWnd::OnOutputapiOalconfiguration) ON_COMMAND(ID_OUTPUTAPI_OALCONFIGURATION, &MainWnd::OnOutputapiOalconfiguration)
ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_OALCONFIGURATION, &MainWnd::OnUpdateOutputapiOalconfiguration)
END_MESSAGE_MAP() END_MESSAGE_MAP()

View File

@ -452,6 +452,7 @@ public:
afx_msg void OnOutputapiOpenal(); afx_msg void OnOutputapiOpenal();
afx_msg void OnUpdateOutputapiOpenal(CCmdUI *pCmdUI); afx_msg void OnUpdateOutputapiOpenal(CCmdUI *pCmdUI);
afx_msg void OnOutputapiOalconfiguration(); afx_msg void OnOutputapiOalconfiguration();
afx_msg void OnUpdateOutputapiOalconfiguration(CCmdUI *pCmdUI);
}; };
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@ -976,6 +976,7 @@ void MainWnd::OnOptionsSoundOff()
void MainWnd::OnUpdateOptionsSoundOff(CCmdUI* pCmdUI) void MainWnd::OnUpdateOptionsSoundOff(CCmdUI* pCmdUI)
{ {
pCmdUI->SetCheck(soundOffFlag); pCmdUI->SetCheck(soundOffFlag);
pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording);
} }
void MainWnd::OnOptionsSoundMute() void MainWnd::OnOptionsSoundMute()
@ -1002,6 +1003,7 @@ void MainWnd::OnUpdateOptionsSoundOn(CCmdUI* pCmdUI)
{ {
int active = soundGetEnable() & 0x30f; int active = soundGetEnable() & 0x30f;
pCmdUI->SetCheck(active != 0 && !soundOffFlag); pCmdUI->SetCheck(active != 0 && !soundOffFlag);
pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording);
} }
void MainWnd::OnOptionsSoundUseoldsynchronization() void MainWnd::OnOptionsSoundUseoldsynchronization()
@ -1057,6 +1059,7 @@ void MainWnd::OnOptionsSound11khz()
void MainWnd::OnUpdateOptionsSound11khz(CCmdUI* pCmdUI) void MainWnd::OnUpdateOptionsSound11khz(CCmdUI* pCmdUI)
{ {
pCmdUI->SetCheck(soundQuality == 4); pCmdUI->SetCheck(soundQuality == 4);
pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording);
} }
void MainWnd::OnOptionsSound22khz() void MainWnd::OnOptionsSound22khz()
@ -1070,6 +1073,7 @@ void MainWnd::OnOptionsSound22khz()
void MainWnd::OnUpdateOptionsSound22khz(CCmdUI* pCmdUI) void MainWnd::OnUpdateOptionsSound22khz(CCmdUI* pCmdUI)
{ {
pCmdUI->SetCheck(soundQuality == 2); pCmdUI->SetCheck(soundQuality == 2);
pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording);
} }
void MainWnd::OnOptionsSound44khz() void MainWnd::OnOptionsSound44khz()
@ -1083,6 +1087,7 @@ void MainWnd::OnOptionsSound44khz()
void MainWnd::OnUpdateOptionsSound44khz(CCmdUI* pCmdUI) void MainWnd::OnUpdateOptionsSound44khz(CCmdUI* pCmdUI)
{ {
pCmdUI->SetCheck(soundQuality == 1); pCmdUI->SetCheck(soundQuality == 1);
pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording);
} }
BOOL MainWnd::OnOptionsSoundVolume(UINT nID) BOOL MainWnd::OnOptionsSoundVolume(UINT nID)
@ -1988,6 +1993,7 @@ void MainWnd::OnOutputapiDirectsound()
void MainWnd::OnUpdateOutputapiDirectsound(CCmdUI *pCmdUI) void MainWnd::OnUpdateOutputapiDirectsound(CCmdUI *pCmdUI)
{ {
pCmdUI->SetCheck( ( theApp.audioAPI == DIRECTSOUND ) ? 1 : 0 ); pCmdUI->SetCheck( ( theApp.audioAPI == DIRECTSOUND ) ? 1 : 0 );
pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording);
} }
void MainWnd::OnOutputapiOpenal() void MainWnd::OnOutputapiOpenal()
@ -2005,6 +2011,7 @@ void MainWnd::OnUpdateOutputapiOpenal(CCmdUI *pCmdUI)
{ {
#ifndef NO_OAL #ifndef NO_OAL
pCmdUI->SetCheck( ( theApp.audioAPI == OPENAL_SOUND ) ? 1 : 0 ); pCmdUI->SetCheck( ( theApp.audioAPI == OPENAL_SOUND ) ? 1 : 0 );
pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording);
#endif #endif
} }
@ -2029,3 +2036,10 @@ void MainWnd::OnOutputapiOalconfiguration()
} }
#endif #endif
} }
void MainWnd::OnUpdateOutputapiOalconfiguration(CCmdUI *pCmdUI)
{
#ifndef NO_OAL
pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording);
#endif
}