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.

65 lines
2.8KB

  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. #if JUCE_USE_MP3AUDIOFORMAT || DOXYGEN
  18. //==============================================================================
  19. /**
  20. Software-based MP3 decoding format (doesn't currently provide an encoder).
  21. IMPORTANT DISCLAIMER: By choosing to enable the JUCE_USE_MP3AUDIOFORMAT flag and
  22. to compile the MP3 code into your software, you do so AT YOUR OWN RISK! By doing so,
  23. you are agreeing that Raw Material Software is in no way responsible for any patent,
  24. copyright, or other legal issues that you may suffer as a result.
  25. The code in juce_MP3AudioFormat.cpp is NOT guaranteed to be free from infringements of 3rd-party
  26. intellectual property. If you wish to use it, please seek your own independent advice about the
  27. legality of doing so. If you are not willing to accept full responsibility for the consequences
  28. of using this code, then do not enable the JUCE_USE_MP3AUDIOFORMAT setting.
  29. */
  30. class MP3AudioFormat : public AudioFormat
  31. {
  32. public:
  33. //==============================================================================
  34. MP3AudioFormat();
  35. ~MP3AudioFormat();
  36. //==============================================================================
  37. Array<int> getPossibleSampleRates() override;
  38. Array<int> getPossibleBitDepths() override;
  39. bool canDoStereo() override;
  40. bool canDoMono() override;
  41. bool isCompressed() override;
  42. StringArray getQualityOptions() override;
  43. //==============================================================================
  44. AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails) override;
  45. AudioFormatWriter* createWriterFor (OutputStream*, double sampleRateToUse,
  46. unsigned int numberOfChannels, int bitsPerSample,
  47. const StringPairArray& metadataValues, int qualityOptionIndex) override;
  48. };
  49. #endif