diff options
author | Max Kellermann <max@duempel.org> | 2011-01-07 23:52:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-01-07 23:52:23 +0100 |
commit | 1a2ea4c06cd9fd648bb0243a0dfd9e0b960a6788 (patch) | |
tree | 8a13ed86728b59caebd86dc7a1287c234b4985f1 /src/output | |
parent | a800afcbf8845df0edc6aee3bb48036bba34e255 (diff) | |
parent | 8c0afd8557b1823e2df94c9f4de90c29eafbf035 (diff) | |
download | mpd-1a2ea4c06cd9fd648bb0243a0dfd9e0b960a6788.tar.gz mpd-1a2ea4c06cd9fd648bb0243a0dfd9e0b960a6788.tar.xz mpd-1a2ea4c06cd9fd648bb0243a0dfd9e0b960a6788.zip |
Merge branch 'v0.16.x'
Conflicts:
NEWS
configure.ac
Diffstat (limited to '')
-rw-r--r-- | src/output/httpd_client.c | 3 | ||||
-rw-r--r-- | src/output/osx_plugin.c | 19 | ||||
-rw-r--r-- | src/output/solaris_output_plugin.c | 2 | ||||
-rw-r--r-- | src/output_thread.c | 5 |
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; } |