From 3766850c8b98b3fe8abb3b5634d4801cbdb95377 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 8 May 2009 01:56:21 +0200 Subject: core: introduce pa_{sink,source}_set_fixed_latency() This allows us to forward the fixed latency directly from the sink to the monitor source withut having to wait for pa_sink_put(). --- src/modules/bluetooth/module-bluetooth-device.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/bluetooth/module-bluetooth-device.c') diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index ecb5e83d..c5c55a18 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -1608,9 +1608,9 @@ static int add_sink(struct userdata *u) { u->sink->parent.process_msg = sink_process_msg; pa_sink_set_max_request(u->sink, u->block_size); - u->sink->fixed_latency = - (u->profile == PROFILE_A2DP ? FIXED_LATENCY_PLAYBACK_A2DP : FIXED_LATENCY_PLAYBACK_HSP) + - pa_bytes_to_usec(u->block_size, &u->sample_spec); + pa_sink_set_fixed_latency(u->sink, + (u->profile == PROFILE_A2DP ? FIXED_LATENCY_PLAYBACK_A2DP : FIXED_LATENCY_PLAYBACK_HSP) + + pa_bytes_to_usec(u->block_size, &u->sample_spec)); } if (u->profile == PROFILE_HSP) { @@ -1659,9 +1659,9 @@ static int add_source(struct userdata *u) { u->source->userdata = u; u->source->parent.process_msg = source_process_msg; - u->source->fixed_latency = - (/* u->profile == PROFILE_A2DP ? FIXED_LATENCY_RECORD_A2DP : */ FIXED_LATENCY_RECORD_HSP) + - pa_bytes_to_usec(u->block_size, &u->sample_spec); + pa_source_set_fixed_latency(u->source, + (/* u->profile == PROFILE_A2DP ? FIXED_LATENCY_RECORD_A2DP : */ FIXED_LATENCY_RECORD_HSP) + + pa_bytes_to_usec(u->block_size, &u->sample_spec)); } if (u->profile == PROFILE_HSP) { -- cgit