Merge branch 'unstable' into development

This commit is contained in:
Mike Brady
2019-02-28 22:14:52 +00:00
11 changed files with 110 additions and 132 deletions
+5 -3
View File
@@ -111,7 +111,9 @@ void going_inactive(int block) {
}
void activity_monitor_signify_activity(int active) {
pthread_mutex_lock(&activity_monitor_mutex);
// this could be pthread_cancelled and they is likely to be cancellation points in the
// hooked-on procedures
pthread_cleanup_debug_mutex_lock(&activity_monitor_mutex, 10000, 1);
player_state = active == 0 ? ps_inactive : ps_active;
// Now, although we could simply let the state machine in the activity monitor thread
// look after eveything, we will change state here in two situations:
@@ -123,7 +125,7 @@ void activity_monitor_signify_activity(int active) {
//
// The reason for all this is that we might want to perform the attached scripts
// and wait for them to complete before continuing. If they were perfomed in the
// activity monitor thread, then we coldn't wait for them to complete.
// activity monitor thread, then we couldn't wait for them to complete.
// Thus, the only time the thread will execute a going_... function is when a non-zero
// timeout actually matures.
@@ -138,7 +140,7 @@ void activity_monitor_signify_activity(int active) {
}
pthread_cond_signal(&activity_monitor_cv);
pthread_mutex_unlock(&activity_monitor_mutex);
pthread_cleanup_pop(1); // release the mutex
}
void activity_thread_cleanup_handler(__attribute__((unused)) void *arg) {
+22 -18
View File
@@ -323,6 +323,22 @@ int actual_open_alsa_device(void) {
snd_strerror(ret));
return ret;
}
ret = snd_pcm_hw_params_set_channels(alsa_handle, alsa_params, 2);
if (ret < 0) {
warn("audio_alsa: Channels count (2) not available for device \"%s\": %s", alsa_out_dev,
snd_strerror(ret));
return ret;
}
ret = snd_pcm_hw_params_set_rate_near(alsa_handle, alsa_params, &my_sample_rate, &dir);
if (ret < 0) {
warn("audio_alsa: Rate %iHz not available for playback: %s", desired_sample_rate,
snd_strerror(ret));
return ret;
}
snd_pcm_format_t sf;
switch (sample_format) {
case SPS_FORMAT_S8:
@@ -359,26 +375,14 @@ int actual_open_alsa_device(void) {
debug(1, "Unsupported output format at audio_alsa.c");
return -EINVAL;
}
ret = snd_pcm_hw_params_set_format(alsa_handle, alsa_params, sf);
if (ret < 0) {
warn("audio_alsa: Sample format %d not available for device \"%s\": %s", sample_format,
alsa_out_dev, snd_strerror(ret));
return ret;
}
ret = snd_pcm_hw_params_set_channels(alsa_handle, alsa_params, 2);
if (ret < 0) {
warn("audio_alsa: Channels count (2) not available for device \"%s\": %s", alsa_out_dev,
snd_strerror(ret));
return ret;
}
ret = snd_pcm_hw_params_set_rate_near(alsa_handle, alsa_params, &my_sample_rate, &dir);
if (ret < 0) {
warn("audio_alsa: Rate %iHz not available for playback: %s", desired_sample_rate,
snd_strerror(ret));
return ret;
}
if (set_period_size_request != 0) {
debug(1, "Attempting to set the period size");
@@ -981,7 +985,7 @@ static int init(int argc, char **argv) {
/* Get the optional disable_standby_mode setting. */
config.disable_standby_mode = disable_standby_while_active;
config.disable_standby_mode = disable_standby_off;
config.keep_dac_busy = 0;
if (config_lookup_string(config.cfg, "alsa.disable_standby_mode", &str)) {
if ((strcasecmp(str, "no") == 0) || (strcasecmp(str, "off") == 0) || (strcasecmp(str, "never") == 0))
@@ -994,11 +998,11 @@ static int init(int argc, char **argv) {
else {
warn("Invalid disable_standby_mode option choice \"%s\". It should be "
"\"always\", \"while_active\" or \"never\". "
"It is set to \"while_active\".");
"It is set to \"never\".");
}
}
debug(1, "alsa: disable_standby_mode is %d.", config.disable_standby_mode);
debug(1, "alsa: disable_standby_mode is \"%s\".", config.disable_standby_mode == disable_standby_off ? "never" : config.disable_standby_mode == disable_standby_always ? "always" : "while_active");
}
optind = 1; // optind=0 is equivalent to optind=1 plus special behaviour
@@ -1548,7 +1552,7 @@ void *alsa_buffer_monitor_thread_code(__attribute__((unused)) void *arg) {
int okb = -1;
while (1) {
if (okb != config.keep_dac_busy) {
debug(1,"keep_dac_busy is now %d",config.keep_dac_busy);
debug(1,"keep_dac_busy is now \"%s\"",config.keep_dac_busy == 0 ? "no" : "yes");
okb = config.keep_dac_busy;
}
if ((config.keep_dac_busy != 0) && (alsa_device_initialised == 0)) {
+15 -12
View File
@@ -65,20 +65,21 @@ struct sio_par par;
struct sndio_formats {
const char *name;
enum sps_format_t fmt;
unsigned int rate;
unsigned int bits;
unsigned int bps;
unsigned int sig;
unsigned int le;
};
static struct sndio_formats formats[] = {{"S8", SPS_FORMAT_S8, 8, 1, 1, SIO_LE_NATIVE},
{"U8", SPS_FORMAT_U8, 8, 1, 0, SIO_LE_NATIVE},
{"S16", SPS_FORMAT_S16, 16, 2, 1, SIO_LE_NATIVE},
{"S24", SPS_FORMAT_S24, 24, 4, 1, SIO_LE_NATIVE},
{"S24_3LE", SPS_FORMAT_S24_3LE, 24, 3, 1, 1},
{"S24_3BE", SPS_FORMAT_S24_3BE, 24, 3, 1, 0},
{"S32", SPS_FORMAT_S32, 24, 4, 1, SIO_LE_NATIVE}};
static struct sndio_formats formats[] = {{"S8", SPS_FORMAT_S8, 44100, 8, 1, 1, SIO_LE_NATIVE},
{"U8", SPS_FORMAT_U8, 44100, 8, 1, 0, SIO_LE_NATIVE},
{"S16", SPS_FORMAT_S16, 44100, 16, 2, 1, SIO_LE_NATIVE},
{"AUTOMATIC", SPS_FORMAT_S16, 44100, 16, 2, 1, SIO_LE_NATIVE}, // TODO: make this really automatic?
{"S24", SPS_FORMAT_S24, 44100, 24, 4, 1, SIO_LE_NATIVE},
{"S24_3LE", SPS_FORMAT_S24_3LE, 44100, 24, 3, 1, 1},
{"S24_3BE", SPS_FORMAT_S24_3BE, 44100, 24, 3, 1, 0},
{"S32", SPS_FORMAT_S32, 44100, 24, 4, 1, SIO_LE_NATIVE}};
static void help() { printf(" -d output-device set the output device [default*|...]\n"); }
@@ -146,7 +147,7 @@ static int init(int argc, char **argv) {
}
if (!found)
die("Invalid output format \"%s\". Should be one of: S8, U8, S16, S24, "
"S24_3LE, S24_3BE, S32",
"S24_3LE, S24_3BE, S32, Automatic",
tmp);
}
}
@@ -174,6 +175,7 @@ static int init(int argc, char **argv) {
written = played = 0;
time_of_last_onmove_cb = 0;
at_least_one_onmove_cb_seen = 0;
for (i = 0; i < sizeof(formats) / sizeof(formats[0]); i++) {
if (formats[i].fmt == config.output_format) {
@@ -184,19 +186,20 @@ static int init(int argc, char **argv) {
break;
}
}
if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par))
die("sndio: failed to set audio parameters");
for (i = 0, found = 0; i < sizeof(formats) / sizeof(formats[0]); i++) {
if (formats[i].bits == par.bits && formats[i].bps == par.bps && formats[i].sig == par.sig &&
formats[i].le == par.le) {
formats[i].le == par.le && formats[i].rate == par.rate) {
config.output_format = formats[i].fmt;
found = 1;
break;
}
}
if (!found)
die("sndio: failed to negotiate audio parameters");
die("sndio: could not set output device to the required format and rate.");
framesize = par.bps * par.pchan;
config.output_rate = par.rate;
+10 -4
View File
@@ -955,7 +955,8 @@ uint64_t get_absolute_time_in_fp() {
return time_now_fp;
}
ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
ssize_t non_blocking_write_with_timeout(int fd, const void *buf, size_t count, int timeout) {
// timeout is in milliseconds
void *ibuf = (void *)buf;
size_t bytes_remaining = count;
int rc = 1;
@@ -964,7 +965,7 @@ ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
// check that we can do some writing
ufds[0].fd = fd;
ufds[0].events = POLLOUT;
rc = poll(ufds, 1, 5000);
rc = poll(ufds, 1, timeout);
if (rc < 0) {
// debug(1, "non-blocking write error waiting for pipe to become ready for writing...");
} else if (rc == 0) {
@@ -975,20 +976,24 @@ ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
ssize_t bytes_written = write(fd, ibuf, bytes_remaining);
if (bytes_written == -1) {
// debug(1,"Error %d in non_blocking_write: \"%s\".",errno,strerror(errno));
rc = -1;
rc = bytes_written; // to imitate the return from write()
} else {
ibuf += bytes_written;
bytes_remaining -= bytes_written;
}
}
}
if (rc == 0)
if (rc > 0)
return count - bytes_remaining; // this is just to mimic a normal write/3.
else
return rc;
// return write(fd,buf,count);
}
ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
return non_blocking_write_with_timeout(fd,buf,count,5000); // default is 5 seconds.
}
/* from
* http://coding.debuntu.org/c-implementing-str_replace-replace-all-occurrences-substring#comment-722
*/
@@ -1385,6 +1390,7 @@ int64_t generate_zero_frames(char *outp, size_t number_of_frames, enum sps_forma
break;
case SPS_FORMAT_UNKNOWN:
die("Unexpected SPS_FORMAT_UNKNOWN while calculating dither mask.");
break;
}
dither_mask -= 1;
// int64_t r = r64i();
+2
View File
@@ -251,6 +251,8 @@ int get_requested_connection_state_to_output();
void set_requested_connection_state_to_output(int v);
ssize_t non_blocking_write_with_timeout(int fd, const void *buf, size_t count, int timeout); // timeout in milliseconds
ssize_t non_blocking_write(int fd, const void *buf, size_t count); // used in a few places
/* from
+1 -1
View File
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.50])
AC_INIT([shairport-sync], [3.3d54], [mikebrady@eircom.net])
AC_INIT([shairport-sync], [3.3d56], [mikebrady@eircom.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([shairport.c])
AC_CONFIG_HEADERS([config.h])
+41 -85
View File
@@ -20,7 +20,6 @@ int service_is_running = 0;
ShairportSyncDiagnostics *shairportSyncDiagnosticsSkeleton = NULL;
ShairportSyncRemoteControl *shairportSyncRemoteControlSkeleton = NULL;
ShairportSyncAdvancedRemoteControl *shairportSyncAdvancedRemoteControlSkeleton = NULL;
GDBusConnection *ourBusConnection = NULL;
guint ownerID = 0;
@@ -434,14 +433,12 @@ gboolean notify_drift_tolerance_callback(ShairportSync *skeleton,
}
gboolean notify_disable_standby_mode_callback(ShairportSync *skeleton,
__attribute__((unused)) gpointer user_data) {
__attribute__((unused)) gpointer user_data) {
char *th = (char *)shairport_sync_get_disable_standby_mode(skeleton);
if ((strcasecmp(th, "no") == 0) || (strcasecmp(th, "off") == 0) ||
(strcasecmp(th, "never") == 0)) {
if ((strcasecmp(th, "no") == 0) || (strcasecmp(th, "off") == 0) || (strcasecmp(th, "never") == 0)) {
config.disable_standby_mode = disable_standby_off;
config.keep_dac_busy = 0;
} else if ((strcasecmp(th, "yes") == 0) || (strcasecmp(th, "on") == 0) ||
(strcasecmp(th, "always") == 0)) {
} 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)
@@ -449,17 +446,17 @@ gboolean notify_disable_standby_mode_callback(ShairportSync *skeleton,
else {
warn("An unrecognised disable_standby_mode: \"%s\" was requested via D-Bus interface.", th);
switch (config.disable_standby_mode) {
case disable_standby_off:
shairport_sync_set_disable_standby_mode(skeleton, "off");
break;
case disable_standby_always:
shairport_sync_set_disable_standby_mode(skeleton, "always");
break;
case disable_standby_while_active:
shairport_sync_set_disable_standby_mode(skeleton, "while_active");
break;
default:
break;
case disable_standby_off:
shairport_sync_set_disable_standby_mode(skeleton, "off");
break;
case disable_standby_always:
shairport_sync_set_disable_standby_mode(skeleton, "always");
break;
case disable_standby_while_active:
shairport_sync_set_disable_standby_mode(skeleton, "while_active");
break;
default:
break;
}
}
return TRUE;
@@ -659,7 +656,7 @@ static void on_dbus_name_acquired(GDBusConnection *connection, const gchar *name
G_CALLBACK(notify_alacdecoder_callback), NULL);
g_signal_connect(shairportSyncSkeleton, "notify::disable-standby-mode",
G_CALLBACK(notify_disable_standby_mode_callback), NULL);
g_signal_connect(shairportSyncSkeleton, "notify::volume-control-profile",
g_signal_connect(shairportSyncSkeleton, "notify::volume-control-profile",
G_CALLBACK(notify_volume_control_profile_callback), NULL);
g_signal_connect(shairportSyncSkeleton, "notify::disable-standby",
G_CALLBACK(notify_disable_standby_callback), NULL);
@@ -747,21 +744,21 @@ static void on_dbus_name_acquired(GDBusConnection *connection, const gchar *name
debug(1, ">> Active set to \"false\"");
switch (config.disable_standby_mode) {
case disable_standby_off:
shairport_sync_set_disable_standby_mode(SHAIRPORT_SYNC(shairportSyncSkeleton), "off");
debug(1, ">> disable standby mode set to \"off\"");
break;
case disable_standby_always:
shairport_sync_set_disable_standby_mode(SHAIRPORT_SYNC(shairportSyncSkeleton), "always");
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\"");
break;
default:
debug(1, "invalid disable_standby mode!");
break;
case disable_standby_off:
shairport_sync_set_disable_standby_mode(SHAIRPORT_SYNC(shairportSyncSkeleton), "off");
debug(1, ">> disable standby mode set to \"off\"");
break;
case disable_standby_always:
shairport_sync_set_disable_standby_mode(SHAIRPORT_SYNC(shairportSyncSkeleton), "always");
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\"");
break;
default:
debug(1,"invalid disable_standby mode!");
break;
}
#ifdef CONFIG_SOXR
@@ -849,31 +846,6 @@ static void on_dbus_name_acquired(GDBusConnection *connection, const gchar *name
service_is_running = 1;
}
// from http://www.ccp4.ac.uk/dist/checkout/glib-2.34.3/gio/tests/gdbus-tests.c
/* ----------------------------------------------------------------------------------------------------
*/
GDBusConnection *_g_bus_get_priv(GBusType bus_type, GCancellable *cancellable, GError **error) {
gchar *address;
GDBusConnection *ret;
ret = NULL;
address = g_dbus_address_get_for_bus_sync(bus_type, cancellable, error);
if (address == NULL)
goto out;
ret = g_dbus_connection_new_for_address_sync(address,
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION,
NULL, /* GDBusAuthObserver */
cancellable, error);
g_free(address);
out:
return ret;
}
static void on_dbus_name_lost_again(__attribute__((unused)) GDBusConnection *connection,
__attribute__((unused)) const gchar *name,
__attribute__((unused)) gpointer user_data) {
@@ -891,17 +863,13 @@ static void on_dbus_name_lost(__attribute__((unused)) GDBusConnection *connectio
pid_t pid = getpid();
char interface_name[256] = "";
snprintf(interface_name, sizeof(interface_name), "org.gnome.ShairportSync.i%d", pid);
// GBusType dbus_bus_type = G_BUS_TYPE_SYSTEM;
// if (config.dbus_service_bus_type == DBT_session)
// dbus_bus_type = G_BUS_TYPE_SESSION;
GBusType dbus_bus_type = G_BUS_TYPE_SYSTEM;
if (config.dbus_service_bus_type == DBT_session)
dbus_bus_type = G_BUS_TYPE_SESSION;
// debug(1, "Looking for a Shairport Sync native D-Bus interface \"%s\" on the %s bus.",
// interface_name,(config.dbus_service_bus_type == DBT_session) ? "session" : "system");
ownerID =
g_bus_own_name_on_connection(ourBusConnection, interface_name, G_BUS_NAME_OWNER_FLAGS_REPLACE,
on_dbus_name_acquired, on_dbus_name_lost_again, NULL, NULL);
// g_bus_own_name(dbus_bus_type, interface_name, G_BUS_NAME_OWNER_FLAGS_NONE, NULL,
// on_dbus_name_acquired, on_dbus_name_lost_again, NULL, NULL);
g_bus_own_name(dbus_bus_type, interface_name, G_BUS_NAME_OWNER_FLAGS_NONE, NULL,
on_dbus_name_acquired, on_dbus_name_lost_again, NULL, NULL);
}
int start_dbus_service() {
@@ -911,18 +879,8 @@ int start_dbus_service() {
dbus_bus_type = G_BUS_TYPE_SESSION;
// debug(1, "Looking for a Shairport Sync native D-Bus interface \"org.gnome.ShairportSync\" on
// the %s bus.",(config.dbus_service_bus_type == DBT_session) ? "session" : "system");
ourBusConnection = _g_bus_get_priv(dbus_bus_type, NULL, NULL);
if (ourBusConnection) {
debug(1, "Got a connection to the bus.");
g_dbus_connection_set_exit_on_close(ourBusConnection, FALSE);
ownerID = g_bus_own_name_on_connection(ourBusConnection, "org.gnome.ShairportSync",
G_BUS_NAME_OWNER_FLAGS_REPLACE, on_dbus_name_acquired,
on_dbus_name_lost, NULL, NULL);
}
// ownerID = g_bus_own_name(dbus_bus_type, "org.gnome.ShairportSync", G_BUS_NAME_OWNER_FLAGS_NONE,
// NULL, on_dbus_name_acquired, on_dbus_name_lost, NULL, NULL);
ownerID = g_bus_own_name(dbus_bus_type, "org.gnome.ShairportSync", G_BUS_NAME_OWNER_FLAGS_NONE,
NULL, on_dbus_name_acquired, on_dbus_name_lost, NULL, NULL);
return 0; // this is just to quieten a compiler warning
}
@@ -932,11 +890,9 @@ void stop_dbus_service() {
g_bus_unown_name(ownerID);
else
debug(1, "Zero OwnerID for \"org.gnome.ShairportSync\".");
if (ourBusConnection)
g_object_unref(ourBusConnection);
else
debug(1, "NULL BusConnection for \"org.gnome.ShairportSync\".");
service_is_running = 0;
service_is_running = 0;
}
int dbus_service_is_running() { return service_is_running; }
int dbus_service_is_running() {
return service_is_running;
}
+3
View File
@@ -682,6 +682,7 @@ static inline void process_sample(int32_t sample, char **outp, enum sps_format_t
break;
case SPS_FORMAT_UNKNOWN:
die("Unexpected SPS_FORMAT_UNKNOWN while calculating dither mask.");
break;
}
dither_mask -= 1;
// int64_t r = r64i();
@@ -758,6 +759,7 @@ static inline void process_sample(int32_t sample, char **outp, enum sps_format_t
break;
case SPS_FORMAT_UNKNOWN:
die("Unexpected SPS_FORMAT_UNKNOWN while outputting samples");
break;
}
*outp += result;
@@ -1644,6 +1646,7 @@ void *player_thread_func(void *arg) {
break;
case SPS_FORMAT_UNKNOWN:
die("Unknown format choosing output bit depth");
break;
}
debug(3, "Output bit depth is %d.", output_bit_depth);
+8 -6
View File
@@ -187,7 +187,7 @@ int pc_queue_add_item(pc_queue *the_queue, const void *the_stuff, int block) {
int rc;
if (the_queue) {
if (block == 0) {
rc = pthread_mutex_trylock(&the_queue->pc_queue_lock);
rc = debug_mutex_lock(&the_queue->pc_queue_lock, 10000, 2);
if (rc == EBUSY)
return EBUSY;
} else
@@ -787,7 +787,7 @@ int msg_write_response(int fd, rtsp_message *resp) {
return -4;
}
if (reply != p - pkt) {
debug(1, "msg_write_response error -- requested bytes not fully written.");
debug(1, "msg_write_response error -- requested bytes: %d not fully written: %d.",p - pkt, reply);
return -5;
}
return 0;
@@ -986,8 +986,10 @@ void handle_setup(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
msg_add_header(resp, "Session", "1");
resp->respcode = 200; // it all worked out okay
debug(1, "Connection %d: SETUP with UDP ports Control: %d, Timing: %d and Audio: %d.",
conn->connection_number, conn->local_control_port, conn->local_timing_port,
debug(1, "Connection %d: SETUP DACP-ID \"%s\" from %s to %s with UDP ports Control: %d, Timing: %d and Audio: %d.",
conn->connection_number,
conn->dacp_id, &conn->client_ip_string, &conn->self_ip_string,
conn->local_control_port, conn->local_timing_port,
conn->local_audio_port);
} else {
@@ -1716,7 +1718,7 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag
}
if (have_the_player) {
debug(3, "RTSP conversation thread %d has acquired play lock.", conn->connection_number);
debug(3, "Connection %d: ANNOUNCE has acquired play lock.", conn->connection_number);
// now, if this new session did not break in, then it's okay to reset the next UDP ports
// to the start of the range
@@ -1882,7 +1884,7 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag
resp->respcode = 200;
} else {
resp->respcode = 453;
debug(1, "Connection %d: failed because a connection is already playing.",
debug(1, "Connection %d: ANNOUNCE failed because another connection is already playing.",
conn->connection_number);
}
+2 -2
View File
@@ -59,7 +59,7 @@ sessioncontrol =
// "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.
// active_state_timeout = 10.0; // 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.
@@ -86,7 +86,7 @@ alsa =
// 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 = "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".
// disable_standby_mode = "never"; // 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 "never", but only for backwards compatibility. You can use "yes" instead of "always" and "no instead of "never".
};
// Parameters for the "sndio" audio back end. All are optional.
+1 -1
View File
@@ -867,7 +867,7 @@ int parse_options(int argc, char **argv) {
} else {
if (config_error_type(&config_file_stuff) == CONFIG_ERR_FILE_IO)
debug(1, "Error reading configuration file \"%s\": \"%s\".",
debug(2, "Error reading configuration file \"%s\": \"%s\".",
config_error_file(&config_file_stuff), config_error_text(&config_file_stuff));
else {
die("Line %d of the configuration file \"%s\":\n%s", config_error_line(&config_file_stuff),