Browse Source

Add missing file

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.1
falkTX 2 years ago
parent
commit
e3a0aad27a
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 99 additions and 1 deletions
  1. +0
    -1
      data/update-dpf
  2. +99
    -0
      source/modules/distrho/DistrhoStandaloneUtils.hpp

+ 0
- 1
data/update-dpf View File

@@ -46,6 +46,5 @@ rm ${CARLA_DIR}/source/modules/distrho/DistrhoInfo.hpp
rm ${CARLA_DIR}/source/modules/distrho/src/DistrhoPlugin{JACK,LADSPA+DSSI,LV2,LV2export,VST2,VST3}.cpp
rm ${CARLA_DIR}/source/modules/distrho/src/DistrhoPluginVST.hpp
rm ${CARLA_DIR}/source/modules/distrho/src/DistrhoUI{DSSI,LV2,VST3}.cpp
rm ${CARLA_DIR}/source/modules/distrho/DistrhoStandaloneUtils.hpp

rm -rf ${DPF_DIR}

+ 99
- 0
source/modules/distrho/DistrhoStandaloneUtils.hpp View File

@@ -0,0 +1,99 @@
/*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
* permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
* TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef DISTRHO_STANDALONE_UTILS_HPP_INCLUDED
#define DISTRHO_STANDALONE_UTILS_HPP_INCLUDED

#include "src/DistrhoDefines.h"

START_NAMESPACE_DISTRHO

/* ------------------------------------------------------------------------------------------------------------
* Standalone plugin related utilities */

/**
@defgroup StandalonePluginRelatedUtilities Plugin related utilities

When the plugin is running as standalone and JACK is not available, a native audio handling is in place.
It is a very simple handling, auto-connecting to the default audio interface for outputs.

!!EXPERIMENTAL!!

Still under development and testing.

@{
*/

/**
Check if the current standalone is using native audio methods.
If this function returns false, you MUST NOT use any other function from this group.
*/
bool isUsingNativeAudio() noexcept;

/**
Check if the current standalone supports audio input.
*/
bool supportsAudioInput();

/**
Check if the current standalone supports dynamic buffer size changes.
*/
bool supportsBufferSizeChanges();

/**
Check if the current standalone supports MIDI.
*/
bool supportsMIDI();

/**
Check if the current standalone has audio input enabled.
*/
bool isAudioInputEnabled();

/**
Check if the current standalone has MIDI enabled.
*/
bool isMIDIEnabled();

/**
Get the current buffer size.
*/
uint getBufferSize();

/**
Request permissions to use audio input.
Only valid to call if audio input is supported but not currently enabled.
*/
bool requestAudioInput();

/**
Request change to a new buffer size.
*/
bool requestBufferSizeChange(uint newBufferSize);

/**
Request permissions to use MIDI.
Only valid to call if MIDI is supported but not currently enabled.
*/
bool requestMIDI();

/** @} */

// -----------------------------------------------------------------------------------------------------------

END_NAMESPACE_DISTRHO

#endif // DISTRHO_STANDALONE_UTILS_HPP_INCLUDED

Loading…
Cancel
Save