aboutsummaryrefslogtreecommitdiff
path: root/src/PcmFormat.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-31 22:43:28 +0100
committerMax Kellermann <max@duempel.org>2013-01-31 22:54:10 +0100
commitf2491c88c86707cc35c7dfc30a1b5a0a29886540 (patch)
treed7b2079f3122aa486b8717c916b596c421944f82 /src/PcmFormat.cxx
parent1b175025fecb1c10e6719d4ab79c188d473fccc4 (diff)
PcmDither: convert struct to a class
Diffstat (limited to 'src/PcmFormat.cxx')
-rw-r--r--src/PcmFormat.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/PcmFormat.cxx b/src/PcmFormat.cxx
index cf601684..50e15c91 100644
--- a/src/PcmFormat.cxx
+++ b/src/PcmFormat.cxx
@@ -33,17 +33,17 @@ pcm_convert_8_to_16(int16_t *out, const int8_t *in, const int8_t *in_end)
}
static void
-pcm_convert_24_to_16(struct pcm_dither *dither,
+pcm_convert_24_to_16(PcmDither &dither,
int16_t *out, const int32_t *in, const int32_t *in_end)
{
- pcm_dither_24_to_16(dither, out, in, in_end);
+ dither.Dither24To16(out, in, in_end);
}
static void
-pcm_convert_32_to_16(struct pcm_dither *dither,
+pcm_convert_32_to_16(PcmDither &dither,
int16_t *out, const int32_t *in, const int32_t *in_end)
{
- pcm_dither_32_to_16(dither, out, in, in_end);
+ dither.Dither32To16(out, in, in_end);
}
static void
@@ -70,7 +70,7 @@ pcm_allocate_8_to_16(struct pcm_buffer *buffer,
}
static int16_t *
-pcm_allocate_24p32_to_16(struct pcm_buffer *buffer, struct pcm_dither *dither,
+pcm_allocate_24p32_to_16(struct pcm_buffer *buffer, PcmDither &dither,
const int32_t *src, size_t src_size,
size_t *dest_size_r)
{
@@ -84,7 +84,7 @@ pcm_allocate_24p32_to_16(struct pcm_buffer *buffer, struct pcm_dither *dither,
}
static int16_t *
-pcm_allocate_32_to_16(struct pcm_buffer *buffer, struct pcm_dither *dither,
+pcm_allocate_32_to_16(struct pcm_buffer *buffer, PcmDither &dither,
const int32_t *src, size_t src_size,
size_t *dest_size_r)
{
@@ -112,7 +112,7 @@ pcm_allocate_float_to_16(struct pcm_buffer *buffer,
}
const int16_t *
-pcm_convert_to_16(struct pcm_buffer *buffer, struct pcm_dither *dither,
+pcm_convert_to_16(struct pcm_buffer *buffer, PcmDither &dither,
enum sample_format src_format, const void *src,
size_t src_size, size_t *dest_size_r)
{