going_active(
config.cmd_blocking); // note -- will be executed with the mutex locked, but that's okay
} else if ((state == am_active) && (player_state == ps_inactive) &&
- (config.active_mode_timeout == 0.0)) {
+ (config.active_state_timeout == 0.0)) {
going_inactive(
config.cmd_blocking); // note -- will be executed with the mutex locked, but that's okay
}
// debug(1,"am_state: am_active");
while (player_state != ps_inactive)
pthread_cond_wait(&activity_monitor_cv, &activity_monitor_mutex);
- if (config.active_mode_timeout == 0.0) {
+ if (config.active_state_timeout == 0.0) {
state = am_inactive;
// going_inactive(); // this is done in activity_monitor_signify_activity
} else {
state = am_timing_out;
uint64_t time_to_wait_for_wakeup_fp =
- (uint64_t)(config.active_mode_timeout * 1000000); // resolution of microseconds
+ (uint64_t)(config.active_state_timeout * 1000000); // resolution of microseconds
time_to_wait_for_wakeup_fp = time_to_wait_for_wakeup_fp << 32;
time_to_wait_for_wakeup_fp = time_to_wait_for_wakeup_fp / 1000000;
else if ((strcasecmp(str, "yes") == 0) || (strcasecmp(str, "on") == 0) || (strcasecmp(str, "always") == 0)) {
config.disable_standby_mode = disable_standby_always;
config.keep_dac_busy = 1;
- } else if (strcasecmp(str, "while active") == 0)
+ } else if (strcasecmp(str, "while_active") == 0)
config.disable_standby_mode = disable_standby_while_active;
else {
warn("Invalid disable_standby_mode option choice \"%s\". It should be "
- "\"always\", \"while active\" or \"never\". "
- "It is set to \"while active\".");
+ "\"always\", \"while_active\" or \"never\". "
+ "It is set to \"while_active\".");
}
}
double audio_backend_latency_offset; // this will be the offset in seconds to compensate for any
// fixed latency there might be in the audio path
double audio_backend_silent_lead_in_time; // the length of the silence that should precede a play.
- double active_mode_timeout; // the amount of time from when play ends to when the system leaves
+ double active_state_timeout; // the amount of time from when play ends to when the system leaves
// into the "active" mode.
uint32_t volume_range_db; // the range, in dB, from max dB to min dB. Zero means use the mixer's
// native range.
} else if ((strcasecmp(th, "yes") == 0) || (strcasecmp(th, "on") == 0) || (strcasecmp(th, "always") == 0)) {
config.disable_standby_mode = disable_standby_always;
config.keep_dac_busy = 1;
- } else if (strcasecmp(th, "while active") == 0)
+ } else if (strcasecmp(th, "while_active") == 0)
config.disable_standby_mode = disable_standby_while_active;
else {
warn("An unrecognised disable_standby_mode: \"%s\" was requested via D-Bus interface.", th);
shairport_sync_set_disable_standby_mode(skeleton, "always");
break;
case disable_standby_while_active:
- shairport_sync_set_disable_standby_mode(skeleton, "while active");
+ shairport_sync_set_disable_standby_mode(skeleton, "while_active");
break;
default:
break;
debug(1, ">> disable standby mode set to \"always\"");
break;
case disable_standby_while_active:
- shairport_sync_set_disable_standby_mode(SHAIRPORT_SYNC(shairportSyncSkeleton), "while active");
- debug(1, ">> disable standby mode set to \"while active\"");
+ shairport_sync_set_disable_standby_mode(SHAIRPORT_SYNC(shairportSyncSkeleton), "while_active");
+ debug(1, ">> disable standby mode set to \"while_active\"");
break;
default:
debug(1,"invalid disable_standby mode!");
PS_PLAYING,
} play_status_type;
-enum active_mode_type {
+enum active_state_type {
AM_INACTIVE = 0,
AM_ACTIVE,
-} active_mode_type;
+} active_state_type;
enum shuffle_status_type {
SS_NOT_AVAILABLE = 0,
enum play_status_type
player_state; // this is the state of the actual player itself, which can be a bit noisy.
- enum active_mode_type active_state;
+ enum active_state_type active_state;
int speaker_volume; // this is the actual speaker volume, allowing for the main volume and the
// speaker volume control
// run_this_before_play_begins = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line
// run_this_after_play_ends = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line
-// "active" mode starts when play begins and ends when the active_mode_timeout has elapsed after play ends, unless another play session starts before the timeout has fully elapsed.
-// run_this_before_entering_active_mode = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line
-// run_this_after_exiting_active_mode = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line
-// active_mode_timeout = 10; // wait for this number of seconds after play ends before leaving the active mode, unless another play session begins.
+// "active" state starts when play begins and ends when the active_state_timeout has elapsed after play ends, unless another play session starts before the timeout has fully elapsed.
+// run_this_before_entering_active_state = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line
+// run_this_after_exiting_active_state = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line
+// active_state_timeout = 10; // wait for this number of seconds after play ends before leaving the active state, unless another play session begins.
// run_this_if_an_unfixable_error_is_detected = "/full/path/to/application and args"; // if a problem occurs that can't be cleared by Shairport Sync itself, hook a program on here to deal with it. An error code-string is passed as the last argument.
// Many of these "unfixable" problems are caused by malfunctioning output devices, and sometimes it is necessary to restart the whole device to clear the problem.
// use_mmap_if_available = "yes"; // Use this optional advanced setting to control whether MMAP-based output is used to communicate with the DAC. Default is "yes"
// use_hardware_mute_if_available = "no"; // Use this optional advanced setting to control whether the hardware in the DAC is used for muting. Default is "no", for compatibility with other audio players.
// maximum_stall_time = 0.200; // Use this optional advanced setting to control how long to wait for data to be consumed by the output device before considering it an error. It should never approach 200 ms.
-// disable_standby_mode = "no"; // Some DACs make small "popping" noises when they go in and out of standby mode. Set this to "yes" to keep the DAC active all the time.
+// disable_standby_mode = "while_active"; // Some DACs make small "popping" noises when they go in and out of standby mode. Settings can be: "always", "while_active" or "never". Default is "while_active". You can use "yes" instead of "always" and "no instead of "never".
};
// Parameters for the "sndio" audio back end. All are optional.
// nothing else comes in first.
config.fixedLatencyOffset = 11025; // this sounds like it works properly.
config.diagnostic_drop_packet_fraction = 0.0;
- config.active_mode_timeout = 10.0;
+ config.active_state_timeout = 10.0;
config.volume_range_hw_priority =
1; // if combining software and hardware volume control, give the hardware priority
// i.e. when reducing volume, reduce the hw first before reducing the software.
config.cmd_stop = (char *)str;
}
- if (config_lookup_string(config.cfg, "sessioncontrol.run_this_before_entering_active_mode",
+ if (config_lookup_string(config.cfg, "sessioncontrol.run_this_before_entering_active_state",
&str)) {
config.cmd_active_start = (char *)str;
}
- if (config_lookup_string(config.cfg, "sessioncontrol.run_this_after_exiting_active_mode",
+ if (config_lookup_string(config.cfg, "sessioncontrol.run_this_after_exiting_active_state",
&str)) {
config.cmd_active_stop = (char *)str;
}
- if (config_lookup_float(config.cfg, "sessioncontrol.active_mode_timeout", &dvalue)) {
+ if (config_lookup_float(config.cfg, "sessioncontrol.active_state_timeout", &dvalue)) {
if (dvalue < 0.0)
- warn("Invalid value \"%f\" for sessioncontrol.active_mode_timeout. It must be positive. "
+ warn("Invalid value \"%f\" for sessioncontrol.active_state_timeout. It must be positive. "
"The default of %f will be used instead.",
- dvalue, config.active_mode_timeout);
+ dvalue, config.active_state_timeout);
else
- config.active_mode_timeout = dvalue;
+ config.active_state_timeout = dvalue;
}
if (config_lookup_string(config.cfg,
debug(1, "wait-cmd status is %d.", config.cmd_blocking);
debug(1, "run_this_before_play_begins may return output is %d.", config.cmd_start_returns_output);
debug(1, "run_this_if_an_unfixable_error_is_detected action is \"%s\".", config.cmd_unfixable);
- debug(1, "run_this_before_entering_active_mode action is \"%s\".", config.cmd_active_start);
- debug(1, "run_this_after_exiting_active_mode action is \"%s\".", config.cmd_active_stop);
- debug(1, "active_mode_timeout is %f seconds.", config.active_mode_timeout);
+ debug(1, "run_this_before_entering_active_state action is \"%s\".", config.cmd_active_start);
+ debug(1, "run_this_after_exiting_active_state action is \"%s\".", config.cmd_active_stop);
+ debug(1, "active_state_timeout is %f seconds.", config.active_state_timeout);
debug(1, "mdns backend \"%s\".", config.mdns_name);
debug(2, "userSuppliedLatency is %d.", config.userSuppliedLatency);
debug(1, "stuffing option is \"%d\" (0-basic, 1-soxr).", config.packet_stuffing);