chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move ENDIAN_ constants to new byte-order.h.
[disorder]
/
lib
/
resample.c
diff --git
a/lib/resample.c
b/lib/resample.c
index 11cb6960f359a187d91cde94110efae43c90b5f7..99879a4a87423558d3da1ff50364eadbc6e03442 100644
(file)
--- a/
lib/resample.c
+++ b/
lib/resample.c
@@
-274,7
+274,7
@@
size_t resample_convert(const struct resampler *rs,
data.input_frames = nframesin;
data.output_frames = maxframesout;
data.end_of_input = eof;
data.input_frames = nframesin;
data.output_frames = maxframesout;
data.end_of_input = eof;
- data.src_ratio = rs->output_rate / rs->input_rate;
+ data.src_ratio =
(double)
rs->output_rate / rs->input_rate;
int error_ = src_process(rs->state, &data);
if(error_)
disorder_fatal(0, "calling src_process: %s", src_strerror(error_));
int error_ = src_process(rs->state, &data);
if(error_)
disorder_fatal(0, "calling src_process: %s", src_strerror(error_));
@@
-303,6
+303,7
@@
size_t resample_convert(const struct resampler *rs,
xfree(input);
eof = 0; /* quieten compiler */
/* Report how many input bytes were actually consumed */
xfree(input);
eof = 0; /* quieten compiler */
/* Report how many input bytes were actually consumed */
+ //fprintf(stderr, "converted %zu frames\n", nframesin);
return nframesin * rs->input_bytes_per_frame;
}
return nframesin * rs->input_bytes_per_frame;
}