comparison DPF-Prymula-audioplugins/dpf/distrho/DistrhoStandaloneUtils.hpp @ 3:84e66ea83026

DPF-Prymula-audioplugins-0.231015-2
author prymula <prymula76@outlook.com>
date Mon, 16 Oct 2023 21:53:34 +0200
parents
children
comparison
equal deleted inserted replaced
2:cf2cb71d31dd 3:84e66ea83026
1 /*
2 * DISTRHO Plugin Framework (DPF)
3 * Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
4 *
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.
8 *
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.
15 */
16
17 #ifndef DISTRHO_STANDALONE_UTILS_HPP_INCLUDED
18 #define DISTRHO_STANDALONE_UTILS_HPP_INCLUDED
19
20 #include "src/DistrhoDefines.h"
21
22 START_NAMESPACE_DISTRHO
23
24 /* ------------------------------------------------------------------------------------------------------------
25 * Standalone plugin related utilities */
26
27 /**
28 @defgroup StandalonePluginRelatedUtilities Plugin related utilities
29
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.
32
33 !!EXPERIMENTAL!!
34
35 Still under development and testing.
36
37 @{
38 */
39
40 /**
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.
43 */
44 bool isUsingNativeAudio() noexcept;
45
46 /**
47 Check if the current standalone supports audio input.
48 */
49 bool supportsAudioInput();
50
51 /**
52 Check if the current standalone supports dynamic buffer size changes.
53 */
54 bool supportsBufferSizeChanges();
55
56 /**
57 Check if the current standalone supports MIDI.
58 */
59 bool supportsMIDI();
60
61 /**
62 Check if the current standalone has audio input enabled.
63 */
64 bool isAudioInputEnabled();
65
66 /**
67 Check if the current standalone has MIDI enabled.
68 */
69 bool isMIDIEnabled();
70
71 /**
72 Get the current buffer size.
73 */
74 uint getBufferSize();
75
76 /**
77 Request permissions to use audio input.
78 Only valid to call if audio input is supported but not currently enabled.
79 */
80 bool requestAudioInput();
81
82 /**
83 Request change to a new buffer size.
84 */
85 bool requestBufferSizeChange(uint newBufferSize);
86
87 /**
88 Request permissions to use MIDI.
89 Only valid to call if MIDI is supported but not currently enabled.
90 */
91 bool requestMIDI();
92
93 /** @} */
94
95 // -----------------------------------------------------------------------------------------------------------
96
97 END_NAMESPACE_DISTRHO
98
99 #endif // DISTRHO_STANDALONE_UTILS_HPP_INCLUDED