Skip to content
Permalink
Browse files

Merge pull request #4025 from FernetMenta/audiopage

AE: add settings for ac3 transcode and ac3 upmix
  • Loading branch information
FernetMenta committed Jan 20, 2014
2 parents 0af940a + e9a2fca commit 6c3af2a5cf0ad15041f920d99c584594f4a1bb82
@@ -1046,7 +1046,7 @@ msgstr ""

#: system/settings/settings.xml
msgctxt "#252"
msgid "Output stereo to all speakers"
msgid "Stereo upmix"
msgstr ""

msgctxt "#253"
@@ -2797,7 +2797,12 @@ msgctxt "#666"
msgid "Verbose logging..."
msgstr ""

#empty strings from id 667 to 699
#: system/settings/settings.xml
msgctxt "#667"
msgid "Enable Dolby Digital transcoding"
msgstr ""

#empty strings from id 668 to 699

msgctxt "#700"
msgid "Cleaning up library"
@@ -12587,7 +12592,7 @@ msgstr ""

#: system/settings/settings.xml
msgctxt "#34100"
msgid "Speaker Configuration"
msgid "Number of channels"
msgstr ""

#: system/settings/settings.xml
@@ -14410,7 +14415,7 @@ msgstr ""

#: system/settings/settings.xml
msgctxt "#36362"
msgid "Select the maximum number of audio channels/speakers available for audio decoded."
msgid "Select the number of channels supported by the audio connection, or the number of speakers if connected by analog connections. This setting does not apply to passthrough audio. Note - SPDIF supports 2.0 channels only but can still output multichannel audio using a format supported by passthrough."
msgstr ""

#: system/settings/settings.xml
@@ -14420,7 +14425,7 @@ msgstr ""

#: system/settings/settings.xml
msgctxt "#36364"
msgid "Select to enable upmixing of 2 channel stereo sources to the number of audio channels specified by the speaker configuration."
msgid "Select to enable upmixing of 2 channel audio to the number of audio channels specified by the speaker configuration."

This comment has been minimized.

Copy link
@un1versal

un1versal Jan 22, 2014

Contributor

Since Speaker configuration is now named - Number of channels the correct description would be

Select to enable upmixing of 2 channel audio specified by the number of channels configuration.

spoted that while doint the wiki docs ;)

This comment has been minimized.

Copy link
@FernetMenta

FernetMenta Jan 24, 2014

Author Member

speaker configuration is still the better term here because upmix is also used when transcoding to ac3.

msgstr ""

#: system/settings/settings.xml
@@ -14743,7 +14748,12 @@ msgctxt "#36428"
msgid "Record"
msgstr ""

#empty strings from id 36429 to 36499
#: system/settings/settings.xml
msgctxt "#36429"
msgid "Select this if the audio out connection only supports multichannel audio as Dolby Digital 5.1, this allows multichannel audio such as AAC5.1 or FLAC5.1 to be listened to in 5.1 surround sound. Note - transcoding can lead to a reduction in sound quality"
msgstr ""

#empty strings from id 36430 to 36499
#end reservation

