mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
ext/Makefile.am: Fix build.
Original commit message from CVS: * ext/Makefile.am: Fix build. * ext/jack/gstjackaudiosink.c: (jack_process_cb), (jack_sample_rate_cb), (jack_buffer_size_cb), (jack_shutdown_cb), (gst_jack_ring_buffer_acquire): Small cleanups.
This commit is contained in:
parent
76c1316131
commit
1001e1d1e0
3 changed files with 17 additions and 4 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2006-11-30 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/Makefile.am:
|
||||
Fix build.
|
||||
|
||||
* ext/jack/gstjackaudiosink.c: (jack_process_cb),
|
||||
(jack_sample_rate_cb), (jack_buffer_size_cb), (jack_shutdown_cb),
|
||||
(gst_jack_ring_buffer_acquire):
|
||||
Small cleanups.
|
||||
|
||||
2006-11-30 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* configure.ac:
|
||||
|
|
|
@ -291,6 +291,7 @@ DIST_SUBDIRS= \
|
|||
faad \
|
||||
gsm \
|
||||
ivorbis \
|
||||
jack \
|
||||
libmms \
|
||||
dts \
|
||||
divx \
|
||||
|
|
|
@ -196,28 +196,30 @@ jack_process_cb (jack_nframes_t nframes, void *arg)
|
|||
if (gst_ring_buffer_prepare_read (buf, &readseg, &readptr, &len)) {
|
||||
flen = len / channels;
|
||||
|
||||
/* the number of samples must be exactly the segment size */
|
||||
if (nframes * sizeof (sample_t) != flen)
|
||||
goto wrong_size;
|
||||
|
||||
/* copy samples */
|
||||
GST_DEBUG ("copy %d frames: %p, %d bytes, %d channels", nframes, readptr,
|
||||
flen, channels);
|
||||
data = (sample_t *) readptr;
|
||||
|
||||
/* copy and interleave into target buffers */
|
||||
/* the samples in the ringbuffer have the channels interleaved, we need to
|
||||
* deinterleave into the jack target buffers */
|
||||
for (i = 0; i < nframes; i++) {
|
||||
for (j = 0; j < channels; j++) {
|
||||
buffers[j][i] = *data++;
|
||||
}
|
||||
}
|
||||
|
||||
/* clear written samples */
|
||||
/* clear written samples in the ringbuffer */
|
||||
gst_ring_buffer_clear (buf, readseg);
|
||||
|
||||
/* we wrote one segment */
|
||||
gst_ring_buffer_advance (buf, 1);
|
||||
} else {
|
||||
/* write silence to all buffers */
|
||||
/* We are not allowed to read from the ringbuffer, write silence to all
|
||||
* jack output buffers */
|
||||
for (i = 0; i < channels; i++) {
|
||||
memset (buffers[i], 0, nframes * sizeof (sample_t));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue