From 144ad7992e16f82bf068bf5f4b397729aeb40a61 Mon Sep 17 00:00:00 2001 From: Alex Viskovatoff Date: Tue, 21 Dec 2010 07:27:35 +0100 Subject: output/solaris: add missing parameter to open_cloexec() call --- src/output/solaris_output_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/output') diff --git a/src/output/solaris_output_plugin.c b/src/output/solaris_output_plugin.c index deb3298a5..22c583805 100644 --- a/src/output/solaris_output_plugin.c +++ b/src/output/solaris_output_plugin.c @@ -93,7 +93,7 @@ solaris_output_open(void *data, struct audio_format *audio_format, /* open the device in non-blocking mode */ - so->fd = open_cloexec(so->device, O_WRONLY|O_NONBLOCK); + so->fd = open_cloexec(so->device, O_WRONLY|O_NONBLOCK, 0); if (so->fd < 0) { g_set_error(error, solaris_output_quark(), errno, "Failed to open %s: %s", -- cgit v1.2.3 From b5645ab29f4be93ef43d9995f03b48b942cdaa14 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Jan 2011 17:15:37 +0100 Subject: output/osx: fix up audio format first, then apply it to device This is a MPD 0.16 regression: when playing a 24 bit file, the switch to 16 bit was made only partially, after mBytesPerPacket and mBytesPerFrame had already been applied. That means mBytesPerFrame referred to 24 bit, and mBitsPerChannel referred to 16 bits. Of course, that cannot work. --- src/output/osx_plugin.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/output') diff --git a/src/output/osx_plugin.c b/src/output/osx_plugin.c index 17d138d35..ce82656bd 100644 --- a/src/output/osx_plugin.c +++ b/src/output/osx_plugin.c @@ -214,15 +214,6 @@ osx_output_open(void *data, struct audio_format *audio_format, GError **error) stream_description.mSampleRate = audio_format->sample_rate; stream_description.mFormatID = kAudioFormatLinearPCM; stream_description.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger; -#if G_BYTE_ORDER == G_BIG_ENDIAN - stream_description.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian; -#endif - - stream_description.mBytesPerPacket = - audio_format_frame_size(audio_format); - stream_description.mFramesPerPacket = 1; - stream_description.mBytesPerFrame = stream_description.mBytesPerPacket; - stream_description.mChannelsPerFrame = audio_format->channels; switch (audio_format->format) { case SAMPLE_FORMAT_S8: @@ -239,6 +230,16 @@ osx_output_open(void *data, struct audio_format *audio_format, GError **error) break; } +#if G_BYTE_ORDER == G_BIG_ENDIAN + stream_description.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian; +#endif + + stream_description.mBytesPerPacket = + audio_format_frame_size(audio_format); + stream_description.mFramesPerPacket = 1; + stream_description.mBytesPerFrame = stream_description.mBytesPerPacket; + stream_description.mChannelsPerFrame = audio_format->channels; + result = AudioUnitSetProperty(od->au, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &stream_description, -- 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/output') 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