skidau 0a4272c96b Merge branch 'OpenAL'
* OpenAL:
  Changed SoundTouch to use float samples, allowing SSE to be used. Made the DPL2 decoder disabled by default. Re-added the audio hack used by the Accurate VBeam emulation option.
  Added a latency setting to the audio settings. Removed the Sample Rate setting.  It is now hardcoded to 48000hz (accurate audio timing).
  Skipped timestretching if the emulator is running below 10% speed to prevent buffer overflows.
  Removed the synchronisation between the CPU thread and the audio thread. Added code to detect and resume from buffer underruns. Disabled the ability to change the DPL2 option after the game has started. Fixed a memory leak that occurred in the DPL2 decoder. Fixed the OSX build.
  Build fix
  Added a Dolby Pro Logic II (DPL2) decoder in the OpenAL backend.  DPL2 audio is decoded to 5.1.  Code adapted from ffdshow. Added an option in the DSP settings to disable the DPL2 decoder in case Dolphin incorrectly detects a 5.1 audio system. Updated the OpenAL files to OpenAL Soft 1.15.1 in the Windows build.
  Removed the system timing hack which was activated when the Accurate VBeam option was enabled.
  Fixed the include directories in Audio Common for the Windows 32bit build.
  Fixed the include directories in Audio Common for the Windows build.
  Messed up the static include line
  Fix include paths and compiling in Linux. Externals soundtouch is 1.7.1, while Ubuntu 12.10 is 1.6.x. Externals soundtouch is compiled with integer samples, while ubuntu is compiled with float samples. Float samples is probably the more common route. If you're going to use soundtouch, you should probably use SAMPLETYPE instead of explicitly choosing short. This probably breaks the windows build since its includes aren't setup.
  OSX: typedef signed char BOOL
  OSX build fix
  Build fix
  Added audio time stretching by using the SoundTouch library.
  Implemented correct audio timing.
  OpenAL for Windows initial commit
2013-01-15 22:40:12 +11:00

278 lines
6.3 KiB
C++

