chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bcb960d
)
Quieten compiler
author
Richard Kettlewell
<rjk@greenend.org.uk>
Fri, 20 Nov 2009 13:04:28 +0000
(13:04 +0000)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Fri, 20 Nov 2009 13:04:28 +0000
(13:04 +0000)
lib/resample.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/resample.c
b/lib/resample.c
index de2358cdbfbdf7339f7b464a1efb4cdfa1434c26..a6498dd4180e77ecd54e75213de1447892e0ce3b 100644
(file)
--- a/
lib/resample.c
+++ b/
lib/resample.c
@@
-58,7
+58,6
@@
void resample_init(struct resampler *rs,
int output_bits, int output_channels,
int output_rate, int output_signed,
int output_endian) {
int output_bits, int output_channels,
int output_rate, int output_signed,
int output_endian) {
- int error_;
memset(rs, 0, sizeof *rs);
assert(input_bits == 8 || input_bits == 16);
assert(output_bits == 8 || output_bits == 16);
memset(rs, 0, sizeof *rs);
assert(input_bits == 8 || input_bits == 16);
assert(output_bits == 8 || output_bits == 16);
@@
-80,6
+79,7
@@
void resample_init(struct resampler *rs,
rs->input_bytes_per_frame = rs->input_channels * rs->input_bytes_per_sample;
if(rs->input_rate != rs->output_rate) {
#if HAVE_SAMPLERATE_H
rs->input_bytes_per_frame = rs->input_channels * rs->input_bytes_per_sample;
if(rs->input_rate != rs->output_rate) {
#if HAVE_SAMPLERATE_H
+ int error_;
rs->state = src_new(SRC_SINC_BEST_QUALITY, rs->output_channels, &error_);
if(!rs->state)
fatal(0, "calling src_new: %s", src_strerror(error_));
rs->state = src_new(SRC_SINC_BEST_QUALITY, rs->output_channels, &error_);
if(!rs->state)
fatal(0, "calling src_new: %s", src_strerror(error_));
@@
-96,6
+96,8
@@
void resample_close(struct resampler *rs) {
#if HAVE_SAMPLERATE_H
if(rs->state)
src_delete(rs->state);
#if HAVE_SAMPLERATE_H
if(rs->state)
src_delete(rs->state);
+#else
+ rs = 0; /* quieten compiler */
#endif
}
#endif
}
@@
-299,6
+301,7
@@
size_t resample_convert(const struct resampler *rs,
if(output != input)
xfree(output);
xfree(input);
if(output != input)
xfree(output);
xfree(input);
+ eof = 0; /* quieten compiler */
/* Report how many input bytes were actually consumed */
return nframesin * rs->input_bytes_per_frame;
}
/* Report how many input bytes were actually consumed */
return nframesin * rs->input_bytes_per_frame;
}