Skip to content

Commit

Permalink
Add automatic bit depth and speed selection for alsa devices. Set rat…
Browse files Browse the repository at this point in the history
…e and format to "auto" by default. Always look for the greatest bit depth, but the lowest multiple of 44,100.

Improve support for big-endian CPUs by adding support for explicit -endian formats, i.e. S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE.

For the "disable_standby_mode" setting, change "while_active" to "auto".
  • Loading branch information
mikebrady committed May 7, 2019
1 parent 51c097c commit 83c0405
Show file tree
Hide file tree
Showing 21 changed files with 272 additions and 130 deletions.
4 changes: 2 additions & 2 deletions activity_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void going_active(int block) {
shairport_sync_set_active(SHAIRPORT_SYNC(shairportSyncSkeleton), TRUE);
#endif

if (config.disable_standby_mode == disable_standby_while_active) {
if (config.disable_standby_mode == disable_standby_auto) {
#ifdef CONFIG_DBUS_INTERFACE
if (dbus_service_is_running())
shairport_sync_set_disable_standby(SHAIRPORT_SYNC(shairportSyncSkeleton), TRUE);
Expand All @@ -98,7 +98,7 @@ void going_inactive(int block) {
shairport_sync_set_active(SHAIRPORT_SYNC(shairportSyncSkeleton), FALSE);
#endif

if (config.disable_standby_mode == disable_standby_while_active) {
if (config.disable_standby_mode == disable_standby_auto) {
#ifdef CONFIG_DBUS_INTERFACE
if (dbus_service_is_running())
shairport_sync_set_disable_standby(SHAIRPORT_SYNC(shairportSyncSkeleton), FALSE);
Expand Down
2 changes: 2 additions & 0 deletions audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ typedef struct {
int (*init)(int argc, char **argv);
// at end of program
void (*deinit)(void);

int (*prepare)(void); // looks and sets stuff in the config data structure

void (*start)(int sample_rate, int sample_format);

Expand Down
Loading

0 comments on commit 83c0405

Please sign in to comment.