aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-17 19:26:32 +0100
committerMax Kellermann <max@duempel.org>2009-02-17 19:26:32 +0100
commit656d5c9c7b28609b081e545abd39a0aabfe3d8eb (patch)
tree42325cc16b318de3dbd597090488f54dbb010e38
parentac3e2de28b4ff951306f669810e5e4269cfefb28 (diff)
downloadmpd-656d5c9c7b28609b081e545abd39a0aabfe3d8eb.tar.gz
mpd-656d5c9c7b28609b081e545abd39a0aabfe3d8eb.tar.xz
mpd-656d5c9c7b28609b081e545abd39a0aabfe3d8eb.zip
pcm_convert: removed pcm_convert_size()
The function is unused, since we added the pcm_buffer library.
Diffstat (limited to '')
-rw-r--r--src/pcm_convert.c17
-rw-r--r--src/pcm_convert.h3
2 files changed, 0 insertions, 20 deletions
diff --git a/src/pcm_convert.c b/src/pcm_convert.c
index 42d72e367..dbef443dd 100644
--- a/src/pcm_convert.c
+++ b/src/pcm_convert.c
@@ -146,20 +146,3 @@ pcm_convert(struct pcm_convert_state *state,
return 0;
}
}
-
-size_t pcm_convert_size(const struct audio_format *inFormat, size_t src_size,
- const struct audio_format *outFormat)
-{
- const double ratio = (double)outFormat->sample_rate /
- (double)inFormat->sample_rate;
- size_t dest_size = src_size;
-
- /* no partial frames allowed */
- assert((src_size % audio_format_frame_size(inFormat)) == 0);
-
- dest_size /= audio_format_frame_size(inFormat);
- dest_size = ceil((double)dest_size * ratio);
- dest_size *= audio_format_frame_size(outFormat);
-
- return dest_size;
-}
diff --git a/src/pcm_convert.h b/src/pcm_convert.h
index 49dc64973..18a1dbc49 100644
--- a/src/pcm_convert.h
+++ b/src/pcm_convert.h
@@ -48,7 +48,4 @@ pcm_convert(struct pcm_convert_state *state,
const struct audio_format *dest_format,
size_t *dest_size_r);
-size_t pcm_convert_size(const struct audio_format *inFormat, size_t inSize,
- const struct audio_format *outFormat);
-
#endif