aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
Diffstat (limited to '')
-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
-rw-r--r--src/output_thread.c5
4 files changed, 15 insertions, 14 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",
diff --git a/src/output_thread.c b/src/output_thread.c
index 380956fac..a5244c693 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -303,7 +303,7 @@ ao_wait(struct audio_output *ao)
GTimeVal tv;
g_get_current_time(&tv);
g_time_val_add(&tv, delay * 1000);
- g_cond_timed_wait(ao->cond, ao->mutex, &tv);
+ (void)g_cond_timed_wait(ao->cond, ao->mutex, &tv);
if (ao->command != AO_COMMAND_NONE)
return false;
@@ -463,12 +463,9 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk)
/* don't automatically reopen this device for
10 seconds */
- g_mutex_lock(ao->mutex);
-
assert(ao->fail_timer == NULL);
ao->fail_timer = g_timer_new();
- g_mutex_unlock(ao->mutex);
return false;
}