aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-01-07 23:52:23 +0100
committerMax Kellermann <max@duempel.org>2011-01-07 23:52:23 +0100
commit1a2ea4c06cd9fd648bb0243a0dfd9e0b960a6788 (patch)
tree8a13ed86728b59caebd86dc7a1287c234b4985f1 /src/output
parenta800afcbf8845df0edc6aee3bb48036bba34e255 (diff)
parent8c0afd8557b1823e2df94c9f4de90c29eafbf035 (diff)
downloadmpd-1a2ea4c06cd9fd648bb0243a0dfd9e0b960a6788.tar.gz
mpd-1a2ea4c06cd9fd648bb0243a0dfd9e0b960a6788.tar.xz
mpd-1a2ea4c06cd9fd648bb0243a0dfd9e0b960a6788.zip
Merge branch 'v0.16.x'
Conflicts: NEWS configure.ac
Diffstat (limited to 'src/output')
-rw-r--r--src/output/httpd_client.c3
-rw-r--r--src/output/osx_plugin.c19
-rw-r--r--src/output/solaris_output_plugin.c2
3 files changed, 14 insertions, 10 deletions
diff --git a/src/output/httpd_client.c b/src/output/httpd_client.c
index 6bd095838..f5e14925b 100644
--- a/src/output/httpd_client.c
+++ b/src/output/httpd_client.c
@@ -29,6 +29,9 @@
#include <assert.h>
#include <string.h>
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "httpd_output"
+
struct httpd_client {
/**
* The httpd output object this client is connected to.
diff --git a/src/output/osx_plugin.c b/src/output/osx_plugin.c
index 9c3c2b1ba..b6d42c8f6 100644
--- a/src/output/osx_plugin.c
+++ b/src/output/osx_plugin.c
@@ -332,15 +332,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:
@@ -357,6 +348,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,
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",