summaryrefslogtreecommitdiffstats
path: root/polyp/protocol-esound.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-08-03 19:26:56 +0000
committerLennart Poettering <lennart@poettering.net>2004-08-03 19:26:56 +0000
commit24291aff27c671c11619684cb10d3b36fdf87c0d (patch)
tree25f5c7493a58b6d48b51fb1b9843fb39bbb77b8b /polyp/protocol-esound.c
parente10b918009446186c80584273d2e3f5e84a6670b (diff)
sample cache work
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@102 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/protocol-esound.c')
-rw-r--r--polyp/protocol-esound.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/polyp/protocol-esound.c b/polyp/protocol-esound.c
index 5db0442f..d80445de 100644
--- a/polyp/protocol-esound.c
+++ b/polyp/protocol-esound.c
@@ -312,7 +312,7 @@ static int esd_proto_stream_play(struct connection *c, esd_proto_t request, cons
assert(!c->input_memblockq);
l = (size_t) (pa_bytes_per_second(&ss)*PLAYBACK_BUFFER_SECONDS);
- c->input_memblockq = pa_memblockq_new(l, 0, pa_sample_size(&ss), l/2, l/PLAYBACK_BUFFER_FRAGMENTS);
+ c->input_memblockq = pa_memblockq_new(l, 0, pa_frame_size(&ss), l/2, l/PLAYBACK_BUFFER_FRAGMENTS);
assert(c->input_memblockq);
pa_iochannel_socket_set_rcvbuf(c->io, l/PLAYBACK_BUFFER_FRAGMENTS*2);
c->playback.fragment_size = l/10;
@@ -376,7 +376,7 @@ static int esd_proto_stream_record(struct connection *c, esd_proto_t request, co
assert(!c->output_memblockq);
l = (size_t) (pa_bytes_per_second(&ss)*RECORD_BUFFER_SECONDS);
- c->output_memblockq = pa_memblockq_new(l, 0, pa_sample_size(&ss), 0, 0);
+ c->output_memblockq = pa_memblockq_new(l, 0, pa_frame_size(&ss), 0, 0);
assert(c->output_memblockq);
pa_iochannel_socket_set_sndbuf(c->io, l/RECORD_BUFFER_FRAGMENTS*2);
@@ -936,7 +936,7 @@ static void sink_input_kill_cb(struct pa_sink_input *i) {
static uint32_t sink_input_get_latency_cb(struct pa_sink_input *i) {
struct connection*c = i->userdata;
assert(i && c);
- return pa_samples_usec(pa_memblockq_get_length(c->input_memblockq), &c->sink_input->sample_spec);
+ return pa_bytes_to_usec(pa_memblockq_get_length(c->input_memblockq), &c->sink_input->sample_spec);
}
/*** source_output callbacks ***/