mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
FIX AC3 audio for CST. Including audio AC3 switching by audio language menu
Origin commit data
------------------
Branch: ni/coolstream
Commit: dd33384eb8
Author: FlatTV <FlatTV@gmx.de>
Date: 2021-04-22 (Thu, 22 Apr 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -131,6 +131,8 @@ audio.srs_nmgr Noise-Manager
|
||||
audio.srs_volume Referenzlautstärke
|
||||
audiomenu.PCMOffset Lautstärkeabsenkung PCM
|
||||
audiomenu.ac3 AC3 durchleiten
|
||||
audiomenu.ac3_atype0 AC3 Ton auf älteren Typ ändern
|
||||
audiomenu.ac3_atype1 AC3 Ton auf default Type ändern
|
||||
audiomenu.analog_mode Analog Modus
|
||||
audiomenu.analog_out Analog-Ausgang
|
||||
audiomenu.auto_lang Tonwahl automatisch
|
||||
|
@@ -131,6 +131,8 @@ audio.srs_nmgr Noise manager
|
||||
audio.srs_volume Reference volume
|
||||
audiomenu.PCMOffset Volume Decrease PCM
|
||||
audiomenu.ac3 AC3 passthrough
|
||||
audiomenu.ac3_atype0 switch AC3 Sound to older Audio Type
|
||||
audiomenu.ac3_atype1 switch AC3 Sound to default Audio Type
|
||||
audiomenu.analog_mode Analog mode
|
||||
audiomenu.analog_out Analog output
|
||||
audiomenu.auto_lang Auto select audio
|
||||
|
@@ -23,15 +23,15 @@ typedef enum {
|
||||
} AUDIO_SYNC_MODE;
|
||||
|
||||
typedef enum {
|
||||
AUDIO_FMT_AUTO = 0,
|
||||
AUDIO_FMT_MPEG,
|
||||
AUDIO_FMT_MP3,
|
||||
AUDIO_FMT_DOLBY_DIGITAL,
|
||||
AUDIO_FMT_DOLBY_DIGITAL = 0,
|
||||
AUDIO_FMT_BASIC = AUDIO_FMT_DOLBY_DIGITAL,
|
||||
AUDIO_FMT_AAC,
|
||||
AUDIO_FMT_AAC_PLUS,
|
||||
AUDIO_FMT_DD_PLUS,
|
||||
AUDIO_FMT_DTS,
|
||||
AUDIO_FMT_MPEG = 1,
|
||||
AUDIO_FMT_DTS = 2,
|
||||
AUDIO_FMT_AAC = 8,
|
||||
AUDIO_FMT_AAC_PLUS = 9,
|
||||
AUDIO_FMT_DD_PLUS = 0x22, //EAC3
|
||||
AUDIO_FMT_AUTO,
|
||||
AUDIO_FMT_MP3,
|
||||
AUDIO_FMT_AVS,
|
||||
AUDIO_FMT_MLP,
|
||||
AUDIO_FMT_WMA,
|
||||
|
@@ -23,15 +23,15 @@ typedef enum {
|
||||
} AUDIO_SYNC_MODE;
|
||||
|
||||
typedef enum {
|
||||
AUDIO_FMT_AUTO = 0,
|
||||
AUDIO_FMT_MPEG,
|
||||
AUDIO_FMT_MP3,
|
||||
AUDIO_FMT_DOLBY_DIGITAL,
|
||||
AUDIO_FMT_DOLBY_DIGITAL = 0,
|
||||
AUDIO_FMT_BASIC = AUDIO_FMT_DOLBY_DIGITAL,
|
||||
AUDIO_FMT_AAC,
|
||||
AUDIO_FMT_AAC_PLUS,
|
||||
AUDIO_FMT_DD_PLUS,
|
||||
AUDIO_FMT_DTS,
|
||||
AUDIO_FMT_MPEG = 1,
|
||||
AUDIO_FMT_DTS = 2,
|
||||
AUDIO_FMT_AAC = 8,
|
||||
AUDIO_FMT_AAC_PLUS = 9,
|
||||
AUDIO_FMT_DD_PLUS = 0x22, //EAC3
|
||||
AUDIO_FMT_AUTO,
|
||||
AUDIO_FMT_MP3,
|
||||
AUDIO_FMT_AVS,
|
||||
AUDIO_FMT_MLP,
|
||||
AUDIO_FMT_WMA,
|
||||
|
@@ -1473,7 +1473,7 @@ bool CMoviePlayerGui::PlayFileStart(void)
|
||||
}
|
||||
|
||||
duration = p_movie_info->length * 60 * 1000;
|
||||
int percent = CZapit::getInstance()->GetPidVolume(p_movie_info->channelId, currentapid, currentac3 == 1);
|
||||
int percent = CZapit::getInstance()->GetPidVolume(p_movie_info->channelId, currentapid, currentac3 == CZapitAudioChannel::AC3);
|
||||
CZapit::getInstance()->SetVolumePercent(percent);
|
||||
}
|
||||
|
||||
@@ -2516,7 +2516,9 @@ void CMoviePlayerGui::selectAudioPid()
|
||||
if (numpida)
|
||||
currentapid = apids[0];
|
||||
}
|
||||
for (unsigned int count = 0; count < numpida; count++) {
|
||||
|
||||
unsigned int count = 0;
|
||||
for (count = 0; count < numpida; count++) {
|
||||
bool name_ok = false;
|
||||
bool enabled = true;
|
||||
bool defpid = currentapid ? (currentapid == apids[count]) : (count == 0);
|
||||
@@ -2545,7 +2547,13 @@ void CMoviePlayerGui::selectAudioPid()
|
||||
CMenuForwarder * item = new CMenuForwarder(apidtitle.c_str(), enabled, NULL, selector, cnt, CRCInput::convertDigitToKey(count + 1));
|
||||
APIDSelector.addItem(item, defpid);
|
||||
}
|
||||
|
||||
#if HAVE_CST_HARDWARE
|
||||
char cnt[5];
|
||||
sprintf(cnt, "%d", count);
|
||||
std::string apidtitle = (currentac3 == 0) ? g_Locale->getText(LOCALE_AUDIOMENU_AC3_atype1) : g_Locale->getText(LOCALE_AUDIOMENU_AC3_atype0);
|
||||
CMenuForwarder * item = new CMenuForwarder(apidtitle.c_str(), true, NULL, selector, cnt, CRCInput::convertDigitToKey(count + 1));
|
||||
APIDSelector.addItem(item, false);
|
||||
#endif
|
||||
int percent[numpida+1];
|
||||
if (p_movie_info && numpida <= p_movie_info->audioPids.size()) {
|
||||
APIDSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUST));
|
||||
@@ -2569,6 +2577,20 @@ void CMoviePlayerGui::selectAudioPid()
|
||||
APIDSelector.exec(NULL, "");
|
||||
delete selector;
|
||||
printf("CMoviePlayerGui::selectAudioPid: selected %d (%x) current %x\n", select, (select >= 0) ? apids[select] : -1, currentapid);
|
||||
#if HAVE_CST_HARDWARE
|
||||
if (select == numpida) {
|
||||
currentac3 == 1 ? currentac3 = 0 : currentac3 = 1;
|
||||
playback->SetAPid(currentapid, currentac3);
|
||||
printf("[movieplayer] currentac3 changed to %d\n", currentac3);
|
||||
}
|
||||
else if ((select >= 0) && (currentapid != apids[select])) {
|
||||
currentapid = apids[select];
|
||||
currentac3 = ac3flags[select];
|
||||
playback->SetAPid(currentapid, currentac3);
|
||||
getCurrentAudioName(is_file_player, currentaudioname);
|
||||
printf("[movieplayer] apid changed to %d type %d\n", currentapid, currentac3);
|
||||
}
|
||||
#else
|
||||
if ((select >= 0) && (currentapid != apids[select])) {
|
||||
currentapid = apids[select];
|
||||
currentac3 = ac3flags[select];
|
||||
@@ -2576,6 +2598,7 @@ void CMoviePlayerGui::selectAudioPid()
|
||||
getCurrentAudioName(is_file_player, currentaudioname);
|
||||
printf("[movieplayer] apid changed to %d type %d\n", currentapid, currentac3);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
|
||||
|
@@ -158,6 +158,8 @@ typedef enum
|
||||
LOCALE_AUDIO_SRS_VOLUME,
|
||||
LOCALE_AUDIOMENU_PCMOFFSET,
|
||||
LOCALE_AUDIOMENU_AC3,
|
||||
LOCALE_AUDIOMENU_AC3_atype0,
|
||||
LOCALE_AUDIOMENU_AC3_atype1,
|
||||
LOCALE_AUDIOMENU_ANALOG_MODE,
|
||||
LOCALE_AUDIOMENU_ANALOG_OUT,
|
||||
LOCALE_AUDIOMENU_AUTO_LANG,
|
||||
|
@@ -158,6 +158,8 @@ const char * locale_real_names[] =
|
||||
"audio.srs_volume",
|
||||
"audiomenu.PCMOffset",
|
||||
"audiomenu.ac3",
|
||||
"audiomenu.ac3_atype0",
|
||||
"audiomenu.ac3_atype1",
|
||||
"audiomenu.analog_mode",
|
||||
"audiomenu.analog_out",
|
||||
"audiomenu.auto_lang",
|
||||
|
@@ -99,19 +99,6 @@ class CZapitAudioChannel
|
||||
std::string description;
|
||||
unsigned char componentTag;
|
||||
|
||||
#if HAVE_CST_HARDWARE
|
||||
enum ZapitAudioChannelType {
|
||||
MPEG = 0,
|
||||
AC3 = 1,
|
||||
AAC = 2,
|
||||
AACPLUS = 3,
|
||||
DTS = 4,
|
||||
LPCM = 6,
|
||||
DTSHD = 0x10,
|
||||
EAC3 = 0x22,
|
||||
UNKNOWN
|
||||
};
|
||||
#else
|
||||
enum ZapitAudioChannelType {
|
||||
MPEG = 1,
|
||||
AC3 = 0,
|
||||
@@ -123,7 +110,6 @@ class CZapitAudioChannel
|
||||
EAC3 = 0x22,
|
||||
UNKNOWN
|
||||
};
|
||||
#endif
|
||||
ZapitAudioChannelType audioChannelType;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user