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.

69 lines
2.3KB

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