1 /***
2     This file is part of snapcast
3     Copyright (C) 2014-2020  Johannes Pohl
4 
5     This program is free software: you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation, either version 3 of the License, or
8     (at your option) any later version.
9 
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14 
15     You should have received a copy of the GNU General Public License
16     along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 ***/
18 
19 #ifndef CLIENT_SETTINGS_HPP
20 #define CLIENT_SETTINGS_HPP
21 
22 #include <string>
23 #include <vector>
24 
25 #include "common/sample_format.hpp"
26 #include "player/pcm_device.hpp"
27 
28 
29 struct ClientSettings
30 {
31     enum class SharingMode
32     {
33         unspecified,
34         exclusive,
35         shared
36     };
37 
38     struct Mixer
39     {
40         enum class Mode
41         {
42             hardware,
43             software,
44             script,
45             none
46         };
47 
48         Mode mode{Mode::software};
49         std::string parameter{""};
50     };
51 
52     struct Server
53     {
54         std::string host{""};
55         size_t port{1704};
56     };
57 
58     struct Player
59     {
60         std::string player_name{""};
61         std::string parameter{""};
62         int latency{0};
63         player::PcmDevice pcm_device;
64         SampleFormat sample_format;
65         SharingMode sharing_mode{SharingMode::unspecified};
66         Mixer mixer;
67     };
68 
69     struct Logging
70     {
71         std::string sink{""};
72         std::string filter{"*:info"};
73     };
74 
75     size_t instance{1};
76     std::string host_id;
77 
78     Server server;
79     Player player;
80     Logging logging;
81 };
82 
83 #endif
84