Permalink
Browse files

[AE] settings: Add new settings for AE and reorganise code

  • Loading branch information...
1 parent f35d6d2 commit 5eda08f67eb70cd020744ed31d12dcb2b96add9e @gnif gnif committed with Jonathan Marshall Apr 25, 2012
Showing with 127 additions and 141 deletions.
  1. +33 −4 language/English/strings.po
  2. +4 −0 language/English/strings.xml
  3. +42 −18 xbmc/settings/GUISettings.cpp
  4. +48 −119 xbmc/settings/GUIWindowSettingsCategory.cpp
@@ -1278,7 +1278,17 @@ msgstr ""
msgid "Boost volume level on downmix"
msgstr ""
-#empty strings from id 347 to 349
+#: id:347
+msgid "- DTS-HD capable receiver"
+msgstr ""
+
+#: id:348
+msgid "- Multichannel LPCM capable receiver"
+msgstr ""
+
+#: id:349
+msgid "- TrueHD capable receiver"
+msgstr ""
#: id:350
msgctxt "Auto context with id 350"
@@ -1520,7 +1530,7 @@ msgstr ""
msgid "Humidity"
msgstr ""
-#empty strings from id 407 to 408
+#empty strings from 407 to 408
#: id:409
msgid "Defaults"
@@ -9343,8 +9353,27 @@ msgstr ""
msgid "7.1"
msgstr ""
-#34112-34200 reserved for future use
-#empty strings from id 34111 to 34200
+#34111-34119 reserved for future use
+#empty strings from id 34111 to 34119
+
+#: id:34120
+msgid "Play GUI sounds"
+msgstr ""
+
+#: id:34121
+msgid "Only when playback stopped"
+msgstr ""
+
+#: id:34122
+msgid "Always"
+msgstr ""
+
+#: id:34123
+msgid "Never"
+msgstr ""
+
+#34124-34200 reserved for future use
+#empty strings from id 34124 to 34200
#: id:34201
msgid "Can't find a next item to play"
@@ -309,6 +309,9 @@
<string id="344">Actors</string>
<string id="345">Year</string>
<string id="346">Boost volume level on downmix</string>
+ <string id="347">Use exclusive mode</string>
+ <string id="348">- Multichannel LPCM capable receiver</string>
+ <string id="349">- TrueHD capable receiver</string>
<string id="350">Programs</string>
<string id="351">Off</string>
<string id="352">Dim</string>
@@ -366,6 +369,7 @@
<string id="404">Wind</string>
<string id="405">Dew point</string>
<string id="406">Humidity</string>
+ <string id="407">- DTS-HD capable receiver</string>
<string id="409">Defaults</string>
<string id="410">Accessing weather service</string>
@@ -38,13 +38,17 @@
#include "windowing/WindowingFactory.h"
#include "powermanagement/PowerManager.h"
#include "cores/dvdplayer/DVDCodecs/Video/CrystalHD.h"
-#include "utils/PCMRemap.h"
+#include "cores/AudioEngine/AEFactory.h"
+#include "cores/AudioEngine/AEAudioFormat.h"
#include "guilib/GUIFont.h" // for FONT_STYLE_* definitions
+#if defined(TARGET_DARWIN_OSX)
+ #include "CoreAudioAEHALOSX.h"
+#endif
#include "guilib/GUIFontManager.h"
#include "utils/Weather.h"
#include "LangInfo.h"
#include "utils/XMLUtils.h"
-#if defined(__APPLE__)
+#if defined(TARGET_DARWIN)
#include "osx/DarwinUtils.h"
#endif
@@ -446,27 +450,47 @@ void CGUISettings::Initialize()
AddInt(ao, "audiooutput.mode", 337, AUDIO_ANALOG, audiomode, SPIN_CONTROL_TEXT);
map<int,int> channelLayout;
- for(int layout = 0; layout < PCM_MAX_LAYOUT; ++layout)
- channelLayout.insert(make_pair(34101+layout, layout));
- AddInt(ao, "audiooutput.channellayout", 34100, PCM_LAYOUT_2_0, channelLayout, SPIN_CONTROL_TEXT);
+ for(int layout = AE_CH_LAYOUT_2_0; layout < AE_CH_LAYOUT_MAX; ++layout)
+ channelLayout.insert(make_pair(34100+layout, layout));
+ AddInt(ao, "audiooutput.channellayout", 34100, AE_CH_LAYOUT_2_0, channelLayout, SPIN_CONTROL_TEXT);
AddBool(ao, "audiooutput.dontnormalizelevels", 346, true);
+ AddBool(ao, "audiooutput.stereoupmix", 252, false);
+
+#if defined(TARGET_DARWIN_IOS)
+ CSettingsCategory* aocat = g_sysinfo.IsAppleTV2() ? ao : NULL;
+#else
+ CSettingsCategory* aocat = ao;
+#endif
- AddBool(ao, "audiooutput.ac3passthrough", 364, true);
- AddBool(ao, "audiooutput.dtspassthrough", 254, true);
- AddBool(NULL, "audiooutput.passthroughaac", 299, false);
+ AddBool(aocat, "audiooutput.ac3passthrough" , 364, true);
+ AddBool(aocat, "audiooutput.dtspassthrough" , 254, true);
-#ifdef __APPLE__
- AddString(ao, "audiooutput.audiodevice", 545, "Default", SPIN_CONTROL_TEXT);
-#elif defined(_LINUX)
+
+#if !defined(TARGET_DARWIN)
+ AddBool(aocat, "audiooutput.passthroughaac" , 299, false);
+#endif
+#if !defined(TARGET_DARWIN_IOS)
+ AddBool(aocat, "audiooutput.multichannellpcm" , 348, true );
+#endif
+#if !defined(TARGET_DARWIN)
+ AddBool(aocat, "audiooutput.truehdpassthrough", 349, true );
+ AddBool(aocat, "audiooutput.dtshdpassthrough" , 407, true );
+#endif
+
+#if defined(TARGET_DARWIN)
+ #if defined(TARGET_DARWIN_IOS)
+ CStdString defaultDeviceName = "Default";
+ #else
+ CStdString defaultDeviceName;
+ CCoreAudioHardware::GetOutputDeviceName(defaultDeviceName);
+ #endif
+ AddString(ao, "audiooutput.audiodevice", 545, defaultDeviceName.c_str(), SPIN_CONTROL_TEXT);
+ AddString(NULL, "audiooutput.passthroughdevice", 546, defaultDeviceName.c_str(), SPIN_CONTROL_TEXT);
+#else
AddSeparator(ao, "audiooutput.sep1");
- AddString(ao, "audiooutput.audiodevice", 545, "default", SPIN_CONTROL_TEXT);
- AddString(ao, "audiooutput.customdevice", 1300, "", EDIT_CONTROL_INPUT);
+ AddString (ao, "audiooutput.audiodevice" , 545, CStdString(CAEFactory::AE->GetDefaultDevice(false)), SPIN_CONTROL_TEXT);
+ AddString (ao, "audiooutput.passthroughdevice", 546, CStdString(CAEFactory::AE->GetDefaultDevice(true )), SPIN_CONTROL_TEXT);
AddSeparator(ao, "audiooutput.sep2");
- AddString(ao, "audiooutput.passthroughdevice", 546, "iec958", SPIN_CONTROL_TEXT);
- AddString(ao, "audiooutput.custompassthrough", 1301, "", EDIT_CONTROL_INPUT);
- AddSeparator(ao, "audiooutput.sep3");
-#elif defined(_WIN32)
- AddString(ao, "audiooutput.audiodevice", 545, "Default", SPIN_CONTROL_TEXT);
#endif
map<int,int> guimode;
Oops, something went wrong.

0 comments on commit 5eda08f

Please sign in to comment.