Changed audio profile setting to more selective audio_mode

master
xSmurf 10 years ago
parent 3c920c4fc1
commit 82d96c2648

@ -44,6 +44,13 @@ type Profile struct {
Networking NetworkProfile
}
type AudioMode string
const (
PROFILE_AUDIO_NONE AudioMode = "none"
PROFILE_AUDIO_SPEAKER AudioMode = "speaker"
PROFILE_AUDIO_FULL AudioMode = "full"
)
type XServerConf struct {
Enabled bool
TrayIcon string `json:"tray_icon"`
@ -52,7 +59,7 @@ type XServerConf struct {
UseDBUS bool `json:"use_dbus"`
UsePulseAudio bool `json:"use_pulse_audio"`
DisableClipboard bool `json:"disable_clipboard"`
DisableAudio bool `json:"disable_audio"`
AudioMode AudioMode `json:"audio_mode"`
}
type WhitelistItem struct {
@ -97,7 +104,7 @@ func NewDefaultProfile() *Profile {
EnableTray: false,
UseDBUS: false,
UsePulseAudio: false,
DisableAudio: true,
AudioMode: PROFILE_AUDIO_NONE,
},
}
}

@ -10,7 +10,6 @@
"enabled": true
, "enable_tray": true
, "tray_icon":"/usr/share/icons/hicolor/48x48/apps/evince.png"
, "disable_audio": true
, "use_pulse_audio": false
}
, "networking":{

@ -9,7 +9,6 @@
"enabled": true
, "enable_tray": true
, "tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/gajim.svg"
, "disable_audio":true
}
, "networking":{
"type":"empty"

@ -4,7 +4,6 @@
"enabled": true
, "enable_tray": true
, "tray_icon": "/usr/share/icons/hicolor/scalable/apps/icedove.svg"
, "disable_audio": true
}
, "networking":{
"type":"bridge"

@ -22,8 +22,6 @@
, "enable_tray": true
, "tray_icon":"/usr/share/icons/gnome/scalable/apps/libreoffice-startcenter.svg"
, "window_icon":"/usr/share/icons/gnome/scalable/apps/libreoffice-startcenter.svg"
, "disable_audio": true
, "use_pulse_audio": false
}
, "networking":{
"type":"empty"

@ -5,7 +5,6 @@
, "enable_tray": true
, "tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/office-mail.svg"
, "window_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/office-mail.svg"
, "disable_audio": true
, "use_pulse_audio": false
}
, "networking":{

@ -4,7 +4,6 @@
, "xserver": {
"enabled": true
, "enable_tray": true
, "disable_audio": true
, "disable_clipboard": false
, "tray_icon":"/usr/share/pixmaps/torbrowser80.xpm"
}

@ -4,7 +4,6 @@
"enabled": true
, "enable_tray": true
, "tray_icon": "/usr/share/icons/gnome-colors-common/scalable/apps/xchat.svg"
, "disable_audio": true
}
, "networking":{
"type":"empty"

@ -51,9 +51,12 @@ func getDefaultArgs(config *oz.XServerConf) []string {
args = append(args, "--clipboard")
}
if config.DisableAudio {
switch config.AudioMode {
case oz.PROFILE_AUDIO_NONE, "":
args = append(args, "--no-microphone", "--no-speaker")
} else {
case oz.PROFILE_AUDIO_SPEAKER:
args = append(args, "--no-microphone", "--speaker")
case oz.PROFILE_AUDIO_FULL:
args = append(args, "--microphone", "--speaker")
}

Loading…
Cancel
Save