mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +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:
@@ -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*/)
|
||||
|
Reference in New Issue
Block a user