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;
32  AudioSettings(const AudioSettings &other);
34  QString main_device,
35  QString passthru_device,
36  AudioFormat format,
37  int channels,
38  AVCodecID codec,
39  int samplerate,
40  AudioOutputSource source,
41  bool set_initial_vol,
42  bool use_passthru,
43  int upmixer_startup = 0,
44  AudioOutputSettings *custom = nullptr);
45 
47  int channels,
48  AVCodecID codec,
49  int samplerate,
50  bool use_passthru,
51  int upmixer_startup = 0,
52  int codec_profile = 0);
53 
54  explicit AudioSettings(QString main_device,
55  QString passthru_device = QString())
56  : m_mainDevice(std::move(main_device)),
57  m_passthruDevice(std::move(passthru_device)) {}
58 
59  ~AudioSettings();
60  void FixPassThrough(void);
61  void TrimDeviceType(void);
62 
63  QString GetMainDevice(void) const
64  { return m_mainDevice; }
65  QString GetPassthruDevice(void) const
66  { return m_passthruDevice; }
67 
68  public:
69  QString m_mainDevice;
72  int m_channels {-1};
73  AVCodecID m_codec {AV_CODEC_ID_NONE};
74  int m_codecProfile {-1};
75  int m_sampleRate {-1};
76  bool m_setInitialVol {false};
77  bool m_usePassthru {false};
79  int m_upmixer {0};
84  bool m_init {false};
91  AudioOutputSettings *m_custom {nullptr};
92 };
93 
94 #endif // _AUDIO_SETTINGS_H_
#define MPUBLIC
Definition: mythexp.h:10
QString GetPassthruDevice(void) const
Definition: audiosettings.h:65
QString GetMainDevice(void) const
Definition: audiosettings.h:63
AudioSettings(QString main_device, QString passthru_device=QString())
Definition: audiosettings.h:54
AudioOutputSource
Definition: audiosettings.h:21
QString m_passthruDevice
Definition: audiosettings.h:70
QString m_mainDevice
Definition: audiosettings.h:69