// Copyright (C) 2003 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef __CONFIG_MAIN_h__
#define __CONFIG_MAIN_h__
#include <wx/wx.h>
#include <wx/gbsizer.h>
#include <wx/spinbutt.h>
#include <wx/notebook.h>
#include <wx/filepicker.h>
#include "ConfigManager.h"
#if defined(HAVE_XRANDR) && HAVE_XRANDR
#include "X11Utils.h"
#endif
class CConfigMain : public wxDialog
{
public:
CConfigMain(wxWindow* parent,
wxWindowID id = 1,
const wxString& title = _("Dolphin Configuration"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
virtual ~CConfigMain();
void OnOk(wxCommandEvent& event);
void CloseClick(wxCommandEvent& event);
void OnSelectionChanged(wxCommandEvent& event);
void OnConfig(wxCommandEvent& event);
void SetSelectedTab(int tab);
bool bRefreshList;
enum
{
ID_NOTEBOOK = 1000,
ID_GENERALPAGE,
ID_DISPLAYPAGE,
ID_AUDIOPAGE,
ID_GAMECUBEPAGE,
ID_WIIPAGE,
ID_PATHSPAGE,
};
private:
enum
{
ID_CPUTHREAD = 1010,
ID_IDLESKIP,
ID_ENABLECHEATS,
ID_FRAMELIMIT,
ID_FRAMELIMIT_USEFPSFORLIMITING,
ID_CPUENGINE,
ID_DSPTHREAD,
ID_NTSCJ,
// Audio Settings
ID_DSPENGINE,
ID_ENABLE_HLE_AUDIO,
ID_ENABLE_THROTTLE,
ID_DUMP_AUDIO,
ID_DPL2DECODER,
ID_LATENCY,
ID_BACKEND,
ID_VOLUME,
// Interface settings
ID_INTERFACE_CONFIRMSTOP,
ID_INTERFACE_USEPANICHANDLERS,
ID_INTERFACE_ONSCREENDISPLAYMESSAGES,
ID_INTERFACE_THEME,
ID_INTERFACE_LANG,
ID_HOTKEY_CONFIG,
ID_GC_SRAM_LNG,
ID_GC_ALWAYS_HLE_BS2,
ID_GC_EXIDEVICE_SLOTA,
ID_GC_EXIDEVICE_SLOTA_PATH,
ID_GC_EXIDEVICE_SLOTB,
ID_GC_EXIDEVICE_SLOTB_PATH,
ID_GC_EXIDEVICE_SP1,
ID_GC_SIDEVICE0,
ID_GC_SIDEVICE1,
ID_GC_SIDEVICE2,
ID_GC_SIDEVICE3,
ID_WII_IPL_SSV,
ID_WII_IPL_E60,
ID_WII_IPL_AR,
ID_WII_IPL_LNG,
ID_WII_SD_CARD,
ID_WII_KEYBOARD,
ID_ISOPATHS,
ID_RECURSIVEISOPATH,
ID_ADDISOPATH,
ID_REMOVEISOPATH,
ID_DEFAULTISO,
ID_DVDROOT,
ID_APPLOADERPATH,
ID_NANDROOT,
ID_DSP_CB,
ID_DSP_CONFIG,
ID_DSP_ABOUT,
};
wxNotebook* Notebook;
wxPanel* PathsPage;
// Basic
wxCheckBox* CPUThread;
wxCheckBox* SkipIdle;
wxCheckBox* EnableCheats;
wxChoice* Framelimit;
wxCheckBox* UseFPSForLimiting;
// Advanced
wxCheckBox* EnableOpenCL;
wxRadioBox* CPUEngine;
wxCheckBox* DSPThread;
wxCheckBox* _NTSCJ;
wxBoxSizer* sDisplayPage; // Display settings
wxStaticBoxSizer* sbInterface; // Display and Interface sections
// Audio
wxBoxSizer* sAudioPage; // GC settings
wxRadioBox* DSPEngine;
wxSlider* VolumeSlider;
wxStaticText* VolumeText;
wxCheckBox* DumpAudio;
wxCheckBox* DPL2Decoder;
wxArrayString wxArrayBackends;
wxChoice* BackendSelection;
wxSlider* LatencySlider;
wxStaticText* LatencyText;
// Interface
wxCheckBox* ConfirmStop;
wxCheckBox* UsePanicHandlers;
wxCheckBox* OnScreenDisplayMessages;
wxChoice* Theme;
wxChoice* InterfaceLang;
wxButton* HotkeyConfig;
wxBoxSizer* sGamecubePage; // GC settings
wxStaticBoxSizer* sbGamecubeIPLSettings;
wxGridBagSizer* sGamecubeIPLSettings;
// IPL
wxChoice* GCSystemLang;
wxCheckBox* GCAlwaysHLE_BS2;
// Device
wxChoice* GCEXIDevice[3];
wxButton* GCMemcardPath[2];
wxChoice* GCSIDevice[4];
wxBoxSizer* sWiiPage; // Wii settings
wxStaticBoxSizer* /*sbWiimoteSettings, **/sbWiiIPLSettings, *sbWiiDeviceSettings; // Wiimote, Misc and Device sections
wxGridBagSizer* /*sWiimoteSettings, **/sWiiIPLSettings;
// Misc
wxCheckBox* WiiScreenSaver;
wxCheckBox* WiiEuRGB60;
wxChoice* WiiAspectRatio;
wxChoice* WiiSystemLang;
// Device
wxCheckBox* WiiSDCard;
wxCheckBox* WiiKeyboard;
wxBoxSizer* sPathsPage; // Paths settings
wxStaticBoxSizer* sbISOPaths;
wxGridBagSizer* sOtherPaths;
// ISO Directories
wxListBox* ISOPaths;
wxCheckBox* RecursiveISOPath;
wxButton* AddISOPath;
wxButton* RemoveISOPath;
// DefaultISO, DVD Root, Apploader, NANDPath
wxFilePickerCtrl* DefaultISO;
wxDirPickerCtrl* DVDRoot;
wxFilePickerCtrl* ApploaderPath;
wxDirPickerCtrl* NANDRoot;
// Graphics
wxChoice* GraphicSelection;
wxButton* GraphicConfig;
wxButton* m_Ok;
FILE* pStream;
wxArrayString arrayStringFor_Framelimit;
wxArrayString arrayStringFor_CPUEngine;
wxArrayString arrayStringFor_DSPEngine;
wxArrayString arrayStringFor_FullscreenResolution;
wxArrayString arrayStringFor_Themes;
wxArrayString arrayStringFor_InterfaceLang;
wxArrayString arrayStringFor_GCSystemLang;
wxArrayString arrayStringFor_WiiSensBarPos;
wxArrayString arrayStringFor_WiiAspectRatio;
wxArrayString arrayStringFor_WiiSystemLang;
wxArrayString arrayStringFor_ISOPaths;
void InitializeGUILists();
void InitializeGUIValues();
void InitializeGUITooltips();
void CreateGUIControls();
void UpdateGUI();
void OnClose(wxCloseEvent& event);
void CoreSettingsChanged(wxCommandEvent& event);
void DisplaySettingsChanged(wxCommandEvent& event);
void OnSpin(wxSpinEvent& event);
void AudioSettingsChanged(wxCommandEvent& event);
void AddAudioBackends();
void GCSettingsChanged(wxCommandEvent& event);
void ChooseMemcardPath(std::string& strMemcard, bool isSlotA);
void ChooseSIDevice(wxString deviceName, int deviceNum);
void ChooseEXIDevice(wxString deviceName, int deviceNum);
void WiiSettingsChanged(wxCommandEvent& event);
// Change from IPL.LNG value to country code
inline u8 GetSADRCountryCode(int language);
void ISOPathsSelectionChanged(wxCommandEvent& event);
void RecursiveDirectoryChanged(wxCommandEvent& event);
void AddRemoveISOPaths(wxCommandEvent& event);
void DefaultISOChanged(wxFileDirPickerEvent& event);
void DVDRootChanged(wxFileDirPickerEvent& event);
void ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED (event));
void NANDRootChanged(wxFileDirPickerEvent& event);
private:
DECLARE_EVENT_TABLE();
static bool SupportsVolumeChanges(std::string backend);
};
#endif