More fixes to allow gcc-10 to compile without error

This commit is contained in:
Mike Brady
2020-02-13 17:57:30 +00:00
parent f771774519
commit 85ba78b619
8 changed files with 25 additions and 18 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ struct sio_par par;
struct sndio_formats { struct sndio_formats {
const char *name; const char *name;
enum sps_format_t fmt; sps_format_t fmt;
unsigned int rate; unsigned int rate;
unsigned int bits; unsigned int bits;
unsigned int bps; unsigned int bps;
+4 -4
View File
@@ -24,10 +24,10 @@
#endif #endif
#if defined(CONFIG_DBUS_INTERFACE) || defined(CONFIG_MPRIS_INTERFACE) #if defined(CONFIG_DBUS_INTERFACE) || defined(CONFIG_MPRIS_INTERFACE)
enum dbus_session_type { typedef enum {
DBT_system = 0, // use the session bus DBT_system = 0, // use the session bus
DBT_session, // use the system bus DBT_session, // use the system bus
} dbt_type; } dbus_session_type;
#endif #endif
#define sps_extra_code_output_stalled 32768 #define sps_extra_code_output_stalled 32768
@@ -245,10 +245,10 @@ typedef struct {
yna_type use_precision_timing; // defaults to no yna_type use_precision_timing; // defaults to no
#if defined(CONFIG_DBUS_INTERFACE) #if defined(CONFIG_DBUS_INTERFACE)
enum dbus_session_type dbus_service_bus_type; dbus_session_type dbus_service_bus_type;
#endif #endif
#if defined(CONFIG_MPRIS_INTERFACE) #if defined(CONFIG_MPRIS_INTERFACE)
enum dbus_session_type mpris_service_bus_type; dbus_session_type mpris_service_bus_type;
#endif #endif
#ifdef CONFIG_METADATA_HUB #ifdef CONFIG_METADATA_HUB
+2
View File
@@ -45,6 +45,8 @@
#include <FFTConvolver/convolver.h> #include <FFTConvolver/convolver.h>
#endif #endif
ShairportSync *shairportSyncSkeleton;
int service_is_running = 0; int service_is_running = 0;
ShairportSyncDiagnostics *shairportSyncDiagnosticsSkeleton = NULL; ShairportSyncDiagnostics *shairportSyncDiagnosticsSkeleton = NULL;
+1 -1
View File
@@ -3,7 +3,7 @@
#define DBUS_SERVICE_H #define DBUS_SERVICE_H
#include "dbus-interface.h" #include "dbus-interface.h"
ShairportSync *shairportSyncSkeleton; extern ShairportSync *shairportSyncSkeleton;
int start_dbus_service(); int start_dbus_service();
void stop_dbus_service(); void stop_dbus_service();
+2
View File
@@ -58,6 +58,8 @@
#include <openssl/md5.h> #include <openssl/md5.h>
#endif #endif
struct metadata_bundle metadata_store;
int metadata_hub_initialised = 0; int metadata_hub_initialised = 0;
pthread_rwlock_t metadata_hub_re_lock = PTHREAD_RWLOCK_INITIALIZER; pthread_rwlock_t metadata_hub_re_lock = PTHREAD_RWLOCK_INITIALIZER;
+10 -10
View File
@@ -5,25 +5,25 @@
#define number_of_watchers 2 #define number_of_watchers 2
enum play_status_type { typedef enum {
PS_NOT_AVAILABLE = 0, PS_NOT_AVAILABLE = 0,
PS_STOPPED, PS_STOPPED,
PS_PAUSED, PS_PAUSED,
PS_PLAYING, PS_PLAYING,
} play_status_type; } play_status_type;
enum active_state_type { typedef enum {
AM_INACTIVE = 0, AM_INACTIVE = 0,
AM_ACTIVE, AM_ACTIVE,
} active_state_type; } active_state_type;
enum shuffle_status_type { typedef enum {
SS_NOT_AVAILABLE = 0, SS_NOT_AVAILABLE = 0,
SS_OFF, SS_OFF,
SS_ON, SS_ON,
} shuffle_status_type; } shuffle_status_type;
enum repeat_status_type { typedef enum {
RS_NOT_AVAILABLE = 0, RS_NOT_AVAILABLE = 0,
RS_OFF, RS_OFF,
RS_ONE, RS_ONE,
@@ -59,9 +59,9 @@ typedef struct metadata_bundle {
// used detect transitions between server activity being on or off // used detect transitions between server activity being on or off
// e.g. to reease metadata when a server goes inactive, but not if it's permanently // e.g. to reease metadata when a server goes inactive, but not if it's permanently
// inactive. // inactive.
enum play_status_type play_status; play_status_type play_status;
enum shuffle_status_type shuffle_status; shuffle_status_type shuffle_status;
enum repeat_status_type repeat_status; repeat_status_type repeat_status;
// the following pertain to the track playing // the following pertain to the track playing
@@ -123,9 +123,9 @@ typedef struct metadata_bundle {
// end // end
enum play_status_type play_status_type
player_state; // this is the state of the actual player itself, which can be a bit noisy. player_state; // this is the state of the actual player itself, which can be a bit noisy.
enum active_state_type active_state; active_state_type active_state;
int speaker_volume; // this is the actual speaker volume, allowing for the main volume and the int speaker_volume; // this is the actual speaker volume, allowing for the main volume and the
// speaker volume control // speaker volume control
@@ -136,7 +136,7 @@ typedef struct metadata_bundle {
} metadata_bundle; } metadata_bundle;
struct metadata_bundle metadata_store; extern struct metadata_bundle metadata_store;
void add_metadata_watcher(metadata_watcher fn, void *userdata); void add_metadata_watcher(metadata_watcher fn, void *userdata);
+3
View File
@@ -39,6 +39,9 @@
#include "metadata_hub.h" #include "metadata_hub.h"
#include "mpris-service.h" #include "mpris-service.h"
MediaPlayer2 *mprisPlayerSkeleton;
MediaPlayer2Player *mprisPlayerPlayerSkeleton;
double airplay_volume_to_mpris_volume(double sp) { double airplay_volume_to_mpris_volume(double sp) {
if (sp < -30.0) if (sp < -30.0)
sp = -30.0; sp = -30.0;
+2 -2
View File
@@ -4,8 +4,8 @@
#include "mpris-interface.h" #include "mpris-interface.h"
MediaPlayer2 *mprisPlayerSkeleton; extern MediaPlayer2 *mprisPlayerSkeleton;
MediaPlayer2Player *mprisPlayerPlayerSkeleton; extern MediaPlayer2Player *mprisPlayerPlayerSkeleton;
int start_mpris_service(); int start_mpris_service();