diff options
author | Sakari Bergen <sakari.bergen@beatwaves.net> | 2013-02-03 14:51:08 +0000 |
---|---|---|
committer | Sakari Bergen <sakari.bergen@beatwaves.net> | 2013-02-03 14:51:08 +0000 |
commit | 1550f1ef007f58bab1b529d9b9a4a820cf8e9fa6 (patch) | |
tree | 8562a60d6d5c94050be002311c8331d28e702dd8 /libs | |
parent | 6dbfeaf1649022731c305d9d06ca9ce7f9e034b2 (diff) |
Work around a bug in gdither with 32-bit integer export, fixes 32-bit export.
git-svn-id: svn://localhost/ardour2/branches/3.0@14047 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-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 <> |