" -m <mac addr>\t\tSet mac address, format: ab:cd:ef:12:34:56\n"
" -M <modelname>\tSet the squeezelite player model name sent to the server (default: " MODEL_NAME_STRING ")\n"
" -n <name>\t\tSet the player name\n"
-@@ -285,6 +286,8 @@ int main(int argc, char **argv) {
+@@ -292,6 +293,8 @@ int main(int argc, char **argv) {
extern bool user_rates;
char *logfile = NULL;
u8_t mac[6];
unsigned stream_buf_size = STREAMBUF_SIZE;
unsigned output_buf_size = 0; // set later
unsigned rates[MAX_SUPPORTED_SAMPLERATES] = { 0 };
-@@ -325,6 +328,7 @@ int main(int argc, char **argv) {
+@@ -332,6 +335,7 @@ int main(int argc, char **argv) {
int maxSampleRate = 0;
char *optarg = NULL;
int optind = 1;
int i;
-@@ -332,8 +336,6 @@ int main(int argc, char **argv) {
+@@ -339,8 +343,6 @@ int main(int argc, char **argv) {
#define MAXCMDLINE 512
char cmdline[MAXCMDLINE] = "";
for (i = 0; i < argc && (strlen(argv[i]) + strlen(cmdline) + 2 < MAXCMDLINE); i++) {
strcat(cmdline, argv[i]);
strcat(cmdline, " ");
-@@ -341,7 +343,7 @@ int main(int argc, char **argv) {
+@@ -348,7 +350,7 @@ int main(int argc, char **argv) {
while (optind < argc && strlen(argv[optind]) >= 2 && argv[optind][0] == '-') {
char *opt = argv[optind] + 1;
-- if (strstr("oabcCdefmMnNpPrs"
-+ if (strstr("oabcCdefImMnNpPrs"
+- if (strstr("oabcCdefmMnNpPrsZ"
++ if (strstr("oabcCdefImMnNpPrsZ"
#if ALSA
"UVO"
#endif
stream_init(log_stream, stream_buf_size);
if (!strcmp(output_device, "-")) {
-@@ -798,7 +808,7 @@ int main(int argc, char **argv) {
+@@ -801,7 +811,7 @@ int main(int argc, char **argv) {
exit(1);
}
stream_close();
--- a/slimproto.c
+++ b/slimproto.c
-@@ -113,7 +113,7 @@ void send_packet(u8_t *packet, size_t le
+@@ -119,7 +119,7 @@ void send_packet(u8_t *packet, size_t le
}
}
-static void sendHELO(bool reconnect, const char *fixed_cap, const char *var_cap, u8_t mac[6]) {
+static void sendHELO(bool reconnect, const char *fixed_cap, const char *var_cap, u8_t *mac) {
- #define BASE_CAP "Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION
+ #define BASE_CAP "Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Balance=1,Firmware=" VERSION
#define SSL_CAP "CanHTTPS=1"
const char *base_cap;
-@@ -761,7 +761,7 @@ void wake_controller(void) {
+@@ -768,7 +768,7 @@ void wake_controller(void) {
wake_signal(wake_e);
}
struct sockaddr_in d;
struct sockaddr_in s;
char *buf;
-@@ -778,7 +778,7 @@ in_addr_t discover_server(char *default_
+@@ -785,7 +785,7 @@ in_addr_t discover_server(char *default_
memset(&d, 0, sizeof(d));
d.sin_family = AF_INET;
d.sin_port = htons(PORT);
pollinfo.fd = disc_sock;
pollinfo.events = POLLIN;
-@@ -813,7 +813,7 @@ in_addr_t discover_server(char *default_
+@@ -820,7 +820,7 @@ in_addr_t discover_server(char *default_
#define FIXED_CAP_LEN 256
#define VAR_CAP_LEN 128
struct sockaddr_in serv_addr;
static char fixed_cap[FIXED_CAP_LEN], var_cap[VAR_CAP_LEN] = "";
bool reconnect = false;
-@@ -834,7 +834,7 @@ void slimproto(log_level level, char *se
+@@ -841,7 +841,7 @@ void slimproto(log_level level, char *se
}
if (!slimproto_ip) {
}
if (!slimproto_port) {
-@@ -915,7 +915,7 @@ void slimproto(log_level level, char *se
+@@ -926,7 +926,7 @@ void slimproto(log_level level, char *se
// rediscover server if it was not set at startup
if (!server && ++failed_connect > 5) {
} else {
--- a/squeezelite.h
+++ b/squeezelite.h
-@@ -455,7 +455,7 @@ char* strcasestr(const char *haystack, c
+@@ -456,7 +456,7 @@ char* strcasestr(const char *haystack, c
char *next_param(char *src, char c);
u32_t gettime_ms(void);
void set_nonblock(sockfd s);
int connect_timeout(sockfd sock, const struct sockaddr *addr, socklen_t addrlen, int timeout);
void server_addr(char *server, in_addr_t *ip_ptr, unsigned *port_ptr);
-@@ -511,7 +511,7 @@ void buf_init(struct buffer *buf, size_t
+@@ -513,7 +513,7 @@ void buf_init(struct buffer *buf, size_t
void buf_destroy(struct buffer *buf);
// slimproto.c
// logging functions
const char *logtime(void) {
static char buf[100];
-@@ -119,58 +115,94 @@ u32_t gettime_ms(void) {
+@@ -120,58 +116,94 @@ u32_t gettime_ms(void) {
#endif
}
#if SUN
void get_mac(u8_t mac[]) {
struct arpreq parpreq;
-@@ -237,30 +269,6 @@ void get_mac(u8_t mac[]) {
+@@ -238,30 +270,6 @@ void get_mac(u8_t mac[]) {
}
#endif
--- a/Makefile
+++ b/Makefile
-@@ -22,7 +22,7 @@ OPT_OPUS = -DOPUS
+@@ -24,7 +24,7 @@ OPT_PULSEAUDIO = -DPULSEAUDIO
SOURCES = \
main.c slimproto.c buffer.c stream.c utils.c \
- output.c output_alsa.c output_pa.c output_stdout.c output_pack.c decode.c \
+ output.c output_alsa.c output_pa.c output_stdout.c output_pack.c output_pulse.c decode.c \
- flac.c pcm.c mad.c vorbis.c mpg.c
+ flac.c pcm.c vorbis.c mpg.c
SOURCES_DSD = dsd.c dop.c dsd2pcm/dsd2pcm.c
SOURCES_FF = ffmpeg.c
-@@ -40,7 +40,7 @@ LINK_LINUX = -ldl
+@@ -45,7 +45,7 @@ LINK_PULSEAUDIO = -lpulse
LINK_SSL = -lssl -lcrypto
LINK_ALAC = -lalac
LINKALL_IR = -llirc_client
--- a/decode.c
+++ b/decode.c
-@@ -184,11 +184,7 @@ void decode_init(log_level level, const
+@@ -183,11 +183,7 @@ void decode_init(log_level level, const
if (!strstr(exclude_codecs, "pcm") && (!include_codecs || (order_codecs = strstr(include_codecs, "pcm"))))
sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_pcm());
--- a/squeezelite.h
+++ b/squeezelite.h
-@@ -190,7 +190,6 @@
+@@ -191,7 +191,6 @@
#if LINUX
#define LIBFLAC "libFLAC.so.8"
#define LIBMPG "libmpg123.so.0"
#define LIBVORBIS "libvorbisfile.so.3"
#define LIBOPUS "libopusfile.so.0"
-@@ -205,7 +204,6 @@
+@@ -206,7 +205,6 @@
#if OSX
#define LIBFLAC "libFLAC.8.dylib"
#define LIBMPG "libmpg123.0.dylib"
#define LIBVORBIS "libvorbisfile.3.dylib"
#define LIBTREMOR "libvorbisidec.1.dylib"
-@@ -219,7 +217,6 @@
+@@ -220,7 +218,6 @@
#if WIN
#define LIBFLAC "libFLAC.dll"
#define LIBMPG "libmpg123-0.dll"
#define LIBVORBIS "libvorbisfile.dll"
#define LIBOPUS "libopusfile-0.dll"
-@@ -233,7 +230,6 @@
+@@ -234,7 +231,6 @@
#if FREEBSD
#define LIBFLAC "libFLAC.so.8"