[asterisk-commits] russell: branch russell/jack r93155 - /team/russell/jack/apps/app_jack.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Dec 15 13:49:29 CST 2007
Author: russell
Date: Sat Dec 15 13:49:29 2007
New Revision: 93155
URL: http://svn.digium.com/view/asterisk?view=rev&rev=93155
Log:
rename resampler to output_resampler
Modified:
team/russell/jack/apps/app_jack.c
Modified: team/russell/jack/apps/app_jack.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/apps/app_jack.c?view=diff&rev=93155&r1=93154&r2=93155
==============================================================================
--- team/russell/jack/apps/app_jack.c (original)
+++ team/russell/jack/apps/app_jack.c Sat Dec 15 13:49:29 2007
@@ -64,7 +64,7 @@
jack_port_t *output_port;
jack_ringbuffer_t *rb;
struct ast_smoother *smoother;
- void *resampler;
+ void *output_resampler;
double resample_factor;
unsigned int stop:1;
};
@@ -166,9 +166,9 @@
jack_data->smoother = NULL;
}
- if (jack_data->resampler) {
- resample_close(jack_data->resampler);
- jack_data->resampler = NULL;
+ if (jack_data->output_resampler) {
+ resample_close(jack_data->output_resampler);
+ jack_data->output_resampler = NULL;
}
}
@@ -243,7 +243,7 @@
do {
double from_srate, to_srate;
- if (jack_data->resampler)
+ if (jack_data->output_resampler)
break;
from_srate = 8000.0; /* XXX Hard coded 8 kHz */
@@ -257,14 +257,14 @@
jack_data->resample_factor = to_srate / from_srate;
- if (!(jack_data->resampler = resample_open(RESAMPLE_QUALITY,
+ if (!(jack_data->output_resampler = resample_open(RESAMPLE_QUALITY,
jack_data->resample_factor, jack_data->resample_factor))) {
- ast_log(LOG_ERROR, "Failed to open resampler\n");
+ ast_log(LOG_ERROR, "Failed to open output_resampler\n");
return -1;
}
} while (0);
- if (jack_data->resampler) {
+ if (jack_data->output_resampler) {
float in_buf[f->samples];
int in_buf_used = 0;
int out_buf_used = 0;
@@ -276,7 +276,7 @@
while (in_buf_used < sizeof(in_buf)) {
int res;
- res = resample_process(jack_data->resampler, jack_data->resample_factor,
+ res = resample_process(jack_data->output_resampler, jack_data->resample_factor,
&in_buf[in_buf_used / sizeof(in_buf[0])], sizeof(in_buf) - in_buf_used,
0, &in_buf_used,
&f_buf[out_buf_used / sizeof(f_buf[0])], sizeof(f_buf) - out_buf_used);
More information about the asterisk-commits
mailing list