The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
3.6KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2017 - ROLI Ltd.
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 5 End-User License
  8. Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
  9. 27th April 2017).
  10. End User License Agreement: www.juce.com/juce-5-licence
  11. Privacy Policy: www.juce.com/juce-5-privacy-policy
  12. Or: You may also use this code under the terms of the GPL v3 (see
  13. www.gnu.org/licenses).
  14. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  15. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  16. DISCLAIMED.
  17. ==============================================================================
  18. */
  19. //==============================================================================
  20. /**
  21. Reads and Writes AIFF format audio files.
  22. @see AudioFormat
  23. */
  24. class JUCE_API AiffAudioFormat : public AudioFormat
  25. {
  26. public:
  27. //==============================================================================
  28. /** Creates an format object. */
  29. AiffAudioFormat();
  30. /** Destructor. */
  31. ~AiffAudioFormat();
  32. //==============================================================================
  33. /** Metadata property name used when reading a aiff file with a basc chunk. */
  34. static const char* const appleOneShot;
  35. /** Metadata property name used when reading a aiff file with a basc chunk. */
  36. static const char* const appleRootSet;
  37. /** Metadata property name used when reading a aiff file with a basc chunk. */
  38. static const char* const appleRootNote;
  39. /** Metadata property name used when reading a aiff file with a basc chunk. */
  40. static const char* const appleBeats;
  41. /** Metadata property name used when reading a aiff file with a basc chunk. */
  42. static const char* const appleDenominator;
  43. /** Metadata property name used when reading a aiff file with a basc chunk. */
  44. static const char* const appleNumerator;
  45. /** Metadata property name used when reading a aiff file with a basc chunk. */
  46. static const char* const appleTag;
  47. /** Metadata property name used when reading a aiff file with a basc chunk. */
  48. static const char* const appleKey;
  49. //==============================================================================
  50. Array<int> getPossibleSampleRates() override;
  51. Array<int> getPossibleBitDepths() override;
  52. bool canDoStereo() override;
  53. bool canDoMono() override;
  54. #if JUCE_MAC
  55. bool canHandleFile (const File& fileToTest) override;
  56. #endif
  57. //==============================================================================
  58. AudioFormatReader* createReaderFor (InputStream* sourceStream,
  59. bool deleteStreamIfOpeningFails) override;
  60. MemoryMappedAudioFormatReader* createMemoryMappedReader (const File&) override;
  61. MemoryMappedAudioFormatReader* createMemoryMappedReader (FileInputStream*) override;
  62. AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
  63. double sampleRateToUse,
  64. unsigned int numberOfChannels,
  65. int bitsPerSample,
  66. const StringPairArray& metadataValues,
  67. int qualityOptionIndex) override;
  68. private:
  69. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AiffAudioFormat)
  70. };