Removed the DTK Music option. It is now always enabled.

This commit is contained in:
skidau 2012-04-23 05:02:43 +10:00
parent f0a5214a3f
commit 5ceef0c513
6 changed files with 3 additions and 22 deletions

View File

@ -31,7 +31,6 @@ void AudioCommonConfig::Load()
IniFile file; IniFile file;
file.Load(File::GetUserPath(F_DSPCONFIG_IDX)); file.Load(File::GetUserPath(F_DSPCONFIG_IDX));
file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true);
file.Get("Config", "EnableJIT", &m_EnableJIT, true); file.Get("Config", "EnableJIT", &m_EnableJIT, true);
file.Get("Config", "DumpAudio", &m_DumpAudio, false); file.Get("Config", "DumpAudio", &m_DumpAudio, false);
#if defined __linux__ && HAVE_ALSA #if defined __linux__ && HAVE_ALSA
@ -53,7 +52,6 @@ void AudioCommonConfig::SaveSettings()
IniFile file; IniFile file;
file.Load(File::GetUserPath(F_DSPCONFIG_IDX)); file.Load(File::GetUserPath(F_DSPCONFIG_IDX));
file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic);
file.Set("Config", "EnableJIT", m_EnableJIT); file.Set("Config", "EnableJIT", m_EnableJIT);
file.Set("Config", "DumpAudio", m_DumpAudio); file.Set("Config", "DumpAudio", m_DumpAudio);
file.Set("Config", "Backend", sBackend); file.Set("Config", "Backend", sBackend);
@ -67,7 +65,6 @@ void AudioCommonConfig::SaveSettings()
void AudioCommonConfig::Update() { void AudioCommonConfig::Update() {
if (soundStream) { if (soundStream) {
soundStream->GetMixer()->SetThrottle(SConfig::GetInstance().m_Framelimit == 2); soundStream->GetMixer()->SetThrottle(SConfig::GetInstance().m_Framelimit == 2);
soundStream->GetMixer()->SetDTKMusic(m_EnableDTKMusic);
soundStream->SetVolume(m_Volume); soundStream->SetVolume(m_Volume);
} }
} }

View File

@ -33,7 +33,6 @@
struct AudioCommonConfig struct AudioCommonConfig
{ {
bool m_EnableDTKMusic;
bool m_EnableJIT; bool m_EnableJIT;
bool m_DumpAudio; bool m_DumpAudio;
int m_Volume; int m_Volume;

View File

@ -136,8 +136,7 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
if (m_AIplaying) { if (m_AIplaying) {
Premix(samples, numLeft); Premix(samples, numLeft);
if (m_EnableDTKMusic) AudioInterface::Callback_GetStreaming(samples, numLeft, m_sampleRate);
AudioInterface::Callback_GetStreaming(samples, numLeft, m_sampleRate);
g_wave_writer.AddStereoSamples(samples, numLeft); g_wave_writer.AddStereoSamples(samples, numLeft);
} }
@ -147,11 +146,8 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
Premix(samples, numSamples); Premix(samples, numSamples);
// Add the DTK Music // Add the DTK Music
if (m_EnableDTKMusic) // Re-sampling is done inside
{ AudioInterface::Callback_GetStreaming(samples, numSamples, m_sampleRate);
// Re-sampling is done inside
AudioInterface::Callback_GetStreaming(samples, numSamples, m_sampleRate);
}
} }

View File

@ -61,7 +61,6 @@ public:
unsigned int GetSampleRate() {return m_sampleRate;} unsigned int GetSampleRate() {return m_sampleRate;}
void SetThrottle(bool use) { m_throttle = use;} void SetThrottle(bool use) { m_throttle = use;}
void SetDTKMusic(bool use) { m_EnableDTKMusic = use;}
// TODO: do we need this // TODO: do we need this
bool IsHLEReady() { return m_HLEready;} bool IsHLEReady() { return m_HLEready;}
@ -103,7 +102,6 @@ protected:
bool m_HLEready; bool m_HLEready;
bool m_logAudio; bool m_logAudio;
bool m_EnableDTKMusic;
bool m_throttle; bool m_throttle;
short m_buffer[MAX_SAMPLES * 2]; short m_buffer[MAX_SAMPLES * 2];

View File

