summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-sink.c
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-03-16 16:08:23 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-05-02 11:55:39 +0530
commit4fb68b91acef3cb37c014814d9e9de8ca9f22bf4 (patch)
tree6973ed69b167c3461d7e07cfaa50054a0455ac53 /src/modules/alsa/alsa-sink.c
parent9a39a3df10c3874bf0b5b091f721a6d8ab8750a5 (diff)
core: Factor out passthrough checks into their own functions
Since we currently have two mechanisms to signal a passthrough connection (non-PCM format or PA_SINK_INPUT_PASSTHROUGH flag), we move all the related checks into functions and use those everywhere. This makes things more consistent, and should we decide to get rid of the flag, we only need to change pa_sink_input_*_is_passthrough() accordingly.
Diffstat (limited to 'src/modules/alsa/alsa-sink.c')
-rw-r--r--src/modules/alsa/alsa-sink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 3f8f6d20..b98340b7 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1058,7 +1058,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
pa_sink_input *i = PA_SINK_INPUT(data);
int r = 0;
- if (PA_LIKELY(pa_format_info_is_pcm(i->format)))
+ if (PA_LIKELY(!pa_sink_input_is_passthrough(i)))
break;
u->old_rate = u->sink->sample_spec.rate;
@@ -1084,7 +1084,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
pa_sink_input *i = PA_SINK_INPUT(data);
int r = 0;
- if (PA_LIKELY(pa_format_info_is_pcm(i->format)))
+ if (PA_LIKELY(!pa_sink_input_is_passthrough(i)))
break;
/* Passthrough format, see if we need to reset sink sample rate */