output/jack: workaround for libjack1 crash bug
This commit is contained in:
parent
d8e423df1a
commit
e7a1862517
1
NEWS
1
NEWS
@ -4,6 +4,7 @@ ver 0.16.8 (2012/??/??)
|
|||||||
- vorbis (and others): fix seeking at startup
|
- vorbis (and others): fix seeking at startup
|
||||||
- ffmpeg: read the "year" tag
|
- ffmpeg: read the "year" tag
|
||||||
* output:
|
* output:
|
||||||
|
- jack: workaround for libjack1 crash bug
|
||||||
- osx: fix stuttering due to buffering bug
|
- osx: fix stuttering due to buffering bug
|
||||||
* fix endless loop in text file reader
|
* fix endless loop in text file reader
|
||||||
* update: skip symlinks in path that is to be updated
|
* update: skip symlinks in path that is to be updated
|
||||||
|
@ -143,6 +143,13 @@ mpd_jack_process(jack_nframes_t nframes, void *arg)
|
|||||||
|
|
||||||
for (unsigned i = 0; i < jd->audio_format.channels; ++i) {
|
for (unsigned i = 0; i < jd->audio_format.channels; ++i) {
|
||||||
out = jack_port_get_buffer(jd->ports[i], nframes);
|
out = jack_port_get_buffer(jd->ports[i], nframes);
|
||||||
|
if (out == NULL)
|
||||||
|
/* workaround for libjack1 bug: if the server
|
||||||
|
connection fails, the process callback is
|
||||||
|
invoked anyway, but unable to get a
|
||||||
|
buffer */
|
||||||
|
continue;
|
||||||
|
|
||||||
jack_ringbuffer_read(jd->ringbuffer[i],
|
jack_ringbuffer_read(jd->ringbuffer[i],
|
||||||
(char *)out, available * jack_sample_size);
|
(char *)out, available * jack_sample_size);
|
||||||
|
|
||||||
@ -156,6 +163,12 @@ mpd_jack_process(jack_nframes_t nframes, void *arg)
|
|||||||
for (unsigned i = jd->audio_format.channels;
|
for (unsigned i = jd->audio_format.channels;
|
||||||
i < jd->num_source_ports; ++i) {
|
i < jd->num_source_ports; ++i) {
|
||||||
out = jack_port_get_buffer(jd->ports[i], nframes);
|
out = jack_port_get_buffer(jd->ports[i], nframes);
|
||||||
|
if (out == NULL)
|
||||||
|
/* workaround for libjack1 bug: if the server
|
||||||
|
connection fails, the process callback is
|
||||||
|
invoked anyway, but unable to get a
|
||||||
|
buffer */
|
||||||
|
continue;
|
||||||
|
|
||||||
for (jack_nframes_t f = 0; f < nframes; ++f)
|
for (jack_nframes_t f = 0; f < nframes; ++f)
|
||||||
out[f] = 0.0;
|
out[f] = 0.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user