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.

76 lines
2.6KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2020 - Raw Material Software Limited
  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 6 End-User License
  8. Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
  9. End User License Agreement: www.juce.com/juce-6-licence
  10. Privacy Policy: www.juce.com/juce-privacy-policy
  11. Or: You may also use this code under the terms of the GPL v3 (see
  12. www.gnu.org/licenses).
  13. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  14. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  15. DISCLAIMED.
  16. ==============================================================================
  17. */
  18. namespace juce
  19. {
  20. #if JUCE_USE_FLAC || DOXYGEN
  21. //==============================================================================
  22. /**
  23. Reads and writes the lossless-compression FLAC audio format.
  24. To compile this, you'll need to set the JUCE_USE_FLAC flag.
  25. @see AudioFormat
  26. @tags{Audio}
  27. */
  28. class JUCE_API FlacAudioFormat : public AudioFormat
  29. {
  30. public:
  31. //==============================================================================
  32. FlacAudioFormat();
  33. ~FlacAudioFormat() override;
  34. //==============================================================================
  35. Array<int> getPossibleSampleRates() override;
  36. Array<int> getPossibleBitDepths() override;
  37. bool canDoStereo() override;
  38. bool canDoMono() override;
  39. bool isCompressed() override;
  40. StringArray getQualityOptions() override;
  41. //==============================================================================
  42. AudioFormatReader* createReaderFor (InputStream* sourceStream,
  43. bool deleteStreamIfOpeningFails) override;
  44. AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
  45. double sampleRateToUse,
  46. unsigned int numberOfChannels,
  47. int bitsPerSample,
  48. const StringPairArray& metadataValues,
  49. int qualityOptionIndex) override;
  50. using AudioFormat::createWriterFor;
  51. private:
  52. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FlacAudioFormat)
  53. };
  54. #endif
  55. } // namespace juce