diff options
Diffstat (limited to 'src/audio_out')
-rw-r--r-- | src/audio_out/audio_file_out.c | 16 | ||||
-rw-r--r-- | src/audio_out/audio_jack_out.c | 5 | ||||
-rw-r--r-- | src/audio_out/audio_pulse_out.c | 3 |
3 files changed, 16 insertions, 8 deletions
diff --git a/src/audio_out/audio_file_out.c b/src/audio_out/audio_file_out.c index 4f4e6bc47..0a4471a19 100644 --- a/src/audio_out/audio_file_out.c +++ b/src/audio_out/audio_file_out.c @@ -274,10 +274,20 @@ static void ao_file_close(ao_driver_t *this_gen) this->fname, this->bytes_written / 1024); if (lseek(this->fd, 40, SEEK_SET) != -1) { - write(this->fd, &len, 4); + if (write(this->fd, &len, 4) != 4) { + xprintf (this->xine, XINE_VERBOSITY_LOG, "audio_file_out: Failed to write header to file '%s': %s\n", + this->fname, strerror(errno)); + } + len = le2me_32(this->bytes_written + 0x24); - if (lseek(this->fd, 4, SEEK_SET) != -1) - write(this->fd, &len, 4); + if (lseek(this->fd, 4, SEEK_SET) != -1) { + if (write(this->fd, &len, 4) != 4) { + xprintf (this->xine, XINE_VERBOSITY_LOG, + "audio_file_out: Failed to write header to file '%s': %s\n", + this->fname, strerror(errno)); + } + } + } close(this->fd); diff --git a/src/audio_out/audio_jack_out.c b/src/audio_out/audio_jack_out.c index eca1263ed..975a5f38a 100644 --- a/src/audio_out/audio_jack_out.c +++ b/src/audio_out/audio_jack_out.c @@ -278,12 +278,13 @@ static int jack_callback (jack_nframes_t nframes, void *arg) return 0; } - +#if 0 static void jack_shutdown (void *arg) { jack_driver_t *this = (jack_driver_t *) arg; this->client = NULL; } +#endif /* * Open the Jack audio device @@ -295,7 +296,6 @@ static int jack_open_device (ao_driver_t *this_gen, char *jack_device, { jack_driver_t *this = (jack_driver_t *) this_gen; const char **matching_ports = NULL; - char *port_name = NULL; jack_client_t *client = this->client; int port_flags = JackPortIsInput; @@ -686,7 +686,6 @@ static ao_driver_t *open_jack_plugin (audio_driver_class_t *class_gen, uint32_t rate; char *jack_device; const char **matching_ports = NULL; - const char **port_names; /* for usability reasons, keep this in sync with audio_oss_out.c */ static char *speaker_arrangement[] = { diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index bd057501b..5370389c7 100644 --- a/src/audio_out/audio_pulse_out.c +++ b/src/audio_out/audio_pulse_out.c @@ -360,7 +360,6 @@ static int ao_pulse_open(ao_driver_t *this_gen, pulse_driver_t *this = (pulse_driver_t *) this_gen; pa_sample_spec ss; pa_channel_map cm; - int r; xprintf (this->xine, XINE_VERBOSITY_DEBUG, "audio_pulse_out: ao_open bits=%d rate=%d, mode=%d\n", bits, rate, mode); @@ -466,7 +465,7 @@ static int ao_pulse_open(ao_driver_t *this_gen, pa_stream_set_write_callback(this->stream, __xine_pa_stream_request_callback, this); pa_stream_set_latency_update_callback(this->stream, __xine_pa_stream_notify_callback, this); - r = pa_stream_connect_playback(this->stream, this->sink, NULL, + pa_stream_connect_playback(this->stream, this->sink, NULL, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL); |