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