Skip to content

Commit

Permalink
find . \( -name \*.cpp -or -name \*.h -or -name \*.c \) -exec clang-f…
Browse files Browse the repository at this point in the history
…ormat -i -style='{BasedOnStyle: llvm, IndentWidth: 2, ColumnLimit: 100}' '{}' \;
  • Loading branch information
mikebrady committed Jun 19, 2019
1 parent 7fc977d commit c8b0be3
Show file tree
Hide file tree
Showing 19 changed files with 575 additions and 570 deletions.
23 changes: 10 additions & 13 deletions activity_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "dbus-service.h"
#endif


enum am_state state;
enum ps_state { ps_inactive, ps_active } player_state;

Expand All @@ -73,10 +72,10 @@ void going_active(int block) {

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);
else
config.keep_dac_busy = 1;
if (dbus_service_is_running())
shairport_sync_set_disable_standby(SHAIRPORT_SYNC(shairportSyncSkeleton), TRUE);
else
config.keep_dac_busy = 1;
#else
config.keep_dac_busy = 1;
#endif
Expand All @@ -100,12 +99,12 @@ void going_inactive(int block) {

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);
else
config.keep_dac_busy = 0;
if (dbus_service_is_running())
shairport_sync_set_disable_standby(SHAIRPORT_SYNC(shairportSyncSkeleton), FALSE);
else
config.keep_dac_busy = 0;
#else
config.keep_dac_busy = 0;
config.keep_dac_busy = 0;
#endif
}
}
Expand Down Expand Up @@ -255,9 +254,7 @@ void *activity_monitor_thread_code(void *arg) {
pthread_exit(NULL);
}

enum am_state activity_status() {
return (state);
}
enum am_state activity_status() { return (state); }

void activity_monitor_start() {
// debug(1,"activity_monitor_start");
Expand Down
2 changes: 1 addition & 1 deletion activity_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ enum am_state { am_inactive, am_active, am_timing_out };
void activity_monitor_start();
void activity_monitor_stop();
void activity_monitor_signify_activity(int active); // 0 means inactive, non-zero means active
enum am_state activity_status(); // true if non inactive; false if inactive
enum am_state activity_status(); // true if non inactive; false if inactive
2 changes: 1 addition & 1 deletion audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void audio_ls_outputs(void) {
printf("Settings and options for the audio backend \"%s\":\n", (*out)->name);
(*out)->help();
} else {
printf("There are no settings or options for the audio backend \"%s\".\n", (*out)->name);
printf("There are no settings or options for the audio backend \"%s\".\n", (*out)->name);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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 c8b0be3

Please sign in to comment.