51 LOG(VB_GENERAL, LOG_ERR,
"Theme is missing critical theme elements.");
71 if (truehdSetting == 1)
75 if (dtshdSetting == 1)
82 "audio devices detected on your system. When "
83 "satisfied, you can test audio before moving "
84 "on. If you fail to configure audio, video "
85 "playback may fail as well.") );
91 "is capable of playing DTS.") );
93 "is capable of playing AC-3 (Dolby Digital).") );
95 "is capable of playing E-AC-3 (Dolby Digital Plus).") );
97 "is capable of playing TrueHD.") );
99 "is capable of playing DTS-HD.") );
103 "noise through each speaker.") );
105 "configuration step.") );
115 QString message = tr(
"Discovering audio devices...");
146 auto samename = [
current](
const auto & ao){
return ao.m_name ==
current; };
147 found = std::ranges::any_of(std::as_const(*
m_outputlist), samename);
154 LOG(VB_GENERAL, LOG_ERR, QString(
"Audio device %1 isn't usable")
191 int max_speakers = 8;
192 int realmax_speakers = 8;
196#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
227 if (max_speakers > 2 && !bLPCM)
229 if (max_speakers == 2 && bAC3)
251 if (cur_speakers > max_speakers)
253 LOG(VB_AUDIO, LOG_INFO, QString(
"Reset device %1").arg(out));
254 cur_speakers = max_speakers;
259 for (
int i = 1; i <= max_speakers; i++)
269 QObject::tr(
"Stereo"));
277 QObject::tr(
"5.1 Channel Audio"));
285 QObject::tr(
"7.1 Channel Audio"));
286 eightchan->SetData(8);
310 bool restore =
false;
335 this,
"videosetupwizard");
390 bool handled =
false;
419 QString msg = QObject::tr(
"Audio device is invalid or not useable.");
bool IsSupportedChannels(int channels)
int BestSupportedChannels()
bool canFeature(DigitalFeature arg) const
return DigitalFeature mask.
void SetBestSupportedChannels(int channels)
Force set the greatest number of channels supported by the audio device.
void setFeature(DigitalFeature arg)
set the provided digital feature possible values are:
bool IsInvalid() const
return true if class instance is marked invalid.
AudioOutputSettings m_settings
static ADCVect * GetOutputList(void)
static AudioDeviceConfig * GetAudioDeviceConfig(QString &name, const QString &desc, bool willsuspendpa=false)
AudioTestThread * m_testThread
AudioOutputSettings UpdateCapabilitiesAC3(void)
AudioOutputSettings UpdateCapabilities(bool restore=true, bool AC3=false)
MythUICheckBox * m_dtsCheck
void toggleSpeakers(void)
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
bool Create(void) override
MythUIButton * m_testSpeakerButton
MythUICheckBox * m_eac3Check
MythUICheckBox * m_ac3Check
MythUIButtonList * m_speakerNumberButtonList
MythUICheckBox * m_dtshdCheck
~AudioSetupWizard() override
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
MythUIButtonList * m_audioDeviceButtonList
MythUICheckBox * m_truehdCheck
MythUIButton * m_nextButton
QVector< AudioOutput::AudioDeviceConfig > * m_outputlist
QString m_lastAudioDevice
MythScreenType * m_generalScreen
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
MythUIButton * m_prevButton
void start(QThread::Priority p=QThread::InheritPriority)
Tell MThread to start running the thread in the near future.
bool wait(std::chrono::milliseconds time=std::chrono::milliseconds::max())
Wait for the MThread to exit, with a maximum timeout.
void SaveBoolSetting(const QString &key, bool newValue)
void SaveSetting(const QString &key, int newValue)
QString GetSetting(const QString &key, const QString &defaultval="")
int GetNumSetting(const QString &key, int defaultval=0)
MythScreenStack * GetMainStack()
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
void LoadInBackground(const QString &message="")
void BuildFocusList(void)
MythUIType * GetFocusWidget(void) const
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
A checkbox widget supporting three check states - on,off,half and two conditions - selected and unsel...
void SetCheckState(MythUIStateType::StateType state)
MythUIStateType::StateType GetCheckState() const
void SetHelpText(const QString &text)
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
static pid_list_t::iterator find(const PIDInfoMap &map, pid_list_t &list, pid_list_t::iterator begin, pid_list_t::iterator end, bool find_open)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)
QDateTime current(bool stripped)
Returns current Date and Time in UTC.