mirror of https://github.com/snes9xgit/snes9x.git
win32: remove nonexistent options
This commit is contained in:
parent
5fdfef70d9
commit
3c928d0824
|
@ -129,15 +129,15 @@ bool CDirectSound::InitSoundBuffer()
|
|||
blockTime = GUI.SoundBufferSize / blockCount;
|
||||
|
||||
blockSamples = (Settings.SoundPlaybackRate * blockTime) / 1000;
|
||||
blockSamples *= (Settings.Stereo ? 2 : 1);
|
||||
blockSize = blockSamples * (Settings.SixteenBitSound ? 2 : 1);
|
||||
blockSamples *= 2;
|
||||
blockSize = blockSamples * 2;
|
||||
bufferSize = blockSize * blockCount;
|
||||
|
||||
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wfx.nChannels = Settings.Stereo ? 2 : 1;
|
||||
wfx.nChannels = 2;
|
||||
wfx.nSamplesPerSec = Settings.SoundPlaybackRate;
|
||||
wfx.nBlockAlign = (Settings.SixteenBitSound ? 2 : 1) * (Settings.Stereo ? 2 : 1);
|
||||
wfx.wBitsPerSample = Settings.SixteenBitSound ? 16 : 8;
|
||||
wfx.nBlockAlign = 2 * 2;
|
||||
wfx.wBitsPerSample = 16;
|
||||
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
|
||||
wfx.cbSize = 0;
|
||||
|
||||
|
@ -320,11 +320,11 @@ void CDirectSound::MixSound()
|
|||
EnterCriticalSection(&GUI.SoundCritSect);
|
||||
if (B1)
|
||||
{
|
||||
S9xMixSamples(B1,(Settings.SixteenBitSound?S1>>1:S1));
|
||||
S9xMixSamples(B1, S1>>1);
|
||||
}
|
||||
if (B2)
|
||||
{
|
||||
S9xMixSamples(B2,(Settings.SixteenBitSound?S2>>1:S2));
|
||||
S9xMixSamples(B2, S2>>1);
|
||||
}
|
||||
LeaveCriticalSection(&GUI.SoundCritSect);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ bool CXAudio2::InitVoices(void)
|
|||
if (device_index < 0)
|
||||
device_index = 0;
|
||||
|
||||
if ( FAILED(hr = pXAudio2->CreateMasteringVoice( &pMasterVoice, (Settings.Stereo?2:1),
|
||||
if ( FAILED(hr = pXAudio2->CreateMasteringVoice( &pMasterVoice, 2,
|
||||
Settings.SoundPlaybackRate, 0, device_index, NULL ) ) ) {
|
||||
DXTRACE_ERR_MSGBOX(TEXT("Unable to create mastering voice."),hr);
|
||||
return false;
|
||||
|
@ -138,10 +138,10 @@ bool CXAudio2::InitVoices(void)
|
|||
|
||||
WAVEFORMATEX wfx;
|
||||
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wfx.nChannels = Settings.Stereo ? 2 : 1;
|
||||
wfx.nChannels = 2;
|
||||
wfx.nSamplesPerSec = Settings.SoundPlaybackRate;
|
||||
wfx.nBlockAlign = (Settings.SixteenBitSound ? 2 : 1) * (Settings.Stereo ? 2 : 1);
|
||||
wfx.wBitsPerSample = Settings.SixteenBitSound ? 16 : 8;
|
||||
wfx.nBlockAlign = 2 * 2;
|
||||
wfx.wBitsPerSample = 16;
|
||||
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
|
||||
wfx.cbSize = 0;
|
||||
|
||||
|
@ -231,8 +231,8 @@ bool CXAudio2::SetupSound()
|
|||
UINT32 blockTime = GUI.SoundBufferSize / blockCount;
|
||||
|
||||
singleBufferSamples = (Settings.SoundPlaybackRate * blockTime) / 1000;
|
||||
singleBufferSamples *= (Settings.Stereo ? 2 : 1);
|
||||
singleBufferBytes = singleBufferSamples * (Settings.SixteenBitSound ? 2 : 1);
|
||||
singleBufferSamples *= 2;
|
||||
singleBufferBytes = singleBufferSamples * 2;
|
||||
sum_bufferSize = singleBufferBytes * blockCount;
|
||||
|
||||
if (InitVoices())
|
||||
|
@ -293,7 +293,7 @@ void CXAudio2::ProcessSound()
|
|||
{
|
||||
// Using rate control, we should always keep the emulator's sound buffers empty to
|
||||
// maintain an accurate measurement.
|
||||
if (availableSamples > (freeBytes >> (Settings.SixteenBitSound ? 1 : 0)))
|
||||
if (availableSamples > (freeBytes >> 1))
|
||||
{
|
||||
S9xClearSamples();
|
||||
return;
|
||||
|
@ -335,7 +335,7 @@ void CXAudio2::ProcessSound()
|
|||
|
||||
if (availableSamples > 0 && bufferCount < blockCount) {
|
||||
S9xMixSamples(soundBuffer + writeOffset, availableSamples);
|
||||
partialOffset = availableSamples << (Settings.SixteenBitSound ? 1 : 0);
|
||||
partialOffset = availableSamples << 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,6 @@
|
|||
#define IDC_MIX 1004
|
||||
#define IDC_OUTPUT_DEVICE 1004
|
||||
#define IDC_DYNRATECONTROL 1005
|
||||
#define IDC_STEREO 1006
|
||||
#define IDC_REV_STEREO 1007
|
||||
#define IDC_LINEAR_INTER 1008
|
||||
#define IDC_SYNC_TO_SOUND_CPU 1009
|
||||
#define IDC_ECHO 1011
|
||||
|
@ -405,8 +403,6 @@
|
|||
#define ID_SOUND_INTERPOLATED 40027
|
||||
#define ID_SOUND_SYNC 40028
|
||||
#define ID_WINDOW_FULLSCREEN 40029
|
||||
#define ID_SOUND_16BIT 40030
|
||||
#define ID_SOUND_STEREO 40031
|
||||
#define ID_WINDOW_STRETCH 40032
|
||||
#define ID_SOUND_8000HZ 40033
|
||||
#define ID_SOUND_11025HZ 40034
|
||||
|
@ -436,7 +432,6 @@
|
|||
#define ID_SOUND_48000HZ 40085
|
||||
#define ID_SOUND_16000HZ 40086
|
||||
#define ID_SOUND_35000HZ 40087
|
||||
#define ID_SOUND_REVERSE_STEREO 40088
|
||||
#define ID_FILE_SAVE_SRAM_DATA 40089
|
||||
#define ID_RECENT_DUMMY 40090
|
||||
#define IDM_ROM_INFO 40094
|
||||
|
|
|
@ -41,8 +41,6 @@ BEGIN
|
|||
LTEXT "Playback Rate:",IDC_STATIC,125,53,49,11
|
||||
CONTROL "&Dynamic Rate Control",IDC_DYNRATECONTROL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,97,102,10
|
||||
CONTROL "&Automatic Input Rate",IDC_AUTOMATICINPUTRATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,109,102,10
|
||||
CONTROL "&Stereo",IDC_STEREO,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,295,37,102,10
|
||||
CONTROL "&Reverse Stereo",IDC_REV_STEREO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,49,102,10
|
||||
CONTROL "&Synchronize with sound core",IDC_SYNC_TO_SOUND_CPU,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,85,102,10
|
||||
PUSHBUTTON "&Cancel",IDCANCEL,350,134,56,16
|
||||
|
@ -786,7 +784,6 @@ BEGIN
|
|||
VK_F8, ID_OPTIONS_SETTINGS, VIRTKEY, ALT, NOINVERT
|
||||
"[", ID_SOUND_INTERPOLATED, ASCII, ALT, NOINVERT
|
||||
"T", ID_SOUND_OPTIONS, VIRTKEY, ALT, NOINVERT
|
||||
"R", ID_SOUND_REVERSE_STEREO, VIRTKEY, ALT, NOINVERT
|
||||
"]", ID_SOUND_SYNC, ASCII, ALT, NOINVERT
|
||||
VK_RETURN, ID_WINDOW_FULLSCREEN, VIRTKEY, ALT, NOINVERT
|
||||
VK_BACK, ID_WINDOW_STRETCH, VIRTKEY, ALT, NOINVERT
|
||||
|
@ -1034,9 +1031,6 @@ BEGIN
|
|||
MENUITEM SEPARATOR
|
||||
MENUITEM "Enable All", ID_CHANNELS_ENABLEALL
|
||||
END
|
||||
MENUITEM "&16-Bit Sound", ID_SOUND_16BIT
|
||||
MENUITEM "&Stereo", ID_SOUND_STEREO
|
||||
MENUITEM "&Reverse Stereo\tAlt+R", ID_SOUND_REVERSE_STEREO
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "S&ync Sound\tAlt+]", ID_SOUND_SYNC
|
||||
MENUITEM "&Settings...\tAlt+T", ID_SOUND_OPTIONS
|
||||
|
|
|
@ -669,7 +669,6 @@ void WinPostLoad(ConfigFile& conf)
|
|||
i = -1;
|
||||
}
|
||||
}
|
||||
if(conf.Exists("Sound::Mono")) Settings.Stereo = !conf.GetBool("Sound::Mono"); // special case
|
||||
|
||||
ConfigFile::SetNiceAlignment(niceAlignment);
|
||||
ConfigFile::SetShowComments(showComments);
|
||||
|
@ -812,11 +811,8 @@ void WinRegisterConfigItems()
|
|||
#undef CATEGORY
|
||||
#define CATEGORY "Sound"
|
||||
AddIntC("Sync", Settings.SoundSync, 1, "1 to sync emulation to sound output, 0 to disable.");
|
||||
AddBool2("Stereo", Settings.Stereo, true);
|
||||
AddBool("SixteenBitSound", Settings.SixteenBitSound, true);
|
||||
AddUIntC("Rate", Settings.SoundPlaybackRate, 44100, "sound playback quality, in Hz");
|
||||
AddUIntC("InputRate", Settings.SoundInputRate, 31950, "for each 'Input rate' samples generated by the SNES, 'Playback rate' samples will produced. If you experience crackling you can try to lower this setting.");
|
||||
AddBoolC("ReverseStereo", Settings.ReverseStereo, false, "true to swap speaker outputs");
|
||||
AddBoolC("Mute", GUI.Mute, false, "true to mute sound output (does not disable the sound CPU)");
|
||||
AddBool("DynamicRateControl", Settings.DynamicRateControl, false);
|
||||
AddBool("AutomaticInputRate", GUI.AutomaticInputRate, true);
|
||||
|
|
|
@ -1226,10 +1226,10 @@ void DoAVIOpen(const TCHAR* filename)
|
|||
WAVEFORMATEX wfx;
|
||||
|
||||
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wfx.nChannels = Settings.Stereo ? 2 : 1;
|
||||
wfx.nChannels = 2;
|
||||
wfx.nSamplesPerSec = Settings.SoundPlaybackRate;
|
||||
wfx.nBlockAlign = (Settings.SixteenBitSound ? 2 : 1) * (Settings.Stereo ? 2 : 1);
|
||||
wfx.wBitsPerSample = Settings.SixteenBitSound ? 16 : 8;
|
||||
wfx.nBlockAlign = 2 * 2;
|
||||
wfx.wBitsPerSample = 16;
|
||||
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
|
||||
wfx.cbSize = 0;
|
||||
|
||||
|
@ -1303,10 +1303,10 @@ void DoAVIVideoFrame()
|
|||
const WAVEFORMATEX* pwfex = NULL;
|
||||
WAVEFORMATEX wfx;
|
||||
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wfx.nChannels = Settings.Stereo ? 2 : 1;
|
||||
wfx.nChannels = 2;
|
||||
wfx.nSamplesPerSec = Settings.SoundPlaybackRate;
|
||||
wfx.nBlockAlign = (Settings.SixteenBitSound ? 2 : 1) * (Settings.Stereo ? 2 : 1);
|
||||
wfx.wBitsPerSample = Settings.SixteenBitSound ? 16 : 8;
|
||||
wfx.nBlockAlign = 2 * 2;
|
||||
wfx.wBitsPerSample = 16;
|
||||
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
|
||||
wfx.cbSize = 0;
|
||||
if(avi_skip_frames != Settings.SkipFrames ||
|
||||
|
@ -1327,7 +1327,7 @@ void DoAVIVideoFrame()
|
|||
// generate sound
|
||||
if(pwfex)
|
||||
{
|
||||
const int stereo_multiplier = (Settings.Stereo) ? 2 : 1;
|
||||
const int stereo_multiplier = 2;
|
||||
|
||||
avi_sound_samples_error += avi_sound_samples_per_update;
|
||||
int samples = (int) avi_sound_samples_error;
|
||||
|
|
|
@ -2005,17 +2005,6 @@ LRESULT CALLBACK WinProc(
|
|||
GUI.Mute = !GUI.Mute;
|
||||
break;
|
||||
|
||||
case ID_SOUND_STEREO:
|
||||
Settings.Stereo = !Settings.Stereo;
|
||||
ReInitSound();
|
||||
break;
|
||||
case ID_SOUND_REVERSE_STEREO:
|
||||
Settings.ReverseStereo = !Settings.ReverseStereo;
|
||||
break;
|
||||
case ID_SOUND_16BIT:
|
||||
Settings.SixteenBitSound = !Settings.SixteenBitSound;
|
||||
ReInitSound();
|
||||
break;
|
||||
case ID_SOUND_SYNC:
|
||||
Settings.SoundSync = !Settings.SoundSync;
|
||||
S9xDisplayStateChange (WINPROC_SYNC_SND, Settings.SoundSync);
|
||||
|
@ -3758,8 +3747,6 @@ static void CheckMenuStates ()
|
|||
if (Settings.SoundPlaybackRate == 0 || GUI.Mute)
|
||||
mii.fState |= MFS_DISABLED;
|
||||
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_16BIT, FALSE, &mii);
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_STEREO, FALSE, &mii);
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_SYNC, FALSE, &mii);
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_INTERPOLATED, FALSE, &mii);
|
||||
|
||||
|
@ -3777,11 +3764,6 @@ static void CheckMenuStates ()
|
|||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_194MS, FALSE, &mii);
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_210MS, FALSE, &mii);
|
||||
|
||||
if (!Settings.Stereo)
|
||||
mii.fState |= MFS_DISABLED;
|
||||
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_REVERSE_STEREO, FALSE, &mii);
|
||||
|
||||
mii.fState = MFS_CHECKED;
|
||||
if (GUI.AVIOut)
|
||||
mii.fState |= MFS_DISABLED;
|
||||
|
@ -3821,18 +3803,9 @@ static void CheckMenuStates ()
|
|||
}
|
||||
SetMenuItemInfo (GUI.hMenu, id, FALSE, &mii);
|
||||
|
||||
if (Settings.SixteenBitSound)
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_16BIT, FALSE, &mii);
|
||||
if (Settings.Stereo)
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_STEREO, FALSE, &mii);
|
||||
if (Settings.SoundSync)
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_SYNC, FALSE, &mii);
|
||||
|
||||
if (!Settings.Stereo)
|
||||
mii.fState |= MFS_DISABLED;
|
||||
if (Settings.ReverseStereo)
|
||||
SetMenuItemInfo (GUI.hMenu, ID_SOUND_REVERSE_STEREO, FALSE, &mii);
|
||||
|
||||
#ifdef DEBUGGER
|
||||
mii.fState = (CPU.Flags & TRACE_FLAG) ? MFS_CHECKED : MFS_UNCHECKED;
|
||||
SetMenuItemInfo (GUI.hMenu, ID_DEBUG_TRACE, FALSE, &mii);
|
||||
|
@ -4475,11 +4448,6 @@ INT_PTR CALLBACK DlgSoundConf(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
if (Settings.DynamicRateControl)
|
||||
SendDlgItemMessage(hDlg, IDC_DYNRATECONTROL, BM_SETCHECK, BST_CHECKED, 0);
|
||||
if (Settings.Stereo)
|
||||
SendDlgItemMessage(hDlg, IDC_STEREO, BM_SETCHECK, BST_CHECKED, 0);
|
||||
else EnableWindow(GetDlgItem(hDlg, IDC_REV_STEREO), FALSE);
|
||||
if (Settings.ReverseStereo)
|
||||
SendDlgItemMessage(hDlg, IDC_REV_STEREO, BM_SETCHECK, BST_CHECKED, 0);
|
||||
|
||||
if (GUI.Mute)
|
||||
SendDlgItemMessage(hDlg, IDC_MUTE, BM_SETCHECK, BST_CHECKED, 0);
|
||||
|
@ -4539,8 +4507,6 @@ INT_PTR CALLBACK DlgSoundConf(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
SendDlgItemMessage(hDlg, IDC_DRIVER, CB_GETCURSEL, 0,0),0);
|
||||
Settings.DynamicRateControl=IsDlgButtonChecked(hDlg, IDC_DYNRATECONTROL);
|
||||
Settings.SoundSync=IsDlgButtonChecked(hDlg, IDC_SYNC_TO_SOUND_CPU);
|
||||
Settings.Stereo=IsDlgButtonChecked(hDlg, IDC_STEREO);
|
||||
Settings.ReverseStereo=IsDlgButtonChecked(hDlg, IDC_REV_STEREO);
|
||||
GUI.Mute=IsDlgButtonChecked(hDlg, IDC_MUTE);
|
||||
GUI.FAMute=IsDlgButtonChecked(hDlg, IDC_FAMT)!=0;
|
||||
|
||||
|
@ -4646,20 +4612,6 @@ INT_PTR CALLBACK DlgSoundConf(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
return true;
|
||||
}
|
||||
else return false;
|
||||
case IDC_STEREO:
|
||||
{
|
||||
if(BN_CLICKED==HIWORD(wParam)||BN_DBLCLK==HIWORD(wParam))
|
||||
{
|
||||
if(IsDlgButtonChecked(hDlg,IDC_STEREO))
|
||||
{
|
||||
EnableWindow(GetDlgItem(hDlg, IDC_REV_STEREO), TRUE);
|
||||
}
|
||||
else EnableWindow(GetDlgItem(hDlg, IDC_REV_STEREO), FALSE);
|
||||
return true;
|
||||
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
case IDC_INRATEEDIT:
|
||||
if(HIWORD(wParam)==EN_UPDATE) {
|
||||
Edit_GetText(GetDlgItem(hDlg,IDC_INRATEEDIT),valTxt,10);
|
||||
|
|
Loading…
Reference in New Issue