ext/esd/esdsink.c: Always write ESD_BUF_SIZE bytes and use ESD_MAX_WRITE_SIZE as the size of the ringbuffer. This sho...
Original commit message from CVS: * ext/esd/esdsink.c: (gst_esdsink_prepare), (gst_esdsink_delay): Always write ESD_BUF_SIZE bytes and use ESD_MAX_WRITE_SIZE as the size of the ringbuffer. This should fix hangs with older esd sound servers.
This commit is contained in:
parent
0835d42268
commit
a3fca5680b
@ -1,3 +1,10 @@
|
|||||||
|
2006-04-26 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* ext/esd/esdsink.c: (gst_esdsink_prepare), (gst_esdsink_delay):
|
||||||
|
Always write ESD_BUF_SIZE bytes and use ESD_MAX_WRITE_SIZE as
|
||||||
|
the size of the ringbuffer. This should fix hangs with older
|
||||||
|
esd sound servers.
|
||||||
|
|
||||||
2006-04-26 Stefan Kost <ensonic@users.sf.net>
|
2006-04-26 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* ext/aalib/gstaasink.c:
|
* ext/aalib/gstaasink.c:
|
||||||
|
@ -270,7 +270,6 @@ gst_esdsink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
|
|||||||
|
|
||||||
/* Name used by esound for this connection. */
|
/* Name used by esound for this connection. */
|
||||||
const char connname[] = "GStreamer";
|
const char connname[] = "GStreamer";
|
||||||
guint latency;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (esdsink, "prepare");
|
GST_DEBUG_OBJECT (esdsink, "prepare");
|
||||||
|
|
||||||
@ -310,11 +309,8 @@ gst_esdsink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
|
|||||||
|
|
||||||
esdsink->rate = spec->rate;
|
esdsink->rate = spec->rate;
|
||||||
|
|
||||||
latency = esd_get_latency (esdsink->ctrl_fd);
|
spec->segsize = ESD_BUF_SIZE;
|
||||||
latency = latency * 44100LL / esdsink->rate;
|
spec->segtotal = (ESD_MAX_WRITE_SIZE / spec->segsize);
|
||||||
|
|
||||||
spec->segsize = 256 * spec->bytes_per_sample;
|
|
||||||
spec->segtotal = (latency / 256);
|
|
||||||
spec->silence_sample[0] = 0;
|
spec->silence_sample[0] = 0;
|
||||||
spec->silence_sample[1] = 0;
|
spec->silence_sample[1] = 0;
|
||||||
spec->silence_sample[2] = 0;
|
spec->silence_sample[2] = 0;
|
||||||
@ -402,7 +398,8 @@ gst_esdsink_delay (GstAudioSink * asink)
|
|||||||
|
|
||||||
latency = esd_get_latency (esdsink->ctrl_fd);
|
latency = esd_get_latency (esdsink->ctrl_fd);
|
||||||
|
|
||||||
/* latency is measured in samples at a rate of 44100 */
|
/* latency is measured in samples at a rate of 44100, this
|
||||||
|
* cannot overflow. */
|
||||||
latency = latency * 44100LL / esdsink->rate;
|
latency = latency * 44100LL / esdsink->rate;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (asink, "got latency: %u", latency);
|
GST_DEBUG_OBJECT (asink, "got latency: %u", latency);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user