@ -116,7 +116,6 @@ EVT_CHECKBOX(ID_NTSCJ, CConfigMain::CoreSettingsChanged)
EVT_RADIOBOX(ID_DSPENGINE, CConfigMain::AudioSettingsChanged) EVT_RADIOBOX(ID_DSPENGINE, CConfigMain::AudioSettingsChanged)
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, CConfigMain::AudioSettingsChanged)
EVT_CHECKBOX(ID_DSPTHREAD, CConfigMain::AudioSettingsChanged) EVT_CHECKBOX(ID_DSPTHREAD, CConfigMain::AudioSettingsChanged)
EVT_CHECKBOX(ID_ENABLE_THROTTLE, CConfigMain::AudioSettingsChanged) EVT_CHECKBOX(ID_ENABLE_THROTTLE, CConfigMain::AudioSettingsChanged)
EVT_CHECKBOX(ID_DUMP_AUDIO, CConfigMain::AudioSettingsChanged) EVT_CHECKBOX(ID_DUMP_AUDIO, CConfigMain::AudioSettingsChanged)
@ -359,7 +358,6 @@ void CConfigMain::InitializeGUIValues()
VolumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend)); VolumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend));
VolumeSlider->SetValue(ac_Config.m_Volume); VolumeSlider->SetValue(ac_Config.m_Volume);
VolumeText->SetLabel(wxString::Format(wxT("%d %%"), ac_Config.m_Volume)); VolumeText->SetLabel(wxString::Format(wxT("%d %%"), ac_Config.m_Volume));
EnableDTKMusic->SetValue(ac_Config.m_EnableDTKMusic ? true : false);
DSPThread->SetValue(startup_params.bDSPThread); DSPThread->SetValue(startup_params.bDSPThread);
DumpAudio->SetValue(ac_Config.m_DumpAudio ? true : false); DumpAudio->SetValue(ac_Config.m_DumpAudio ? true : false);
FrequencySelection->SetSelection( FrequencySelection->SetSelection(
@ -502,7 +500,6 @@ void CConfigMain::InitializeGUITooltips()
InterfaceLang->SetToolTip(_("Change the language of the user interface.\nRequires restart.")); InterfaceLang->SetToolTip(_("Change the language of the user interface.\nRequires restart."));
// Audio tooltips // Audio tooltips
EnableDTKMusic->SetToolTip(_("This is used to play music tracks, like BGM."));
DSPThread->SetToolTip(_("Run DSP LLE on a dedicated thread (not recommended).")); DSPThread->SetToolTip(_("Run DSP LLE on a dedicated thread (not recommended)."));
FrequencySelection->SetToolTip(_("Changing this will have no effect while the emulator is running!")); FrequencySelection->SetToolTip(_("Changing this will have no effect while the emulator is running!"));
BackendSelection->SetToolTip(_("Changing this will have no effect while the emulator is running!")); BackendSelection->SetToolTip(_("Changing this will have no effect while the emulator is running!"));
@ -602,8 +599,6 @@ void CConfigMain::CreateGUIControls()
// Audio page // Audio page
DSPEngine = new wxRadioBox(AudioPage, ID_DSPENGINE, _("DSP Emulator Engine"), DSPEngine = new wxRadioBox(AudioPage, ID_DSPENGINE, _("DSP Emulator Engine"),
wxDefaultPosition, wxDefaultSize, arrayStringFor_DSPEngine, 0, wxRA_SPECIFY_ROWS); wxDefaultPosition, wxDefaultSize, arrayStringFor_DSPEngine, 0, wxRA_SPECIFY_ROWS);
EnableDTKMusic = new wxCheckBox(AudioPage, ID_ENABLE_DTK_MUSIC, _("Enable DTK Music"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
DSPThread = new wxCheckBox(AudioPage, ID_DSPTHREAD, _("DSP LLE on Thread")); DSPThread = new wxCheckBox(AudioPage, ID_DSPTHREAD, _("DSP LLE on Thread"));
DumpAudio = new wxCheckBox(AudioPage, ID_DUMP_AUDIO, _("Dump Audio"), DumpAudio = new wxCheckBox(AudioPage, ID_DUMP_AUDIO, _("Dump Audio"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
@ -620,7 +615,6 @@ void CConfigMain::CreateGUIControls()
// Create sizer and add items to dialog // Create sizer and add items to dialog
wxStaticBoxSizer *sbAudioSettings = new wxStaticBoxSizer(wxVERTICAL, AudioPage, _("Sound Settings")); wxStaticBoxSizer *sbAudioSettings = new wxStaticBoxSizer(wxVERTICAL, AudioPage, _("Sound Settings"));
sbAudioSettings->Add(DSPEngine, 0, wxALL | wxEXPAND, 5); sbAudioSettings->Add(DSPEngine, 0, wxALL | wxEXPAND, 5);
sbAudioSettings->Add(EnableDTKMusic, 0, wxALL, 5);
sbAudioSettings->Add(DSPThread, 0, wxALL, 5); sbAudioSettings->Add(DSPThread, 0, wxALL, 5);
sbAudioSettings->Add(DumpAudio, 0, wxALL, 5); sbAudioSettings->Add(DumpAudio, 0, wxALL, 5);
@ -918,7 +912,6 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
break; break;
default: default:
ac_Config.m_EnableDTKMusic = EnableDTKMusic->GetValue();
ac_Config.m_DumpAudio = DumpAudio->GetValue(); ac_Config.m_DumpAudio = DumpAudio->GetValue();
long int frequency; long int frequency;

View File

@ -77,7 +77,6 @@ private:
// Audio Settings // Audio Settings
ID_DSPENGINE, ID_DSPENGINE,
ID_ENABLE_HLE_AUDIO, ID_ENABLE_HLE_AUDIO,
ID_ENABLE_DTK_MUSIC,
ID_ENABLE_THROTTLE, ID_ENABLE_THROTTLE,
ID_DUMP_AUDIO, ID_DUMP_AUDIO,
ID_FREQUENCY, ID_FREQUENCY,
@ -156,7 +155,6 @@ private:
wxRadioBox* DSPEngine; wxRadioBox* DSPEngine;
wxSlider* VolumeSlider; wxSlider* VolumeSlider;
wxStaticText* VolumeText; wxStaticText* VolumeText;
wxCheckBox* EnableDTKMusic;
wxCheckBox* DumpAudio; wxCheckBox* DumpAudio;
wxArrayString wxArrayBackends; wxArrayString wxArrayBackends;
wxChoice* BackendSelection; wxChoice* BackendSelection;