/* * Copyright (C) 2004 Steve Harris * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * $Id: ex1.c $ */ #include #include #include #define SIZE 256 #include "gdither.h" int main(int argc, char *argv[]) { GDither ds; float in[SIZE]; /* test input data */ double ind[SIZE]; /* test input data */ int32_t out32[SIZE]; /* test output data: 1 chan 32bit */ int16_t out16[SIZE][4]; /* test output data: 4 chan 16bit */ float outf[SIZE]; /* test output data: 1 chan float */ int i; /* --- Example 1a --- */ /* create an arbitrary sinewave for testing */ for (i=0; i