2 * DISTRHO Plugin Framework (DPF)
3 * Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
5 * Permission to use, copy, modify, and/or distribute this software for any purpose with
6 * or without fee is hereby granted, provided that the above copyright notice and this
7 * permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10 * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #ifndef DISTRHO_STANDALONE_UTILS_HPP_INCLUDED
18 #define DISTRHO_STANDALONE_UTILS_HPP_INCLUDED
20 #include "src/DistrhoDefines.h"
22 START_NAMESPACE_DISTRHO
24 /* ------------------------------------------------------------------------------------------------------------
25 * Standalone plugin related utilities */
28 @defgroup StandalonePluginRelatedUtilities Plugin related utilities
30 When the plugin is running as standalone and JACK is not available, a native audio handling is in place.
31 It is a very simple handling, auto-connecting to the default audio interface for outputs.
35 Still under development and testing.
41 Check if the current standalone is using native audio methods.
42 If this function returns false, you MUST NOT use any other function from this group.
44 bool isUsingNativeAudio() noexcept
;
47 Check if the current standalone supports audio input.
49 bool supportsAudioInput();
52 Check if the current standalone supports dynamic buffer size changes.
54 bool supportsBufferSizeChanges();
57 Check if the current standalone supports MIDI.
62 Check if the current standalone has audio input enabled.
64 bool isAudioInputEnabled();
67 Check if the current standalone has MIDI enabled.
72 Get the current buffer size.
77 Request permissions to use audio input.
78 Only valid to call if audio input is supported but not currently enabled.
80 bool requestAudioInput();
83 Request change to a new buffer size.
85 bool requestBufferSizeChange(uint newBufferSize
);
88 Request permissions to use MIDI.
89 Only valid to call if MIDI is supported but not currently enabled.
95 // -----------------------------------------------------------------------------------------------------------
99 #endif // DISTRHO_STANDALONE_UTILS_HPP_INCLUDED