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 <QString>
13 
14 #include "mythexp.h"
15 #include "audiooutputsettings.h"
16 
17 typedef enum {
23 
25 {
26  public:
27  AudioSettings() = default;
28  AudioSettings(const AudioSettings &other);
30  QString main_device,
31  QString passthru_device,
32  AudioFormat format,
33  int channels,
34  AVCodecID codec,
35  int samplerate,
36  AudioOutputSource source,
37  bool set_initial_vol,
38  bool use_passthru,
39  int upmixer_startup = 0,
40  AudioOutputSettings *custom = nullptr);
41 
43  int channels,
44  AVCodecID codec,
45  int samplerate,
46  bool use_passthru,
47  int upmixer_startup = 0,
48  int codec_profile = 0);
49 
50  AudioSettings(const QString &main_device,
51  const QString &passthru_device = QString())
52  : m_main_device(main_device),
53  m_passthru_device(passthru_device) {}
54 
55  ~AudioSettings();
56  void FixPassThrough(void);
57  void TrimDeviceType(void);
58 
59  QString GetMainDevice(void) const
60  { return m_main_device; }
61  QString GetPassthruDevice(void) const
62  { return m_passthru_device; }
63 
64  public:
65  QString m_main_device;
68  int m_channels {-1};
69  AVCodecID m_codec {AV_CODEC_ID_NONE};
70  int m_codec_profile {-1};
71  int m_samplerate {-1};
72  bool m_set_initial_vol {false};
73  bool m_use_passthru {false};
75  int m_upmixer {0};
80  bool m_init {false};
87  AudioOutputSettings *m_custom {nullptr};
88 };
89 
90 #endif // _AUDIO_SETTINGS_H_
QString m_main_device
Definition: audiosettings.h:65
#define MPUBLIC
Definition: mythexp.h:10
QString m_passthru_device
Definition: audiosettings.h:66
QString GetPassthruDevice(void) const
Definition: audiosettings.h:61
QString GetMainDevice(void) const
Definition: audiosettings.h:59
AudioOutputSource
Definition: audiosettings.h:17
AudioSettings(const QString &main_device, const QString &passthru_device=QString())
Definition: audiosettings.h:50