srates.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (c) 1983-2013 Trevor Wishart and Composers Desktop Project Ltd
  3. * http://www.trevorwishart.co.uk
  4. * http://www.composersdesktop.com
  5. *
  6. This file is part of the CDP System.
  7. The CDP System is free software; you can redistribute it
  8. and/or modify it under the terms of the GNU Lesser General Public
  9. License as published by the Free Software Foundation; either
  10. version 2.1 of the License, or (at your option) any later version.
  11. The CDP System is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU Lesser General Public License for more details.
  15. You should have received a copy of the GNU Lesser General Public
  16. License along with the CDP System; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  18. 02111-1307 USA
  19. *
  20. */
  21. /*rates.h: portable set of defines for sample rates on PC/SGI/FALCON */
  22. #ifdef ATARI
  23. #define IS_HISR(x) ((x)==49170 || (x)==48000 || (x)==44100 || \
  24. (x)==32780 || (x)==32000)
  25. #define IS_LOSR(x) ((x)==24585 || (x)==24000 || (x)==22050 || (x)==19668 \
  26. || (x)==16390 || (x)==16000 || (x)==12292 || (x)==9834 || (x)==8195)
  27. #define IS_FALSR(x) ((x)==49170 || (x)==32780 || (x)==24585 || (x)==19668 \
  28. || (x)== 16390 || (x)== 12292 || (x)== 9834 || (x)==8195)
  29. #define IS_HIFR(x) ((x)==49170 || (x)==32780)
  30. #define IS_LOFR(x) ((x)==24585 || (x)==19668 || (x)==16390 || \
  31. (x)==12292 || (x)==9834 || (x)==8195)
  32. #define BAD_SR(x) (x!=49170 && x!=44100 && x!=32780 && x!=32000 \
  33. && x!=24585 && x!= 24000 && x!= 22050 && x!=19668 && x!=16390 \
  34. && x!=16000 && x!= 12292 && x!= 9834 && x!= 8195)
  35. #define SR_DEFAULT (24585)
  36. #define D_SR_DEFAULT (24585.0)
  37. static const char *FalconRates =
  38. "49170, 32780, 24585, 19668, 16390, 12292, 9834 or 8195";
  39. #else
  40. /*RWD April 2005 added new high srates */
  41. #define IS_HISR(x) ((x)== 96000 || (x) == 88200 || (x)==48000 || (x)==44100 || (x)==32000)
  42. #define IS_LOSR(x) ((x)==24000 || (x)==22050 || (x)== 16000)
  43. #define SR_DEFAULT (22050)
  44. #define D_SR_DEFAULT (22050.0)
  45. #define BAD_SR(x) ((x)!=44100 && (x)!=22050 && (x)!=32000 && (x)!=16000 \
  46. && (x)!=48000 && (x)!= 24000 && (x)!=88200 && (x)!=96000)
  47. #endif