MythTV  master
audiosettings.h
Go to the documentation of this file.
1 /* -*- Mode: c++ -*-
2  *
3  * Copyright (C) Daniel Kristjansson 2008
4  * Copyright (C) Jean-Yves Avenard 2010
5  *
6  * Licensed under the GPL v2 or a later version at your choosing.
7  */
8 
9 #ifndef AUDIO_SETTINGS_H
10 #define AUDIO_SETTINGS_H
11 
12 #include <utility>
13 
14 // Qt headers
15 #include <QString>
16 
17 // MythTV headers
18 #include "mythexp.h"
19 #include "audiooutputsettings.h"
20 
26 };
27 
29 {
30  public:
31  AudioSettings() = default;
33  AudioSettings(const AudioSettings &other);
35  QString main_device,
36  QString passthru_device,
37  AudioFormat format,
38  int channels,
39  AVCodecID codec,
40  int samplerate,
41  AudioOutputSource source,
42  bool set_initial_vol,
43  bool use_passthru,
44  int upmixer_startup = 0,
45  AudioOutputSettings *custom = nullptr);
46 
48  int channels,
49  AVCodecID codec,
50  int samplerate,
51  bool use_passthru,
52  int upmixer_startup = 0,
53  int codec_profile = 0);
54 
55  explicit AudioSettings(QString main_device,
56  QString passthru_device = QString())
57  : m_mainDevice(std::move(main_device)),
58  m_passthruDevice(std::move(passthru_device)) {}
59 
60  ~AudioSettings();
61  void FixPassThrough(void);
62  void TrimDeviceType(void);
63 
64  QString GetMainDevice(void) const
65  { return m_mainDevice; }
66  QString GetPassthruDevice(void) const
67  { return m_passthruDevice; }
68 
69  public:
70  QString m_mainDevice;
73  int m_channels {-1};
74  AVCodecID m_codec {AV_CODEC_ID_NONE};
75  int m_codecProfile {-1};
76  int m_sampleRate {-1};
77  bool m_setInitialVol {false};
78  bool m_usePassthru {false};
80  int m_upmixer {0};
85  bool m_init {false};
92  AudioOutputSettings *m_custom {nullptr};
93 };
94 
95 #endif // AUDIO_SETTINGS_H
FORMAT_NONE
@ FORMAT_NONE
Definition: audiooutputsettings.h:26
AudioSettings::operator=
AudioSettings & operator=(const AudioSettings &)=delete
MPUBLIC
#define MPUBLIC
Definition: mythexp.h:10
AUDIOOUTPUT_TELEPHONY
@ AUDIOOUTPUT_TELEPHONY
Definition: audiosettings.h:25
AudioSettings::GetPassthruDevice
QString GetPassthruDevice(void) const
Definition: audiosettings.h:66
mythexp.h
AudioSettings::AudioSettings
AudioSettings(QString main_device, QString passthru_device=QString())
Definition: audiosettings.h:55
AudioSettings::AudioSettings
AudioSettings()=default
AudioSettings
Definition: audiosettings.h:29
AUDIOOUTPUT_MUSIC
@ AUDIOOUTPUT_MUSIC
Definition: audiosettings.h:24
AUDIOOUTPUT_UNKNOWN
@ AUDIOOUTPUT_UNKNOWN
Definition: audiosettings.h:22
AudioSettings::m_mainDevice
QString m_mainDevice
Definition: audiosettings.h:70
AudioSettings::GetMainDevice
QString GetMainDevice(void) const
Definition: audiosettings.h:64
AudioSettings::m_passthruDevice
QString m_passthruDevice
Definition: audiosettings.h:71
AUDIOOUTPUT_VIDEO
@ AUDIOOUTPUT_VIDEO
Definition: audiosettings.h:23
AudioOutputSettings
Definition: audiooutputsettings.h:50
AudioOutputSource
AudioOutputSource
Definition: audiosettings.h:21
AudioFormat
AudioFormat
Definition: audiooutputsettings.h:25
audiooutputsettings.h