Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

88 lines
3.3KB

  1. /* Audio Library for Teensy 3.X
  2. * Copyright (c) 2014, Paul Stoffregen, paul@pjrc.com
  3. *
  4. * Development of this audio library was funded by PJRC.COM, LLC by sales of
  5. * Teensy and Audio Adaptor boards. Please support PJRC's efforts to develop
  6. * open source software by purchasing Teensy or other PJRC products.
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a copy
  9. * of this software and associated documentation files (the "Software"), to deal
  10. * in the Software without restriction, including without limitation the rights
  11. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. * copies of the Software, and to permit persons to whom the Software is
  13. * furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice, development funding notice, and this permission
  16. * notice shall be included in all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. * THE SOFTWARE.
  25. */
  26. #ifndef Audio_h_
  27. #define Audio_h_
  28. #if TEENSYDUINO < 120
  29. #error "Teensyduino version 1.20 or later is required to compile the Audio library."
  30. #endif
  31. #ifdef __AVR__
  32. #error "The Audio Library only works with Teensy 3.X. Teensy 2.0 is unsupported."
  33. #endif
  34. // When changing multiple audio object settings that must update at
  35. // the same time, these functions allow the audio library interrupt
  36. // to be disabled. For example, you may wish to begin playing a note
  37. // in response to reading an analog sensor. If you have "velocity"
  38. // information, you might start the sample playing and also adjust
  39. // the gain of a mixer channel. Use AudioNoInterrupts() first, then
  40. // make both changes to the 2 separate objects. Then allow the audio
  41. // library to update with AudioInterrupts(). Both changes will happen
  42. // at the same time, because AudioNoInterrupts() prevents any updates
  43. // while you make changes.
  44. //
  45. #define AudioNoInterrupts() (NVIC_DISABLE_IRQ(IRQ_SOFTWARE))
  46. #define AudioInterrupts() (NVIC_ENABLE_IRQ(IRQ_SOFTWARE))
  47. // include all the library headers, so a sketch can use a single
  48. // #include <Audio.h> to get the whole library
  49. //
  50. #include "analyze_fft256.h"
  51. #include "analyze_fft1024.h"
  52. #include "analyze_print.h"
  53. #include "analyze_tonedetect.h"
  54. #include "analyze_peak.h"
  55. #include "control_sgtl5000.h"
  56. #include "control_wm8731.h"
  57. #include "effect_chorus.h"
  58. #include "effect_fade.h"
  59. #include "effect_flange.h"
  60. #include "effect_envelope.h"
  61. #include "effect_multiply.h"
  62. #include "effect_delay.h"
  63. #include "filter_biquad.h"
  64. #include "filter_fir.h"
  65. #include "filter_variable.h"
  66. #include "input_adc.h"
  67. #include "input_i2s.h"
  68. #include "mixer.h"
  69. #include "output_dac.h"
  70. #include "output_i2s.h"
  71. #include "output_pwm.h"
  72. #include "play_memory.h"
  73. #include "play_queue.h"
  74. #include "play_sd_raw.h"
  75. #include "play_sd_wav.h"
  76. #include "synth_tonesweep.h"
  77. #include "synth_sine.h"
  78. #include "synth_waveform.h"
  79. #include "synth_dc.h"
  80. #include "synth_whitenoise.h"
  81. #include "synth_pinknoise.h"
  82. #endif