[pulseaudio-discuss] [PATCH] core: sample_spec.rate is in Hz, not kHz; change logging output
Peter Meerwald
pmeerw at pmeerw.net
Mon Dec 19 03:28:42 PST 2011
From: Peter Meerwald <p.meerwald at bct-electronic.com>
---
src/pulsecore/sink-input.c | 8 ++++----
src/pulsecore/sink.c | 2 +-
src/pulsecore/source-output.c | 8 ++++----
src/pulsecore/source.c | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 7db8a4c..23b6b4b 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -376,10 +376,10 @@ int pa_sink_input_new(
pa_log_info("Trying to change sample rate");
if (pa_sink_update_rate(data->sink, data->sample_spec.rate, pa_sink_input_new_data_is_passthrough(data)) == TRUE)
- pa_log_info("Rate changed to %u kHz",
+ pa_log_info("Rate changed to %u Hz",
data->sink->sample_spec.rate);
else
- pa_log_info("Resampling enabled to %u kHz", data->sink->sample_spec.rate);
+ pa_log_info("Resampling enabled to %u Hz", data->sink->sample_spec.rate);
}
/* Due to the fixing of the sample spec the volume might not match anymore */
@@ -1642,10 +1642,10 @@ int pa_sink_input_finish_move(pa_sink_input *i, pa_sink *dest, pa_bool_t save) {
pa_log_info("Trying to change sample rate");
if (pa_sink_update_rate(dest, i->sample_spec.rate, pa_sink_input_is_passthrough(i)) == TRUE)
- pa_log_info("Rate changed to %u kHz",
+ pa_log_info("Rate changed to %u Hz",
dest->sample_spec.rate);
else
- pa_log_info("Resampling enabled to %u kHz",
+ pa_log_info("Resampling enabled to %u Hz",
dest->sample_spec.rate);
}
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 9a43a1c..81c6e9d 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1316,7 +1316,7 @@ pa_bool_t pa_sink_update_rate(pa_sink *s, uint32_t rate, pa_bool_t passthrough)
}
if (PA_SINK_IS_RUNNING(s->state)) {
- pa_log_info("Cannot update rate, SINK_IS_RUNNING, will keep using %u kHz",
+ pa_log_info("Cannot update rate, SINK_IS_RUNNING, will keep using %u Hz",
s->sample_spec.rate);
return FALSE;
}
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 7b0cb84..049046a 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -355,10 +355,10 @@ int pa_source_output_new(
pa_log_info("Trying to change sample rate");
if (pa_source_update_rate(data->source, data->sample_spec.rate, pa_source_output_new_data_is_passthrough(data)) == TRUE)
- pa_log_info("Rate changed to %u kHz",
+ pa_log_info("Rate changed to %u Hz",
data->source->sample_spec.rate);
else
- pa_log_info("Resampling enabled to %u kHz", data->source->sample_spec.rate);
+ pa_log_info("Resampling enabled to %u Hz", data->source->sample_spec.rate);
}
if (data->resample_method == PA_RESAMPLER_INVALID)
@@ -1410,10 +1410,10 @@ int pa_source_output_finish_move(pa_source_output *o, pa_source *dest, pa_bool_t
pa_log_info("Trying to change sample rate");
if (pa_source_update_rate(dest, o->sample_spec.rate, pa_source_output_is_passthrough(o)) == TRUE)
- pa_log_info("Rate changed to %u kHz",
+ pa_log_info("Rate changed to %u Hz",
dest->sample_spec.rate);
else
- pa_log_info("Resampling enabled to %u kHz",
+ pa_log_info("Resampling enabled to %u Hz",
dest->sample_spec.rate);
}
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 14e04ed..f7196cf 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -931,7 +931,7 @@ pa_bool_t pa_source_update_rate(pa_source *s, uint32_t rate, pa_bool_t passthrou
}
if (PA_SOURCE_IS_RUNNING(s->state)) {
- pa_log_info("Cannot update rate, SOURCE_IS_RUNNING, will keep using %u kHz",
+ pa_log_info("Cannot update rate, SOURCE_IS_RUNNING, will keep using %u Hz",
s->sample_spec.rate);
return FALSE;
}
--
1.7.4.1
More information about the pulseaudio-discuss
mailing list