do not crash when loading old history files with MIDI edits; add all notes in region...
[ardour.git] / libs / ardour / gdither.cc
index 7242f857c8f94f217ab73752a72213dece277514..7ad9bebd6ded3d1a7f8684e85af2f52817c43b55 100644 (file)
@@ -17,9 +17,9 @@
  *
  */
 
-#include <ardour/gdither_types_internal.h>
-#include <ardour/gdither.h>
-#include <ardour/noise.h>
+#include "ardour/gdither_types_internal.h"
+#include "ardour/gdither.h"
+#include "ardour/noise.h"
 
 /* this monstrosity is necessary to get access to lrintf() and random().
    whoever is writing the glibc headers <cmath> and <cstdlib> should be
@@ -387,7 +387,7 @@ void gdither_runf(GDither s, uint32_t channel, uint32_t length,
     }
 
     /* some common case handling code - looks a bit wierd, but it allows
-     * the compiler to optiomise out the branches in the inner loop */
+     * the compiler to optimise out the branches in the inner loop */
     if (s->bit_depth == 8 && s->dither_depth == 8) {
        switch (s->type) {
        case GDitherNone:
@@ -411,7 +411,7 @@ void gdither_runf(GDither s, uint32_t channel, uint32_t length,
                                ss, x, y, MAX_U8, MIN_U8);
            break;
        }
-    } else if (s->bit_depth == s->dither_depth == 16) {
+    } else if (s->bit_depth == 16 && s->dither_depth == 16) {
        switch (s->type) {
        case GDitherNone:
            gdither_innner_loop(GDitherNone, s->channels, 0.0f, SCALE_S16,