Audio plugin host https://kx.studio/carla
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.

94 lines
3.1KB

  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. The code included in this file is provided under the terms of the ISC license
  8. http://www.isc.org/downloads/software-support-policy/isc-license. Permission
  9. To use, copy, modify, and/or distribute this software for any purpose with or
  10. without fee is hereby granted provided that the above copyright notice and
  11. this permission notice appear in all copies.
  12. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  13. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  14. DISCLAIMED.
  15. ==============================================================================
  16. */
  17. namespace juce
  18. {
  19. struct iOSAudioIODeviceType;
  20. class iOSAudioIODevice : public AudioIODevice
  21. {
  22. public:
  23. //==============================================================================
  24. String open (const BigInteger&, const BigInteger&, double, int) override;
  25. void close() override;
  26. void start (AudioIODeviceCallback*) override;
  27. void stop() override;
  28. Array<double> getAvailableSampleRates() override;
  29. Array<int> getAvailableBufferSizes() override;
  30. bool setAudioPreprocessingEnabled (bool) override;
  31. //==============================================================================
  32. bool isPlaying() override;
  33. bool isOpen() override;
  34. String getLastError() override;
  35. //==============================================================================
  36. StringArray getOutputChannelNames() override;
  37. StringArray getInputChannelNames() override;
  38. int getDefaultBufferSize() override;
  39. int getCurrentBufferSizeSamples() override;
  40. double getCurrentSampleRate() override;
  41. int getCurrentBitDepth() override;
  42. BigInteger getActiveOutputChannels() const override;
  43. BigInteger getActiveInputChannels() const override;
  44. int getOutputLatencyInSamples() override;
  45. int getInputLatencyInSamples() override;
  46. int getXRunCount() const noexcept override;
  47. //==============================================================================
  48. void setMidiMessageCollector (MidiMessageCollector*);
  49. AudioPlayHead* getAudioPlayHead() const;
  50. //==============================================================================
  51. bool isInterAppAudioConnected() const;
  52. #if JUCE_MODULE_AVAILABLE_juce_graphics
  53. Image getIcon (int size);
  54. #endif
  55. void switchApplication();
  56. private:
  57. //==============================================================================
  58. iOSAudioIODevice (const String&);
  59. //==============================================================================
  60. friend struct iOSAudioIODeviceType;
  61. friend struct AudioSessionHolder;
  62. struct Pimpl;
  63. friend struct Pimpl;
  64. ScopedPointer<Pimpl> pimpl;
  65. JUCE_DECLARE_NON_COPYABLE (iOSAudioIODevice)
  66. };
  67. } // namespace juce