diff options
-rw-r--r-- | libs/audiographer/src/general/sample_format_converter.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libs/audiographer/src/general/sample_format_converter.cc b/libs/audiographer/src/general/sample_format_converter.cc index 5a48d496d7..9aa215db69 100644 --- a/libs/audiographer/src/general/sample_format_converter.cc +++ b/libs/audiographer/src/general/sample_format_converter.cc @@ -57,16 +57,12 @@ SampleFormatConverter<int32_t>::init (framecnt_t max_frames, int type, int data_ if(throw_level (ThrowObject) && data_width < 24) { throw Exception (*this, "Trying to use SampleFormatConverter<int32_t> for data widths < 24"); } - + init_common (max_frames); - - if (data_width == 24) { - dither = gdither_new ((GDitherType) type, channels, GDither32bit, data_width); - } else if (data_width == 32) { - dither = gdither_new (GDitherNone, channels, GDitherFloat, data_width); - } else if (throw_level (ThrowObject)) { - throw Exception (*this, "Unsupported data width"); - } + + // GDither is broken with GDither32bit if the dither depth + // is bigger than 24, so lets just use that... + dither = gdither_new (GDitherNone, channels, GDither32bit, 24); } template <> |