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.

85 lines
3.6KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2013 - Raw Material Software Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. //==============================================================================
  18. /**
  19. Reads and Writes AIFF format audio files.
  20. @see AudioFormat
  21. */
  22. class JUCE_API AiffAudioFormat : public AudioFormat
  23. {
  24. public:
  25. //==============================================================================
  26. /** Creates an format object. */
  27. AiffAudioFormat();
  28. /** Destructor. */
  29. ~AiffAudioFormat();
  30. //==============================================================================
  31. /** Metadata property name used when reading a aiff file with a basc chunk. */
  32. static const char* const appleOneShot;
  33. /** Metadata property name used when reading a aiff file with a basc chunk. */
  34. static const char* const appleRootSet;
  35. /** Metadata property name used when reading a aiff file with a basc chunk. */
  36. static const char* const appleRootNote;
  37. /** Metadata property name used when reading a aiff file with a basc chunk. */
  38. static const char* const appleBeats;
  39. /** Metadata property name used when reading a aiff file with a basc chunk. */
  40. static const char* const appleDenominator;
  41. /** Metadata property name used when reading a aiff file with a basc chunk. */
  42. static const char* const appleNumerator;
  43. /** Metadata property name used when reading a aiff file with a basc chunk. */
  44. static const char* const appleTag;
  45. /** Metadata property name used when reading a aiff file with a basc chunk. */
  46. static const char* const appleKey;
  47. //==============================================================================
  48. Array<int> getPossibleSampleRates() override;
  49. Array<int> getPossibleBitDepths() override;
  50. bool canDoStereo() override;
  51. bool canDoMono() override;
  52. #if JUCE_MAC
  53. bool canHandleFile (const File& fileToTest) override;
  54. #endif
  55. //==============================================================================
  56. AudioFormatReader* createReaderFor (InputStream* sourceStream,
  57. bool deleteStreamIfOpeningFails) override;
  58. MemoryMappedAudioFormatReader* createMemoryMappedReader (const File&) override;
  59. AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
  60. double sampleRateToUse,
  61. unsigned int numberOfChannels,
  62. int bitsPerSample,
  63. const StringPairArray& metadataValues,
  64. int qualityOptionIndex) override;
  65. private:
  66. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AiffAudioFormat)
  67. };