From 546232b1c02d4e2c408eb9b0055068fc8204e977 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 21 Dec 2010 19:54:44 +0100 Subject: zeroconf-bonjour: use g_htons() instead of htons() Fixes the gcc warning "implicit declaration of function 'htons'". --- src/zeroconf-bonjour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/zeroconf-bonjour.c b/src/zeroconf-bonjour.c index 4e06319e7..6ad2a2bac 100644 --- a/src/zeroconf-bonjour.c +++ b/src/zeroconf-bonjour.c @@ -62,7 +62,7 @@ void init_zeroconf_osx(const char *serviceName) DNSServiceErrorType error = DNSServiceRegister(&dnsReference, 0, 0, serviceName, SERVICE_TYPE, NULL, NULL, - htons(listen_port), 0, + g_htons(listen_port), 0, NULL, dnsRegisterCallback, NULL); -- cgit v1.2.3 From 60b4f6b3eb789f7e96939b770bfc84cd5f569ca4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 21 Dec 2010 19:53:17 +0100 Subject: directory: fix warning "comparison between signed and unsigned" Cast the constant to dev_t, not to unsigned. --- src/directory.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/directory.h b/src/directory.h index 8207bd3a2..ac2310429 100644 --- a/src/directory.h +++ b/src/directory.h @@ -28,8 +28,8 @@ #define DIRECTORY_DIR "directory: " -#define DEVICE_INARCHIVE (unsigned)(-1) -#define DEVICE_CONTAINER (unsigned)(-2) +#define DEVICE_INARCHIVE (dev_t)(-1) +#define DEVICE_CONTAINER (dev_t)(-2) struct directory { struct dirvec children; -- cgit v1.2.3 From 4f2d67dfb036e38be3bdb67d95eeb64bb7747d4f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Jan 2011 18:00:12 +0100 Subject: output/httpd: define G_LOG_DOMAIN in httpd_client.c --- src/output/httpd_client.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/output/httpd_client.c b/src/output/httpd_client.c index 52a398e3b..adbdf7326 100644 --- a/src/output/httpd_client.c +++ b/src/output/httpd_client.c @@ -27,6 +27,9 @@ #include #include +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "httpd_output" + struct httpd_client { /** * The httpd output object this client is connected to. -- cgit v1.2.3 From 0022fb100b7d22b9612474ebee944e66c2a7b33b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Jan 2011 19:37:39 +0100 Subject: encoder/lame: explicitly configure the output sample rate When you don't explicitly set an output sample rate, liblame tries to guess an output sample rate from the input sample rate. You would think that this "guessing" consists of just setting both equal, but that is not the case. For 44.1kHz at 96kbit/s, liblame chooses 32kHz. This patch explicitly configures the output sample rate, to stop the bad guessing. --- src/encoder/lame_encoder.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/encoder/lame_encoder.c b/src/encoder/lame_encoder.c index acaf4470f..6c8f20890 100644 --- a/src/encoder/lame_encoder.c +++ b/src/encoder/lame_encoder.c @@ -169,6 +169,13 @@ lame_encoder_setup(struct lame_encoder *encoder, GError **error) return false; } + if (0 != lame_set_out_samplerate(encoder->gfp, + encoder->audio_format.sample_rate)) { + g_set_error(error, lame_encoder_quark(), 0, + "error setting lame out sample rate"); + return false; + } + if (0 > lame_init_params(encoder->gfp)) { g_set_error(error, lame_encoder_quark(), 0, "error initializing lame params"); -- cgit v1.2.3