#: system/settings/settings.xml
@@ -11,6 +11,9 @@
<setting id="audiooutput.channels" help="36367" />
</group>
<group id="3">
<setting id="audiooutput.ac3transcode">
<visible>false</visible>
</setting>
<setting id="audiooutput.truehdpassthrough">
<visible>false</visible>
</setting>
@@ -2261,13 +2261,7 @@
<level>2</level>
<default>false</default>
<dependencies>
<dependency type="visible">
<or>
<condition on="property" name="aesettingvisible" setting="audiooutput.channels">audiooutput.stereoupmix</condition>
<condition on="property" name="aesettingvisible" setting="audiooutput.passthrough">audiooutput.stereoupmix</condition>
<condition on="property" name="aesettingvisible" setting="audiooutput.ac3passthrough">audiooutput.stereoupmix</condition>
</or>
</dependency>
<dependency type="visible" on="property" name="aesettingvisible" setting="audiooutput.channels">audiooutput.stereoupmix</dependency>
</dependencies>
<control type="toggle" />
</setting>
@@ -2352,6 +2346,20 @@
</dependencies>
<control type="toggle" />
</setting>
<setting id="audiooutput.ac3transcode" type="boolean" label="667" help="36429">
<level>2</level>
<default>true</default>
<dependencies>
<dependency type="visible">
<and>
<condition setting="audiooutput.passthrough" operator="is">true</condition>
<condition setting="audiooutput.ac3passthrough" operator="is">true</condition>
<condition on="property" name="aesettingvisible" setting="audiooutput.config">audiooutput.ac3transcode</condition>
</and>
</dependency>
</dependencies>
<control type="toggle" />
</setting>
<setting id="audiooutput.eac3passthrough" type="boolean" label="448" help="37016">
<level>2</level>
<default>false</default>
@@ -1339,6 +1339,7 @@ void CActiveAE::ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &sett
else if (settings.channels <= AE_CH_LAYOUT_2_0 && // no multichannel pcm
settings.passthrough &&
settings.ac3passthrough &&
settings.ac3transcode &&
!m_streams.empty() &&
(format.m_channelLayout.Count() > 2 || settings.stereoupmix))
{
@@ -2034,6 +2035,7 @@ void CActiveAE::LoadSettings()

m_settings.passthrough = m_settings.config == AE_CONFIG_FIXED ? false : CSettings::Get().GetBool("audiooutput.passthrough");
m_settings.ac3passthrough = CSettings::Get().GetBool("audiooutput.ac3passthrough");
m_settings.ac3transcode = CSettings::Get().GetBool("audiooutput.ac3transcode");
m_settings.eac3passthrough = CSettings::Get().GetBool("audiooutput.eac3passthrough");
m_settings.truehdpassthrough = CSettings::Get().GetBool("audiooutput.truehdpassthrough");
m_settings.dtspassthrough = CSettings::Get().GetBool("audiooutput.dtspassthrough");
@@ -2098,6 +2100,7 @@ void CActiveAE::OnSettingsChange(const std::string& setting)
setting == "audiooutput.audiodevice" ||
setting == "audiooutput.config" ||
setting == "audiooutput.ac3passthrough" ||
setting == "audiooutput.ac3transcode" ||
setting == "audiooutput.eac3passthrough" ||
setting == "audiooutput.dtspassthrough" ||
setting == "audiooutput.truehdpassthrough" ||
@@ -2179,18 +2182,17 @@ bool CActiveAE::IsSettingVisible(const std::string &settingId)
}
else if (settingId == "audiooutput.stereoupmix")
{
if (m_sink.GetDeviceType(CSettings::Get().GetString("audiooutput.audiodevice")) != AE_DEVTYPE_IEC958)
{
if (CSettings::Get().GetInt("audiooutput.channels") > AE_CH_LAYOUT_2_0)
return true;
}
else
{
if (m_sink.HasPassthroughDevice() &&
CSettings::Get().GetBool("audiooutput.passthrough") &&
CSettings::Get().GetBool("audiooutput.ac3passthrough"))
return true;
}
if (m_sink.HasPassthroughDevice() ||
CSettings::Get().GetInt("audiooutput.channels") > AE_CH_LAYOUT_2_0)
return true;
}
else if (settingId == "audiooutput.ac3transcode")
{
if (m_sink.HasPassthroughDevice() &&
CSettings::Get().GetBool("audiooutput.ac3passthrough") &&
CSettings::Get().GetInt("audiooutput.config") != AE_CONFIG_FIXED &&
(CSettings::Get().GetInt("audiooutput.channels") <= AE_CH_LAYOUT_2_0 || m_sink.GetDeviceType(CSettings::Get().GetString("audiooutput.audiodevice")) == AE_DEVTYPE_IEC958))
return true;
}
return false;
}
@@ -50,6 +50,7 @@ struct AudioSettings
std::string passthoughdevice;
int channels;
bool ac3passthrough;
bool ac3transcode;
bool eac3passthrough;
bool dtspassthrough;
bool truehdpassthrough;
@@ -1032,6 +1032,7 @@ void CSettings::InitializeISettingCallbacks()
settingSet.insert("audiooutput.guisoundmode");
settingSet.insert("audiooutput.stereoupmix");
settingSet.insert("audiooutput.ac3passthrough");
settingSet.insert("audiooutput.ac3transcode");
settingSet.insert("audiooutput.eac3passthrough");
settingSet.insert("audiooutput.dtspassthrough");
settingSet.insert("audiooutput.truehdpassthrough");

0 comments on commit 6c3af2a

Please sign in to comment.
You can’t perform that action at this time.