Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #ifndef _SNDLIB_H
  2. #define _SNDLIB_H
  3. #include <mus-config.h>
  4. #ifndef _MSC_VER
  5. #include <unistd.h>
  6. #endif
  7. #include <sys/types.h>
  8. #include <stdio.h>
  9. #if ((!__NetBSD__) && ((_MSC_VER) || (!defined(__STC__)) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901L))))
  10. #define __func__ __FUNCTION__
  11. #endif
  12. #if (!defined(M_PI))
  13. #define M_PI 3.14159265358979323846264338327
  14. #define M_PI_2 (M_PI / 2.0)
  15. #endif
  16. #define is_power_of_2(x) ((((x) - 1) & (x)) == 0)
  17. #define MUS_MAX_MALLOC_DEFAULT (1 << 26)
  18. #define MUS_MAX_TABLE_SIZE_DEFAULT (1024 * 1024 * 20) /* delay line allocation etc */
  19. #ifndef SEEK_SET
  20. #define SEEK_SET 0
  21. #define SEEK_END 2
  22. #endif
  23. #ifdef _MSC_VER
  24. #ifdef FOPEN
  25. #undef FOPEN
  26. #endif
  27. #if USE_SND
  28. #define OPEN(File, Flags, Mode) snd_open((File), (Flags), 0)
  29. #else
  30. #define OPEN(File, Flags, Mode) open((File), (Flags))
  31. #endif
  32. #else
  33. #if USE_SND
  34. #define OPEN(File, Flags, Mode) snd_open((File), (Flags), (Mode))
  35. #else
  36. #define OPEN(File, Flags, Mode) open((File), (Flags), (Mode))
  37. #endif
  38. #endif
  39. #if USE_SND
  40. #define FOPEN(File, Flags) snd_fopen((File), (Flags))
  41. #define CREAT(File, Flags) snd_creat((File), (Flags))
  42. #define REMOVE(OldF) snd_remove(OldF, IGNORE_CACHE)
  43. #define STRERROR(Err) snd_io_strerror()
  44. #define CLOSE(Fd, Name) snd_close(Fd, Name)
  45. #define FCLOSE(Fd, Name) snd_fclose(Fd, Name)
  46. #else
  47. #define FOPEN(File, Flags) fopen((File), (Flags))
  48. #define CREAT(File, Flags) creat((File), (Flags))
  49. #define REMOVE(OldF) remove(OldF)
  50. #define STRERROR(Err) strerror(Err)
  51. #define CLOSE(Fd, Name) close(Fd)
  52. #define FCLOSE(Fd, Name) fclose(Fd)
  53. #endif
  54. #ifndef S_set
  55. #if (!HAVE_EXTENSION_LANGUAGE)
  56. #define S_set "set-"
  57. #else
  58. #if HAVE_RUBY
  59. #define S_set "set_"
  60. #else
  61. #if HAVE_SCHEME
  62. #define S_set "set! "
  63. #else
  64. #if HAVE_FORTH
  65. #define S_set "set-"
  66. #endif
  67. #endif
  68. #endif
  69. #endif
  70. #endif
  71. #define MUS_LOOP_INFO_SIZE 8
  72. #define MUS_ALSA_API 0
  73. #define MUS_OSS_API 1
  74. #define MUS_JACK_API 2
  75. #define G7XX 0
  76. #include "sndlib.h"
  77. #include "xen.h"
  78. #include "vct.h"
  79. #endif