Namespaces | |
namespace | AnsiColors |
namespace | Aux |
namespace | BlepUtils |
namespace | DBus |
namespace | FastMemory |
namespace | Impl |
namespace | Lib |
namespace | Loft |
namespace | MakeIcon |
namespace | MidiLib |
namespace | Path |
namespace | SortingNetworks |
namespace | Test |
namespace | Unicode |
Concepts | |
concept | IsEnum |
Typedefs | |
template<class T > | |
using | Atomic = boost::atomic< T > |
using | AtomicU64 = std::atomic< uint64 > |
using | CallbackS = std::vector< std::function< void()> > |
using | ChoicesFunc = std::function< ChoiceS(const CString &)> |
using | ClapEventParamS = std::vector< clap_event_param_value > |
using | ClapEventUnionS = std::vector< ClapEventUnion > |
using | ClapParamIdValue = std::tuple< clap_id, double > |
using | ClapParamIdValueS = std::vector< ClapParamIdValue > |
using | ClapParamInfoMap = std::unordered_map< clap_id, ClapParamInfoImpl * > |
using | ClapParamInfoS = std::vector< ClapParamInfo > |
using | ClapParamUpdateS = std::vector< ClapParamUpdate > |
using | ClapResourceHash = std::tuple< clap_id, String > |
using | ClapResourceHashS = std::vector< ClapResourceHash > |
using | ClipImplGeneratorS = std::vector< ClipImpl::Generator > |
using | CStringS = std::vector< CString > |
using | DCallbackS = std::vector< std::function< void(double)> > |
typedef std::shared_ptr< DispatcherSource > | DispatcherSourceP |
using | DriverP = Driver::DriverP |
using | EventConnectionP = std::shared_ptr< EventConnection > |
using | EventConnectionW = std::weak_ptr< EventConnection > |
using | EventHandler = std::function< void(const Event &)> |
typedef std::shared_ptr< EventLoop > | EventLoopP |
typedef std::shared_ptr< EventSource > | EventSourceP |
using | FastRng = Mwc256 |
template<size_t I, size_t J> | |
using | IDX = typename ::std::enable_if< I==J, bool >::type |
using | InstanceP = std::shared_ptr< SharedBase > |
typedef int16_t | int16 |
typedef int32_t | int32 |
typedef int64_t | int64 |
typedef int8_t | int8 |
using | JsonapiBinarySender = std::function< bool(const String &)> |
using | JsonapiConnectionP = std::shared_ptr< JsonapiConnection > |
using | JsonapiConnectionW = std::weak_ptr< JsonapiConnection > |
template<typename T > | |
using | LoftPtr = std::unique_ptr< T, LoftFree > |
typedef std::shared_ptr< MainLoop > | MainLoopP |
using | MidiDriverP = MidiDriver::MidiDriverP |
using | MinMaxStep = std::tuple< double, double, double > |
using | MonitorImplP = std::shared_ptr< MonitorImpl > |
using | ObjectImplP = std::shared_ptr< ObjectImpl > |
using | ParameterC = std::shared_ptr< const Parameter > |
using | ParamInitialVal = std::variant< bool, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, float, double, const char *, std::string > |
using | PcmDriverP = PcmDriver::PcmDriverP |
typedef std::shared_ptr< PollFDSource > | PollFDSourceP |
using | PrefsMap = std::unordered_map< CString, PrefsValue > |
using | PrefsValueCallbackList = CallbackList< CString, const Value & > |
using | ProjectImplP = std::shared_ptr< ProjectImpl > |
using | PropertyGetter = std::function< void(Value &)> |
using | PropertyLister = std::function< ChoiceS(const ParameterProperty &)> |
using | PropertySetter = std::function< bool(const Value &)> |
using | RegisteredLoaderFunc = Error(*)() |
using | RegisteredLoaderVector = std::vector< RegisteredLoader > |
template<bool value> | |
using | REQUIRES = typename ::std::enable_if< value, bool >::type |
template<bool value> | |
using | REQUIRESv = typename ::std::enable_if< value, void >::type |
using | StartQueue = AsyncBlockingQueue< char > |
using | String = std::string |
using | String3 = std::tuple< String, String, String > |
using | StringPair = std::pair< std::string, std::string > |
using | StringPairS = std::vector< std::tuple< String, String > > |
using | StringS = std::vector< String > |
using | ThreadId = std::thread::id |
typedef std::shared_ptr< TimedSource > | TimedSourceP |
template<class T , class C > | |
using | TYP = typename ::std::enable_if< std::is_same< T, C >::value, bool >::type |
typedef uint32_t | uint |
typedef uint16_t | uint16 |
typedef uint32_t | uint32 |
typedef uint64_t | uint64 |
typedef uint8_t | uint8 |
typedef uint32_t | unichar |
typedef std::shared_ptr< USignalSource > | USignalSourceP |
using | ValueP = std::shared_ptr< Value > |
using | ValueVariant = std::variant< std::monostate, bool, int64, double, String, ValueS, ValueR, InstanceP > |
using | VirtualBaseP = std::shared_ptr< VirtualBase > |
using | VoidF = std::function< void()> |
using | VoidFunc = std::function< void()> |
using | WaveWriterP = std::shared_ptr< WaveWriter > |
using | WebSocketConnectionP = std::shared_ptr< WebSocketConnection > |
using | WebSocketServerImplP = std::shared_ptr< WebSocketServerImpl > |
using | WebSocketServerP = std::shared_ptr< WebSocketServer > |
using | WppConnection = WppConnectionP::element_type |
using | WppConnectionP = WppServer::connection_ptr |
using | WppHdl = websocketpp::connection_hdl |
using | WppServer = websocketpp::server< CustomServerConfig > |
using | WritNodeS = std::vector< WritNode > |
using | WritP = std::shared_ptr< Writ > |
Functions | |
const char *() | _ (const char *string) |
const char *() | _ (const char *string, const char *plural, int64_t n) |
std::string() | _ (const std::string &string) |
std::string() | _ (const std::string &string, const std::string &plural, int64_t n) |
const char *() | __format_arg__ (2))) |
void | anklang_cachedir_clean_stale () |
void | anklang_cachedir_cleanup (const String &cachedir) |
String | anklang_cachedir_create () |
String | anklang_home_dir (const String &subdir) |
std::string | anklang_runpath (RPath rpath, const String &segment) |
String | application_name () |
void | application_name_init (String desktopname) |
const char * | ase_build_id () |
const char * | ase_error_blurb (Error error) |
Error | ase_error_from_errno (int sys_errno, Error fallback=Error::IO) |
template<class A0 , class... Ar> | |
const char * | ase_gettext (const char *format, const A0 &a0, const Ar &...restargs) |
const char * | ase_gettext (const String &untranslated) |
const char * | ase_version () |
void | assertion_failed (const char *msg, const char *file, int line, const char *func) noexcept |
void | assertion_fatal (const char *msg, const char *file, int line, const char *func) noexcept |
void | atquit_add (std::function< void()> *func) |
void | atquit_del (std::function< void()> *func) |
void | atquit_run (int exitcode) |
bool | atquit_triggered () |
std::string | backtrace_command () |
String | blake3_hash_file (const String &filename) |
String | blake3_hash_string (const String &input) |
void | breakpoint () |
template<class T > | |
void | call_delete (T *o) |
DeviceInfo | clap_device_info (const ClapPluginDescriptor &descriptor) |
String | clap_event_to_string (const clap_event_note_t *enote) |
const char * | clap_event_type_string (int etype) |
void | collect_runtime_entropy (uint64 *data, size_t n) |
void | collect_system_entropy (uint64 *data, size_t n) |
constexpr bool | constexpr_equals (const char *a, const char *b, size_t n) |
template<> | |
void | convert_clip_samples (size_t n, const float *src, int16_t *dst, uint16 byte_order) |
template<class S , class D > | |
void | convert_clip_samples (size_t n, S *src, D *dst, uint16 byte_order) |
template<> | |
void | convert_samples (size_t n, const int16_t *src, float *dst, uint16 byte_order) |
template<class S , class D > | |
void | convert_samples (size_t n, S *src, D *dst, uint16 byte_order) |
std::string | cpu_arch () |
String | cpu_info () |
DeviceP | create_processor_device (AudioEngine &engine, const String &uri, bool engineproducer) |
bool | cstring_to_bool (const char *string, bool fallback) |
StringS | cstrings_to_vector (const char *s,...) |
long double | current_locale_strtold (const char *nptr, char **endptr) |
float | damerau_levenshtein_distance (const std::string &source, const std::string &target, const float ci, const float cd, const float cs, const float ct) |
float | damerau_levenshtein_restricted (const std::string &source, const std::string &target, const float ci, const float cd, const float cs, const float ct) |
template<typename Float > | |
Float | db2voltage (Float x) |
template<typename Float > | |
Float | db_changed (Float a, Float b) |
template<class ... A> | |
void | debug (const char *cond, const char *format, const A &...args) |
template<class ... Args> | |
void | debug (const char *cond, const char *format, const Args &...args) |
bool | debug_enabled () |
bool | debug_key_enabled (const ::std::string &conditional) |
bool | debug_key_enabled (const char *conditional) |
bool | debug_key_enabled (const std::string &conditional) ASE_PURE |
::std::string | debug_key_value (const char *conditional) |
void | debug_message (const char *cond, const std::string &message) |
std::string | decodefs (const std::string &utf8str) |
void | diag_flush (uint8 code, const String &txt) |
String | diag_prefix (uint8 code) |
std::string | displayfs (const std::string &utf8str) |
std::string | encodefs (const std::string &fschars) |
template<typename Enum > requires IsEnum<Enum> | |
ChoiceS | enum_lister (const ParameterProperty &) |
std::string | executable_name () ASE_PURE |
std::string | executable_path () |
void | fast_copy (size_t n, float *d, const float *s) |
void | fast_copy (size_t n, uint32_t *d, const uint32_t *s) |
float | fast_db2voltage (float x) |
float | fast_exp2 (float x) |
float | fast_hz2voltage (float x) |
float | fast_log2 (float x) |
void * | fast_mem_alloc (size_t size) |
void | fast_mem_free (void *mem) |
float | fast_voltage2db (float x) |
float | fast_voltage2hz (float x) |
template<class ... A> | |
void | fatal_error (const char *format, const A &...args) ASE_NORETURN |
template<class ... Args> | |
void ASE_NORETURN | fatal_error (const char *format, const Args &...args) |
void | fatal_system_error (const char *file, uint line, const char *format,...) __attribute__((__format__(printf |
template<typename E > | |
std::pair< std::shared_ptr< E >, ssize_t > | find_shared_by_ref (const std::vector< std::shared_ptr< E > > &v, const E &e) |
template<class RandomIt , class Compare > | |
void | fixed_sort (RandomIt first, RandomIt last, Compare comp=std::less< typename std::iterator_traits< RandomIt >::value_type >()) |
void | floatfill (float *dst, float f, size_t n) |
double | force_double (double d) |
float | force_float (float f) |
float | hz2value (float x) |
template<typename Float > | |
Float | hz2voltage (Float x) |
template<typename Float > | |
Float | hz_changed (Float a, Float b) |
int | irintf (float f) |
bool | is_aiff (const String &input) |
bool | is_arj (const String &input) |
bool | is_avi (const String &input) |
bool | is_compressed (const String &input) |
bool | is_gz (const String &input) |
bool | is_isz (const String &input) |
bool | is_jpg (const String &input) |
bool | is_lz4 (const String &input) |
bool | is_midi (const String &input) |
bool | is_ogg (const String &input) |
bool | is_pdf (const String &input) |
bool | is_png (const String &input) |
bool | is_wav (const String &input) |
bool | is_xz (const String &input) |
bool | is_zip (const String &input) |
bool | is_zstd (const String &input) |
template<class T > | |
T | json_parse (const String &jsonstring) |
template<class T > | |
bool | json_parse (const String &jsonstring, T &target) |
template<class T > | |
String | json_stringify (const T &source, Writ::Flags flags=Writ::Flags(0)) |
CustomDataContainer * | jsonapi_connection_data () |
JsonapiBinarySender | jsonapi_connection_sender () |
WebSocketConnectionP | jsonapi_make_connection (WebSocketConnection::Internals &internals, int logflags) |
void | jsonapi_require_auth (const String &subprotocol) |
String | kvpair_key (const String &key_value_pair) |
String | kvpair_value (const String &key_value_pair) |
bool | kvpairs_assign (StringS &kvs, const String &key_value_pair, bool casesensitive) |
String | kvpairs_fetch (const StringS &kvs, const String &key, bool casesensitive) |
ssize_t | kvpairs_search (const StringS &kvs, const String &k, const bool casesensitive) |
StringS | list_clap_files () |
void | load_registered_drivers () |
template<class T , class ... Args> | |
LoftPtr< T > | loft_make_unique (Args &&...args) |
template<class... A> | |
void | log (const LogFormat &format, const A &...args) |
LogFlags | log_setup (int *logfd) |
void | logmsg (const std::string &msg, const char *const filename, const uint64_t columnline, const char *const function_name) |
void | main_loop_autostop_mt () |
void | main_loop_wakeup () |
MidiEvent | make_aftertouch (uint16 chnl, uint8 mkey, float velo, float tune, uint nid) |
AudioEngine & | make_audio_engine (const VoidF &owner_wakeup, uint sample_rate, SpeakerArrangement speakerarrangement) |
MidiEvent | make_control (uint16 chnl, uint prm, float val) |
MidiEvent | make_control8 (uint16 chnl, uint prm, uint8 cval) |
template<typename Enum > | |
std::function< void(Value &)> | make_enum_getter (Enum *v) |
template<typename Enum > | |
std::function< bool(const Value &)> | make_enum_setter (Enum *v) |
MidiEvent | make_note_off (uint16 chnl, uint8 mkey, float velo, float tune, uint nid) |
MidiEvent | make_note_on (uint16 chnl, uint8 mkey, float velo, float tune, uint nid) |
MidiEvent | make_param_value (uint param, double pvalue) |
MidiEvent | make_pitch_bend (uint16 chnl, float val) |
MidiEvent | make_pressure (uint16 chnl, float velo) |
MidiEvent | make_program (uint16 chnl, uint prgrm) |
void | memset4 (uint32 *mem, uint32 filler, uint length) |
uint64 | monotonic_counter () |
String | now_strftime (const String &format) |
constexpr bool | operator! (Error error) |
ChoiceS & | operator+= (ChoiceS &choices, Choice &&newchoice) |
bool | operator== (const std::vector< ValueP > &v1, const std::vector< ValueP > &v2) |
constexpr Re::Flags | operator| (Re::Flags a, Re::Flags b) |
String | parameter_guess_nick (const String ¶meter_label) |
long double | posix_locale_strtold (const char *nptr, char **endptr) |
template<class... A> | |
void void | printerr (const char *format, const A &...args) ASE_PRINTF(1 |
template<class... Args> | |
void | printerr (const char *format, const Args &...args) |
template<class... A> | |
void | printout (const char *format, const A &...args) ASE_PRINTF(1 |
template<class... Args> | |
void | printout (const char *format, const Args &...args) |
String | program_alias () |
void | program_alias_init (String customname) |
String | program_cwd () |
int | QueueMultiplexer_priority (const MidiEvent &e) |
double | random_float () |
double | random_frange (double begin, double end) |
uint64_t | random_int64 () |
int64_t | random_irange (int64_t begin, int64_t end) |
uint64_t | random_nonce () |
void | random_secret (uint64_t *secret_var) |
template<typename T > | |
CString | register_audio_processor (const char *aseid=nullptr) |
bool * | register_driver_loader (const char *staticwhat, Error(*loader)()) |
bool | sched_fast_priority (int tid) |
int | sched_get_priority (int tid) |
bool | sched_set_priority (int tid, int nicelevel) |
void | sha3_224_hash (const void *data, size_t data_length, uint8_t hashvalue[28]) |
void | sha3_256_hash (const void *data, size_t data_length, uint8_t hashvalue[32]) |
void | sha3_384_hash (const void *data, size_t data_length, uint8_t hashvalue[48]) |
void | sha3_512_hash (const void *data, size_t data_length, uint8_t hashvalue[64]) |
void | shake128_hash (const void *data, size_t data_length, uint8_t *hashvalues, size_t n) |
void | shake256_hash (const void *data, size_t data_length, uint8_t *hashvalues, size_t n) |
template<class Target , class Source > | |
const std::shared_ptr< typename std::remove_pointer< Target >::type > | shared_ptr_cast (const Source *object) |
template<class Target , class Source > | |
const std::shared_ptr< typename std::remove_pointer< Target >::type > | shared_ptr_cast (const std::shared_ptr< Source > &sptr) |
template<class Target , class Source > | |
std::shared_ptr< typename std::remove_pointer< Target >::type > | shared_ptr_cast (Source *object) |
template<class Target , class Source > | |
std::shared_ptr< typename std::remove_pointer< Target >::type > | shared_ptr_cast (std::shared_ptr< Source > &sptr) |
template<class Source > | |
std::shared_ptr< typename std::remove_pointer< Source >::type > | shared_ptr_from (Source *object) |
const char * | speaker_arrangement_bit_name (SpeakerArrangement spa) |
SpeakerArrangement | speaker_arrangement_channels (SpeakerArrangement spa) |
uint8 | speaker_arrangement_count_channels (SpeakerArrangement spa) |
std::string | speaker_arrangement_desc (SpeakerArrangement spa) |
bool | speaker_arrangement_is_aux (SpeakerArrangement spa) |
float | square_max (uint n_values, const float *ivalues) |
float | square_sum (uint n_values, const float *ivalues) |
StreamReaderP | stream_reader_from_file (const String &file) |
StreamReaderP | stream_reader_zip_member (const String &archive, const String &member, Storage::StorageFlags f) |
StreamReaderP | stream_reader_zstd (StreamReaderP &istream) |
StreamWriterP | stream_writer_create_file (const String &filename, int mode) |
StreamWriterP | stream_writer_zstd (const StreamWriterP &ostream, int level) |
const char * | strerror () |
const char * | strerror (int errno_num) |
String | string_canonify (const String &string, const String &valid_chars, const String &substitute) |
String | string_capitalize (const String &str, size_t maxn, bool rest_tolower) |
int | string_casecmp (const String &s1, const String &s2) |
String | string_casefold (const String &src) |
int | string_cmp (const String &s1, const String &s2) |
int | string_cmp_uuid (const String &uuid_string1, const String &uuid_string2) |
const char * | string_demangle_cxx (const char *mangled_identifier) noexcept |
bool | string_endswith (const String &string, const String &fragment) |
bool | string_endswith (const String &string, const StringS &fragments) |
const char * | string_find_word (const char *haystack, const char *word) |
template<class ... Args> | |
std::string | string_format (const char *format, const Args &...args) __attribute__((__format__(__printf__ |
String | string_from_bool (bool value) |
String | string_from_cquote (const String &input) |
String | string_from_double (double value) |
String | string_from_double_vector (const std::vector< double > &dvec, const String &delim) |
String | string_from_errno (int errno_val) |
String | string_from_float (double value) |
String | string_from_float (float value) |
String | string_from_int (int64 value) |
String | string_from_long_double (long double value) |
String | string_from_pretty_function_name (const char *cxx_pretty_function) |
template<typename Type > | |
String | string_from_type (Type value) |
template<> | |
String | string_from_type< bool > (bool value) |
template<> | |
String | string_from_type< double > (double value) |
template<> | |
String | string_from_type< float > (float value) |
template<> | |
String | string_from_type< int > (int value) |
template<> | |
String | string_from_type< int16 > (int16 value) |
template<> | |
String | string_from_type< int64 > (int64 value) |
template<> | |
String | string_from_type< long double > (long double value) |
template<> | |
String | string_from_type< String > (String value) |
template<> | |
String | string_from_type< uint > (uint value) |
template<> | |
String | string_from_type< uint16 > (uint16 value) |
template<> | |
String | string_from_type< uint64 > (uint64 value) |
String | string_from_uint (uint64 value) |
bool | string_has_int (const String &string) |
String | string_hexdump (const void *addr, size_t length, size_t initial_offset) |
bool | string_is_ascii_alnum (const String &str) |
bool | string_is_canonified (const String &string, const String &valid_chars) |
bool | string_is_ncname (const String &input) |
bool | string_is_uuid (const String &uuid_string) |
bool | string_islower (const String &str) |
bool | string_isupper (const String &str) |
String | string_join (const String &junctor, const StringS &strvec) |
String | string_locale_vprintf (const char *format, va_list vargs) |
String | string_lstrip (const String &input) |
bool | string_match_identifier (const String &ident1, const String &ident2) |
bool | string_match_identifier_tail (const String &ident, const String &tail) |
String | string_multiply (const String &s, uint64 count) |
String | string_normalize_nfc (const String &src) |
String | string_normalize_nfd (const String &src) |
String | string_normalize_nfkc (const String &src) |
String | string_normalize_nfkd (const String &src) |
bool | string_option_check (const String &optionlist, const String &feature) |
String | string_option_find (const String &optionlist, const String &feature, const String &fallback) |
std::string_view | string_option_find_value (const char *string, const char *feature, const String &fallback, const String &denied, bool matchallnone) |
String | string_replace (const String &input, const String &marker, const String &replacement, size_t maxn) |
String | string_rstrip (const String &input) |
const String & | string_set_a2z () |
const String & | string_set_A2Z () |
const String & | string_set_ascii_alnum () |
StringS | string_split (const String &string, const String &splitter, size_t maxn) |
StringS | string_split_any (const String &string, const String &splitchars, size_t maxn) |
bool | string_startswith (const String &string, const String &fragment) |
bool | string_startswith (const String &string, const StringS &fragments) |
String | string_strip (const String &input) |
String | string_substitute_char (const String &input, const char match, const char subst) |
bool | string_to_bool (const String &string, bool fallback) |
String | string_to_cescape (const String &str) |
String | string_to_cquote (const String &str) |
double | string_to_double (const char *dblstring, const char **endptr) |
double | string_to_double (const String &string) |
std::vector< double > | string_to_double_vector (const String &string) |
double | string_to_float (const String &string) |
String | string_to_hex (const String &input) |
String | string_to_identifier (const String &input) |
int64 | string_to_int (const String &string, size_t *consumed, uint base) |
long double | string_to_long_double (const char *dblstring, const char **endptr) |
long double | string_to_long_double (const String &string) |
String | string_to_ncname (const String &input, uint32_t substitute) |
double | string_to_seconds (const String &string, double fallback) |
template<typename Type > | |
Type | string_to_type (const String &string) |
template<> | |
bool | string_to_type< bool > (const String &string) |
template<> | |
double | string_to_type< double > (const String &string) |
template<> | |
float | string_to_type< float > (const String &string) |
template<> | |
int | string_to_type< int > (const String &string) |
template<> | |
int16 | string_to_type< int16 > (const String &string) |
template<> | |
int64 | string_to_type< int64 > (const String &string) |
template<> | |
long double | string_to_type< long double > (const String &string) |
template<> | |
String | string_to_type< String > (const String &string) |
template<> | |
uint | string_to_type< uint > (const String &string) |
template<> | |
uint16 | string_to_type< uint16 > (const String &string) |
template<> | |
uint64 | string_to_type< uint64 > (const String &string) |
uint64 | string_to_uint (const String &string, size_t *consumed, uint base) |
String | string_tolower (const String &str) |
String | string_totitle (const String &str) |
String | string_toupper (const String &str) |
String | string_url_decode (const String &urlstr, const bool form_url_encoded) |
String | string_url_encode (const String &rawstr, const bool form_url_encoded) |
void | string_vector_erase_empty (StringS &svector) |
String | string_vector_find (const StringS &svector, const String &prefix, const String &fallback) |
String | string_vector_find_value (const StringS &svector, const String &prefix, const String &fallback) |
void | string_vector_lstrip (StringS &svector) |
void | string_vector_rstrip (StringS &svector) |
void | string_vector_strip (StringS &svector) |
String | string_vprintf (const char *format, va_list vargs) |
String | stringify_clip_note (const ClipNote &n) |
StringS | strings_version_sort (const StringS &strings, bool reverse) |
void | strings_version_sort (StringS *strings, bool reverse) |
const char * | strrstr (const char *haystack, const char *needle) |
template<class T > | |
TelemetryField | telemetry_field (const String &name, const T *field) |
bool | text_convert (const String &to_charset, String &output_string, const String &from_charset, const String &input_string, const String &fallback_charset, const String &output_mark) |
String | this_thread_get_name () |
int | this_thread_getpid () |
int | this_thread_gettid () |
bool | this_thread_is_ase () |
int | this_thread_online_cpus () |
ThreadId | this_thread_self () |
void | this_thread_set_name (const String &name16chars) |
uint64 | timestamp_benchmark () |
String | timestamp_format (uint64 stamp, uint maxlength) |
uint64_t | timestamp_now () |
uint64 | timestamp_realtime () |
uint64 | timestamp_resolution () |
uint64 | timestamp_startup () |
constexpr uint16_t | uint16_swap_le_be (uint16_t v) |
constexpr uint32_t | uint32_swap_le_be (uint32_t v) |
constexpr uint64_t | uint64_swap_le_be (uint64_t v) |
constexpr bool | unicode_is_assigned (uint32_t u) |
constexpr bool | unicode_is_character (uint32_t u) |
constexpr bool | unicode_is_control_code (uint32_t u) |
constexpr bool | unicode_is_noncharacter (uint32_t u) |
constexpr bool | unicode_is_private (uint32_t u) |
constexpr bool | unicode_is_valid (uint32_t u) |
int | user_id () |
String | user_name () |
String | user_real_name () |
size_t | utf8_to_unicode (const char *str, uint32_t *codepoints) |
size_t | utf8_to_unicode (const std::string &str, std::vector< uint32_t > &codepoints) |
std::vector< uint32_t > | utf8decode (const std::string &utf8str) |
std::string | utf8encode (const std::vector< uint32_t > &codepoints) |
std::string | utf8encode (const uint32_t *codepoints, size_t n_codepoints) |
size_t | utf8len (const char *str) |
size_t | utf8len (const std::string &str) |
float | value2hz (float x) |
template<typename Float > | |
Float | voltage2db (Float x) |
template<typename Float > | |
Float | voltage2hz (Float x) |
template<typename Float > | |
Float | voltage_changed (Float a, Float b) |
template<class ... A> | |
void | warning (const char *format, const A &...args) |
template<class ... Args> | |
void | warning (const char *format, const Args &...args) |
WaveWriterP | wave_writer_create_flac (int rate, int channels, const String &filename, int mode, int compresion) |
WaveWriterP | wave_writer_create_opus (int rate, int channels, const String &filename, int mode, int complexity, float bitrate) |
WaveWriterP | wave_writer_create_wav (int rate, int channels, const String &filename, int mode, uint8_t n_bits) |
String | wave_writer_flac_version () |
String | wave_writer_opus_version () |
template<class C > | |
std::shared_ptr< C > | weak_ptr_fetch_or_create (std::weak_ptr< C > &wptr, const std::function< std::shared_ptr< C >()> &ctor) |
uint8 * | zintern_decompress (unsigned int decompressed_size, const unsigned char *cdata, unsigned int cdata_size) |
void | zintern_free (uint8 *dc_data) |
String | zstd_compress (const String &input, int level) |
String | zstd_compress (const void *src, size_t src_size, int level) |
ssize_t | zstd_target_size (const String &input) |
String | zstd_uncompress (const String &input) |
ssize_t | zstd_uncompress (const String &input, void *dst, size_t dst_size) |
The Anklang C++ API namespace.
@TODO:
using Atomic = boost::atomic<T> |
Substitute for std::atomic<> with fixes for GCC.
using ClapEventParamS = std::vector<clap_event_param_value> |
using ClapEventUnionS = std::vector<ClapEventUnion> |
using ClapResourceHash = std::tuple<clap_id,String> |
using ClapResourceHashS = std::vector<ClapResourceHash> |
using ClapParamIdValue = std::tuple<clap_id,double> |
using ClapParamIdValueS = std::vector<ClapParamIdValue> |
using ClapParamInfoMap = std::unordered_map<clap_id,ClapParamInfoImpl*> |
using ClapParamUpdateS = std::vector<ClapParamUpdate> |
using ClapParamInfoS = std::vector<ClapParamInfo> |
using ClipImplGeneratorS = std::vector<ClipImpl::Generator> |
typedef uint32_t uint |
Provide 'uint' as convenience type.
typedef uint8_t uint8 |
An 8-bit unsigned integer.
typedef uint16_t uint16 |
A 16-bit unsigned integer.
typedef uint32_t uint32 |
A 32-bit unsigned integer.
typedef uint64_t uint64 |
A 64-bit unsigned integer, use PRI*64 in format strings.
typedef int8_t int8 |
An 8-bit signed integer.
typedef int16_t int16 |
A 16-bit signed integer.
typedef int32_t int32 |
A 32-bit signed integer.
typedef int64_t int64 |
A 64-bit unsigned integer, use PRI*64 in format strings.
typedef std::string String |
Convenience alias for std::string.
using StringPair = std::pair<std::string, std::string> |
using VoidF = std::function<void()> |
using VirtualBaseP = std::shared_ptr<VirtualBase> |
using REQUIRES = typename ::std::enable_if<value, bool>::type |
REQUIRES<value> - Simplified version of std::enable_if<cond,bool>::type to use SFINAE in function templates.
using REQUIRESv = typename ::std::enable_if<value, void>::type |
REQUIRESv<value> - Simplified version of std::enable_if<cond,void>::type to use SFINAE in struct templates.
using CallbackS = std::vector<std::function<void()> > |
using DCallbackS = std::vector<std::function<void(double)> > |
using EventConnectionW = std::weak_ptr<EventConnection> |
using EventConnectionP = std::shared_ptr<EventConnection> |
using EventHandler = std::function<void (const Event&)> |
using InstanceP = std::shared_ptr<SharedBase> |
using RegisteredLoaderFunc = Error (*) () |
using RegisteredLoaderVector = std::vector<RegisteredLoader> |
using DriverP = Driver::DriverP |
using MidiDriverP = MidiDriver::MidiDriverP |
using PcmDriverP = PcmDriver::PcmDriverP |
using VoidFunc = std::function<void()> |
using StartQueue = AsyncBlockingQueue<char> |
using JsonapiConnectionP = std::shared_ptr<JsonapiConnection> |
using JsonapiConnectionW = std::weak_ptr<JsonapiConnection> |
using JsonapiBinarySender = std::function<bool(const String&)> |
A std::unique_ptr<> for Loft allocations.
typedef std::shared_ptr<EventSource> EventSourceP |
typedef std::shared_ptr<TimedSource> TimedSourceP |
typedef std::shared_ptr<PollFDSource> PollFDSourceP |
typedef std::shared_ptr<DispatcherSource> DispatcherSourceP |
typedef std::shared_ptr<USignalSource> USignalSourceP |
typedef std::shared_ptr<EventLoop> EventLoopP |
using MonitorImplP = std::shared_ptr<MonitorImpl> |
using ObjectImplP = std::shared_ptr<ObjectImpl> |
using MinMaxStep = std::tuple<double,double,double> |
Min, max, stepping for double ranges.
using ChoicesFunc = std::function<ChoiceS(const CString&)> |
Handler to generate all possible parameter choices dynamically.
using ParamInitialVal = std::variant<bool,int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,int64_t,uint64_t,float,double,const char*,std::string> |
Initial value for parameters.
using ParameterC = std::shared_ptr<const Parameter> |
using ThreadId = std::thread::id |
using StringPairS = std::vector<std::tuple<String,String> > |
using ProjectImplP = std::shared_ptr<ProjectImpl> |
using PrefsValueCallbackList = CallbackList<CString,const Value&> |
using PrefsMap = std::unordered_map<CString,PrefsValue> |
using PropertyGetter = std::function<void (Value&)> |
Function type for Property value getters.
using PropertySetter = std::function<bool (const Value&)> |
Function type for Property value setters.
using PropertyLister = std::function<ChoiceS (const ParameterProperty&)> |
Variant type to hold different types of values.
using IDX = typename ::std::enable_if<I == J, bool>::type |
using TYP = typename ::std::enable_if<std::is_same<T, C>::value, bool>::type |
using WaveWriterP = std::shared_ptr<WaveWriter> |
using WebSocketServerImplP = std::shared_ptr<WebSocketServerImpl> |
using WppServer = websocketpp::server<CustomServerConfig> |
using WppConnectionP = WppServer::connection_ptr |
using WppConnection = WppConnectionP::element_type |
using WppHdl = websocketpp::connection_hdl |
using WebSocketServerP = std::shared_ptr<WebSocketServer> |
using WebSocketConnectionP = std::shared_ptr<WebSocketConnection> |
|
strong |
Enum representing Error states.
|
strong |
Musical tunings, see: http://en.wikipedia.org/wiki/Musical_tuning.
|
strong |
enum LogFlags |
|
strong |
|
strong |
Extended type information for MidiEvent.
|
strong |
ID type for AudioProcessor parameters, the ID numbers are user assignable.
ID type for AudioProcessor input buses, buses are numbered with increasing index.
ID type for AudioProcessor output buses, buses are numbered with increasing index.
|
strong |
Flags to indicate channel arrangements of a bus. See also: https://en.wikipedia.org/wiki/Surround_sound
enum CacheType |
|
constexpr |
const char * ase_error_blurb | ( | Error | error | ) |
Describe Error condition.
ChoiceS & operator+= | ( | ChoiceS & | choices, |
Choice && | newchoice | ||
) |
Convenience ChoiceS construction helper.
void zintern_free | ( | uint8 * | dc_data | ) |
Free data returned from zintern_decompress().
uint8 * zintern_decompress | ( | unsigned int | decompressed_size, |
const unsigned char * | cdata, | ||
unsigned int | cdata_size | ||
) |
Decompress data via zlib.
decompressed_size | exact size of the decompressed data to be returned |
cdata | compressed data block |
cdata_size | exact size of the compressed data block |
Decompress the data from cdata of length cdata_size into a newly allocated block of size decompressed_size which is returned. The returned block needs to be released with zintern_free(). This function is intended to decompress data which has been compressed with the packres.py utility, so no errors should occour during decompression. Consequently, if any error occours during decompression or if the resulting data block is of a size other than decompressed_size, the program will abort with an appropriate error message. If not enough memory could be allocated for decompression, NULL is returned.
StringS list_clap_files | ( | ) |
const char * clap_event_type_string | ( | int | etype | ) |
String clap_event_to_string | ( | const clap_event_note_t * | enote | ) |
DeviceInfo clap_device_info | ( | const ClapPluginDescriptor & | descriptor | ) |
bool is_aiff | ( | const String & | input | ) |
bool is_wav | ( | const String & | input | ) |
bool is_midi | ( | const String & | input | ) |
bool is_pdf | ( | const String & | input | ) |
String zstd_compress | ( | const void * | src, |
size_t | src_size, | ||
int | level | ||
) |
ssize_t zstd_target_size | ( | const String & | input | ) |
ssize_t zstd_uncompress | ( | const String & | input, |
void * | dst, | ||
size_t | dst_size | ||
) |
bool is_zstd | ( | const String & | input | ) |
bool is_lz4 | ( | const String & | input | ) |
bool is_zip | ( | const String & | input | ) |
bool is_arj | ( | const String & | input | ) |
bool is_isz | ( | const String & | input | ) |
bool is_ogg | ( | const String & | input | ) |
bool is_avi | ( | const String & | input | ) |
bool is_gz | ( | const String & | input | ) |
bool is_xz | ( | const String & | input | ) |
bool is_png | ( | const String & | input | ) |
bool is_jpg | ( | const String & | input | ) |
bool is_compressed | ( | const String & | input | ) |
StreamReaderP stream_reader_zstd | ( | StreamReaderP & | istream | ) |
StreamWriterP stream_writer_zstd | ( | const StreamWriterP & | ostream, |
int | level | ||
) |
|
noexcept |
Demangle identifier via libcc.
Demangle a std::typeinfo.name() string into a proper C++ type name. This function uses abi::__cxa_demangle() from <cxxabi.h> to demangle C++ type names, which works for g++, libstdc++, clang++, libc++.
std::string backtrace_command | ( | ) |
Find GDB and construct command line.
Command to start external debugger for a backtrace.
|
noexcept |
Print a debug message via assertion_failed() and abort the program.
|
noexcept |
Print instructive message, handle "breakpoint", "backtrace" and "fatal-warnings" in $ASE_DEBUG.
Issue a warning about an assertion error.
|
externconstexpr |
Test string equality at compile time.
void call_delete | ( | T * | o | ) |
Simple way to create a standalone callback to delete an object of type `T`.
std::shared_ptr< typename std::remove_pointer< Target >::type > shared_ptr_cast | ( | Source * | object | ) |
Shorthand for std::dynamic_pointer_cast<>(shared_from_this()). A shared_ptr_cast() takes a std::shared_ptr or a pointer to an object that supports std::enable_shared_from_this::shared_from_this(). Using std::dynamic_pointer_cast(), the shared_ptr passed in (or retrieved via calling shared_from_this()) is cast into a std::shared_ptr<Target>, possibly resulting in an empty (NULL) std::shared_ptr if the underlying dynamic_cast() was not successful or if a NULL object was passed in. Note that shared_from_this() can throw a std::bad_weak_ptr exception if the object has no associated std::shared_ptr (usually during ctor and dtor), in which case the exception will also be thrown from shared_ptr_cast<Target>(). However a shared_ptr_cast<Target*>() call will not throw and yield an empty (NULL) std::shared_ptr<Target>. This is analogous to dynamic_cast<T@amp> which throws, versus dynamic_cast<T*> which yields NULL.
std::bad_weak_ptr | if shared_from_this() throws, unless the Target* form is used. |
const std::shared_ptr< typename std::remove_pointer< Target >::type > shared_ptr_cast | ( | const Source * | object | ) |
std::shared_ptr< typename std::remove_pointer< Target >::type > shared_ptr_cast | ( | std::shared_ptr< Source > & | sptr | ) |
const std::shared_ptr< typename std::remove_pointer< Target >::type > shared_ptr_cast | ( | const std::shared_ptr< Source > & | sptr | ) |
std::shared_ptr< typename std::remove_pointer< Source >::type > shared_ptr_from | ( | Source * | object | ) |
Use `shared_ptr_cast<>()` to convert an object pointer into a `shared_ptr<>`.
std::shared_ptr< C > weak_ptr_fetch_or_create | ( | std::weak_ptr< C > & | wptr, |
const std::function< std::shared_ptr< C >()> & | ctor | ||
) |
Fetch `shared_ptr` from `wptr` and create `C` with `ctor` if needed.
float square_sum | ( | uint | n_values, |
const float * | ivalues | ||
) |
Calculate suqare sum of a block of floats.
float square_max | ( | uint | n_values, |
const float * | ivalues | ||
) |
Find the maximum suqared value in a block of floats.
void convert_samples | ( | size_t | n, |
S * | src, | ||
D * | dst, | ||
uint16 | byte_order | ||
) |
void convert_clip_samples | ( | size_t | n, |
S * | src, | ||
D * | dst, | ||
uint16 | byte_order | ||
) |
|
extern |
Fill `n` values of `dst` with `f`.
|
extern |
Copy a block of floats.
|
extern |
Copy a block of integers.
void convert_samples | ( | size_t | n, |
const int16_t * | src, | ||
float * | dst, | ||
uint16 | byte_order | ||
) |
void convert_clip_samples | ( | size_t | n, |
const float * | src, | ||
int16_t * | dst, | ||
uint16 | byte_order | ||
) |
std::pair< std::shared_ptr< E >, ssize_t > find_shared_by_ref | ( | const std::vector< std::shared_ptr< E > > & | v, |
const E & | e | ||
) |
bool * register_driver_loader | ( | const char * | staticwhat, |
Error(*)() | loader | ||
) |
Register loader callbacks at static constructor time.
void load_registered_drivers | ( | ) |
Load all registered drivers.
AudioEngine & make_audio_engine | ( | const VoidF & | owner_wakeup, |
uint | sample_rate, | ||
SpeakerArrangement | speakerarrangement | ||
) |
void collect_runtime_entropy | ( | uint64 * | data, |
size_t | n | ||
) |
Collect entropy from the current process, usually quicker than collect_system_entropy().
To provide good quality random number seeds, this function gathers entropy from a variety of process specific sources. Under Linux, this includes the CPU counters, clocks and random devices. In combination with well established techniques like syscall timings (see Entropics13 [Entropics13]) and a SHA3 algorithm derived random number generator for the mixing, the entropy collection is designed to be fast and good enough for all non-cryptographic uses. On an Intel Core i7, this function takes around 25µs.
void collect_system_entropy | ( | uint64 * | data, |
size_t | n | ||
) |
Collect entropy from system devices, like interrupt counters, clocks and random devices.
This function adds to collect_runtime_entropy() by collecting entropy from aditional but potentially slower system sources, such as interrupt counters, disk + network statistics, system load, execution + pipelining + scheduling latencies and device MACs. The function is designed to yield random number seeds good enough to generate cryptographic tokens like session keys. On an Intel Core i7, this function takes around 2ms, so it's roughly 80 times slower than collect_runtime_entropy().
std::string string_format | ( | const char * | format, |
const Args &... | args | ||
) |
Format a string similar to sprintf(3) with support for std::string and std::ostringstream convertible objects.
void jsonapi_require_auth | ( | const String & | subprotocol | ) |
WebSocketConnectionP jsonapi_make_connection | ( | WebSocketConnection::Internals & | internals, |
int | logflags | ||
) |
CustomDataContainer * jsonapi_connection_data | ( | ) |
JsonapiBinarySender jsonapi_connection_sender | ( | ) |
float damerau_levenshtein_restricted | ( | const std::string & | source, |
const std::string & | target, | ||
const float | ci, | ||
const float | cd, | ||
const float | cs, | ||
const float | ct | ||
) |
Damerau-Levenshtein Distance with restricted transposition. Calculate the restricted Damerau-Levenshtein string distance with quadratic time complexity and linear memory requirement. Memory: 12 * max(|source|,|target|) + constant.
float damerau_levenshtein_distance | ( | const std::string & | source, |
const std::string & | target, | ||
const float | ci, | ||
const float | cd, | ||
const float | cs, | ||
const float | ct | ||
) |
Damerau-Levenshtein Distance with unrestricted transpositions. Calculate the unrestricted Damerau-Levenshtein string distance with quadratic time complexity and quadratic memory requirement. Memory: 4 * |source|*|target| + constant.
LoftPtr< T > loft_make_unique | ( | Args &&... | args | ) |
Construct an object `T` from Loft memory, wrapped in a unique_ptr.
LogFlags log_setup | ( | int * | logfd | ) |
Configurable handler to open log files.
uint64_t timestamp_now | ( | ) |
Current time in µseconds.
void logmsg | ( | const std::string & | msg, |
const char *const | filename, | ||
const uint64_t | columnline, | ||
const char *const | function_name | ||
) |
void log | ( | const LogFormat & | format, |
const A &... | args | ||
) |
Write a log message to the log file (or possibly stderr), using the POSIX/C locale.
void main_loop_wakeup | ( | ) |
void main_loop_autostop_mt | ( | ) |
|
extern |
Round float to int, using round-to-nearest Fast version of `f < 0 ? int (f - 0.5) : int (f + 0.5)`.
|
extern |
Force number into double precision floating point format, even with `-ffast-math`.
|
extern |
Force number into single precision floating point format, even with `-ffast-math`.
|
extern |
Fast approximation of 2 raised to the power of `x`. The parameter `x` is the exponent within `[-127.0…+127.0]`. Within `-1…+1`, the error stays below 4e-7 which corresponds to a sample precision of 21 bit. For integer values of `x` (i.e. `x - floor (x) -> 0`), the error approaches zero. With FMA instructions and `-ffast-math` enabled, execution times should be below 10ns on 3GHz machines.
|
extern |
Fast approximation of logarithm to base 2. The parameter `x` is the exponent within `[1.1e-38…2^127]`. Within `1e-7…+1`, the error stays below 3.8e-6 which corresponds to a sample precision of 18 bit. When `x` is an exact power of 2, the error approaches zero. With FMA instructions and `-ffast-math enabled`, execution times should be below 10ns on 3GHz machines.
|
extern |
Convert synthesizer value (Voltage) to Hertz.
|
extern |
Convert Hertz to synthesizer value (Voltage).
void * fast_mem_alloc | ( | size_t | size | ) |
void fast_mem_free | ( | void * | mem | ) |
int QueueMultiplexer_priority | ( | const MidiEvent & | e | ) |
DeviceP create_processor_device | ( | AudioEngine & | engine, |
const String & | uri, | ||
bool | engineproducer | ||
) |
Create a few letter nick name from a multi word parameter label.
Find a suitable 3-letter abbreviation for a Parameter without nick.
Retrieve various resource paths at runtime.
const char *() _ | ( | const char * | string | ) |
Translate message strings in the Anklang/ASE text domain.
std::string() _ | ( | const std::string & | string | ) |
Translate message strings in the Anklang/ASE text domain.
const char *() _ | ( | const char * | string, |
const char * | plural, | ||
int64_t | n | ||
) |
Translate message strings in the Anklang/ASE text domain, use @plural forms if
!= 1.
std::string() _ | ( | const std::string & | string, |
const std::string & | plural, | ||
int64_t | n | ||
) |
Translate message strings in the Anklang/ASE text domain, use @plural forms if
!= 1.
std::string cpu_arch | ( | ) |
Retrieve string identifying the CPU architecture.
std::string cpu_info | ( | ) |
Retrieve string identifying the runtime CPU type.
The returned string contains: number of online CPUs, a string describing the CPU architecture, the vendor and finally a number of flag words describing CPU features plus a trailing space. This allows checks for CPU features via a simple string search for " FEATURE ".
uint64 timestamp_startup | ( | ) |
Provides the timestamp_realtime() value from program startup.
uint64 timestamp_realtime | ( | ) |
Return the current time as uint64 in µseconds.
uint64 timestamp_resolution | ( | ) |
Provide resolution of timestamp_benchmark() in nano-seconds.
uint64 timestamp_benchmark | ( | ) |
Returns benchmark timestamp in nano-seconds, clock starts around program startup.
Convert stamp into a string, adding µsecond fractions if space permits.
uint64 monotonic_counter | ( | ) |
A monotonically increasing counter, increments are atomic and visible in all threads.
std::string executable_path | ( | ) |
Retrieve the path to the currently running executable.
std::string executable_name | ( | ) |
Retrieve the name part of executable_path().
void fatal_system_error | ( | const char * | file, |
uint | line, | ||
const char * | format, | ||
... | |||
) |
const char * ase_version | ( | ) |
Provide a string containing the package version.
const char * ase_build_id | ( | ) |
Provide a string containing the ASE library build id.
String program_alias | ( | ) |
Retrieve the program name as used for logging or debug messages.
void program_alias_init | ( | String | customname | ) |
Set program_alias to a non-localized alias other than program_argv0 if desired.
String application_name | ( | ) |
Retrieve the localized program name intended for user display.
void application_name_init | ( | String | desktopname | ) |
Set the application_name to a name other than program_alias if desired.
String program_cwd | ( | ) |
The current working directory during startup.
int sched_get_priority | ( | int | tid | ) |
Retrieve the nice level of process or thread `tid`.
bool sched_set_priority | ( | int | tid, |
int | nicelevel | ||
) |
Try to set the nice level of process or thread `tid` to `nicelevel`.
bool sched_fast_priority | ( | int | tid | ) |
Try to acquire low latency scheduling priority, returns true if nice level is < 0.
ThreadId this_thread_self | ( | ) |
void this_thread_set_name | ( | const String & | name16chars | ) |
String this_thread_get_name | ( | ) |
int this_thread_getpid | ( | ) |
int this_thread_gettid | ( | ) |
int this_thread_online_cpus | ( | ) |
int user_id | ( | ) |
String user_name | ( | ) |
String user_real_name | ( | ) |
const char *() __format_arg__ | ( | 2 | ) |
bool this_thread_is_ase | ( | ) |
|
extern |
Cause a debugging breakpoint, for development only.
CString register_audio_processor | ( | const char * | aseid = nullptr | ) |
Add an AudioProcessor derived type to the audio processor registry.
std::function< void(Value &)> make_enum_getter | ( | Enum * | v | ) |
Value getter for enumeration types.
std::function< bool(const Value &)> make_enum_setter | ( | Enum * | v | ) |
Value setter for enumeration types.
ChoiceS enum_lister | ( | const ParameterProperty & | ) |
Helper to list Jsonipc::Enum<> type values as Choice.
void sha3_224_hash | ( | const void * | data, |
size_t | data_length, | ||
uint8_t | hashvalue[28] | ||
) |
Calculate 224 bit SHA3 digest from data, see also class SHA3_224.
void sha3_256_hash | ( | const void * | data, |
size_t | data_length, | ||
uint8_t | hashvalue[32] | ||
) |
Calculate 256 bit SHA3 digest from data, see also class SHA3_256.
void sha3_384_hash | ( | const void * | data, |
size_t | data_length, | ||
uint8_t | hashvalue[48] | ||
) |
Calculate 384 bit SHA3 digest from data, see also class SHA3_384.
void sha3_512_hash | ( | const void * | data, |
size_t | data_length, | ||
uint8_t | hashvalue[64] | ||
) |
Calculate 512 bit SHA3 digest from data, see also class SHA3_512.
void shake128_hash | ( | const void * | data, |
size_t | data_length, | ||
uint8_t * | hashvalues, | ||
size_t | n | ||
) |
Calculate SHA3 extendable output digest for 128 bit security strength, see also class SHAKE128.
void shake256_hash | ( | const void * | data, |
size_t | data_length, | ||
uint8_t * | hashvalues, | ||
size_t | n | ||
) |
Calculate SHA3 extendable output digest for 256 bit security strength, see also class SHAKE256.
uint64_t random_int64 | ( | ) |
Generate a non-deterministic, uniformly distributed 64 bit pseudo-random number. This function generates pseudo-random numbers using the system state as entropy and class KeccakRng for the mixing. No seeding is required.
int64_t random_irange | ( | int64_t | begin, |
int64_t | end | ||
) |
Generate uniformly distributed pseudo-random integer within range. This function generates a pseudo-random number like random_int64(), constrained to the range: begin <= number < end.
double random_float | ( | ) |
Generate uniformly distributed pseudo-random floating point number. This function generates a pseudo-random number like random_int64(), constrained to the range: 0.0 <= number < 1.0.
double random_frange | ( | double | begin, |
double | end | ||
) |
Generate uniformly distributed pseudo-random floating point number within a range. This function generates a pseudo-random number like random_float(), constrained to the range: begin <= number < end.
uint64_t random_nonce | ( | ) |
Provide a unique 64 bit identifier that is not 0, see also random_int64().
void random_secret | ( | uint64_t * | secret_var | ) |
Generate a secret non-zero nonce in secret_var, unless it has already been assigned.
String json_stringify | ( | const T & | source, |
Writ::Flags | flags = Writ::Flags (0) |
||
) |
Create JSON string from `source`.
bool json_parse | ( | const String & | jsonstring, |
T & | target | ||
) |
Parse a well formed JSON string and assign contents to `target`.
T json_parse | ( | const String & | jsonstring | ) |
Parse a well formed JSON string and return the resulting value.
TelemetryField telemetry_field | ( | const String & | name, |
const T * | field | ||
) |
Float hz_changed | ( | Float | a, |
Float | b | ||
) |
Determine a significant frequency change (audible Hertz).
Float voltage2hz | ( | Float | x | ) |
Convert synthesizer value (Voltage) to Hertz.
float fast_voltage2hz | ( | float | x | ) |
Float precision variant of voltage2hz using fast_exp2().
Float hz2voltage | ( | Float | x | ) |
Convert Hertz to synthesizer value (Voltage).
float fast_hz2voltage | ( | float | x | ) |
Float precision variant of hz2voltage using fast_log2().
Float db_changed | ( | Float | a, |
Float | b | ||
) |
Determine a significant Decibel change.
Float voltage2db | ( | Float | x | ) |
Convert synthesizer value (Voltage) to Decibel.
float fast_voltage2db | ( | float | x | ) |
Float precision variant of voltage2db using fast_log2().
Float db2voltage | ( | Float | x | ) |
Convert Decibel to synthesizer value (Voltage).
float fast_db2voltage | ( | float | x | ) |
Float precision variant of db2voltage using fast_exp2().
Float voltage_changed | ( | Float | a, |
Float | b | ||
) |
Determine a significant synthesizer value (Voltage) change.
void fixed_sort | ( | RandomIt | first, |
RandomIt | last, | ||
Compare | comp = std::less<typename std::iterator_traits<RandomIt>::value_type>() |
||
) |
Use sorting networks to sort containers <= 16 elements without allocations.
String anklang_cachedir_create | ( | ) |
Create exclusive cache directory for this process' runtime.
void anklang_cachedir_cleanup | ( | const String & | cachedir | ) |
Cleanup a cachedir previously created with anklang_cachedir_create().
void anklang_cachedir_clean_stale | ( | ) |
Clean stale cache directories from past runtimes, may be called from any thread.
StreamReaderP stream_reader_from_file | ( | const String & | file | ) |
StreamReaderP stream_reader_zip_member | ( | const String & | archive, |
const String & | member, | ||
Storage::StorageFlags | f | ||
) |
StreamWriterP stream_writer_create_file | ( | const String & | filename, |
int | mode | ||
) |
Force lower case, alphanumerics + underscore and non-digit start.
String string_canonify | ( | const String & | string, |
const String & | valid_chars, | ||
const String & | substitute | ||
) |
Enforce a canonical charset for a string. Convert all chars in `string` that are not listed as `valid_chars` with substitute.
Check if string_canonify() would modify string.
const String & string_set_a2z | ( | ) |
Returns a string containing all of a-z.
const String & string_set_A2Z | ( | ) |
Returns a string containing all of A-Z.
const String & string_set_ascii_alnum | ( | ) |
Returns a string containing all of 0-9, A-Z and a-z.
bool string_is_ascii_alnum | ( | const String & | str | ) |
Convert all string characters into Unicode lower case characters.
bool string_islower | ( | const String & | str | ) |
Check if all string characters are Unicode lower case characters.
Convert all string characters into Unicode upper case characters.
bool string_isupper | ( | const String & | str | ) |
Check if all string characters are Unicode upper case characters.
Convert all string characters into Unicode title characters.
Capitalize words, so the first letter is upper case, the rest lower case.
Formatting stripped normalized composed UTF-8 string.
Formatting stripped normalized decomposed UTF-8 string.
Yield UTF-8 string useful for case insensitive comparisons.
String string_vprintf | ( | const char * | format, |
va_list | vargs | ||
) |
Formatted printing ala vprintf() into a String, using the POSIX/C locale.
String string_locale_vprintf | ( | const char * | format, |
va_list | vargs | ||
) |
Formatted printing like string_vprintf using the current locale.
Split a string, using splitter as delimiter. Passing "" as splitter will split the string at whitespace positions.
Split a string, using any of the splitchars as delimiter. Passing "" as splitter will split the string between all position.
void strings_version_sort | ( | StringS * | strings, |
bool | reverse | ||
) |
void string_vector_erase_empty | ( | StringS & | svector | ) |
Remove empty elements from a string vector.
void string_vector_lstrip | ( | StringS & | svector | ) |
Left-strip all elements of a string vector, see string_lstrip().
void string_vector_rstrip | ( | StringS & | svector | ) |
Right-strip all elements of a string vector, see string_rstrip().
void string_vector_strip | ( | StringS & | svector | ) |
Strip all elements of a string vector, see string_strip().
Join a number of strings. Join a string vector into a single string, using junctor inbetween each pair of strings.
bool string_to_bool | ( | const String & | string, |
bool | fallback | ||
) |
Interpret a string as boolean value. Interpret the string as number, "ON"/"OFF" or distinguish "false"/"true" or "yes"/"no" by starting letter. For empty strings, fallback is returned.
bool cstring_to_bool | ( | const char * | string, |
bool | fallback | ||
) |
const char * strrstr | ( | const char * | haystack, |
const char * | needle | ||
) |
const char * string_find_word | ( | const char * | haystack, |
const char * | word | ||
) |
Find occurance of `word` in `haystack`.
String string_from_bool | ( | bool | value | ) |
Convert a boolean value into a string.
Parse a string into a 64bit unsigned integer, optionally specifying the expected number base.
bool string_has_int | ( | const String & | string | ) |
Checks if a string contains a digit, optionally preceeded by whitespaces.
Parse a string into a 64bit integer, optionally specifying the expected number base.
long double posix_locale_strtold | ( | const char * | nptr, |
char ** | endptr | ||
) |
Parse a double from a string ala strtod(), trying locale specific characters and POSIX/C formatting.
long double current_locale_strtold | ( | const char * | nptr, |
char ** | endptr | ||
) |
Parse a double from a string ala strtod(), trying locale specific characters and POSIX/C formatting.
long double string_to_long_double | ( | const String & | string | ) |
Parse a long double from a string, trying locale specific characters and POSIX/C formatting.
long double string_to_long_double | ( | const char * | dblstring, |
const char ** | endptr | ||
) |
Similar to string_to_long_double(const String&), but returns the first failing character position in endptr.
double string_to_double | ( | const String & | string | ) |
Parse a double from a string, trying locale specific characters and POSIX/C formatting.
double string_to_double | ( | const char * | dblstring, |
const char ** | endptr | ||
) |
Similar to string_to_double(const String&), but returns the first failing character position in endptr.
String string_from_float | ( | float | value | ) |
Convert a float into a string, using the POSIX/C locale.
String string_from_double | ( | double | value | ) |
Convert a double into a string, using the POSIX/C locale.
String string_from_long_double | ( | long double | value | ) |
Convert a long double into a string, using the POSIX/C locale.
std::vector< double > string_to_double_vector | ( | const String & | string | ) |
Parse a string into a list of doubles, expects ';' as delimiter.
Construct a string out of all double values passed in dvec, separated by delim.
double string_to_seconds | ( | const String & | string, |
double | fallback | ||
) |
Parse string into seconds.
String string_from_errno | ( | int | errno_val | ) |
Returns a String describing the passed in errno value, similar to strerror().
bool string_is_uuid | ( | const String & | uuid_string | ) |
Returns whether uuid_string contains a properly formatted UUID string.
Returns whether uuid_string1 compares smaller (-1), equal (0) or greater (+1) to uuid_string2.
Returns whether `string` starts with `fragment`.
Returns whether string starts with any element of `fragments`.
Returns whether `string` ends with `fragment`.
Returns whether string ends with any element of `fragments`.
Variant of string_match_identifier() that matches tail against ident at word boundary.
Check equality of strings canonicalized to "[0-9a-z_]+".
String string_from_pretty_function_name | ( | const char * | cxx_pretty_function | ) |
Extract the full function name from __PRETTY_FUNCTION__. See also ASE_SIMPLE_FUNCTION.
Decode URL %-sequences in a string, decode '+' if `form_url_encoded`.
Encode special characters to URL %-sequences, encode space as '+' if `form_url_encoded`.
Escape text like a C string. Returns a string that escapes all characters with a backslash '\' that need escaping in C language string syntax.
Parse a possibly quoted C string into regular string.
String string_replace | ( | const String & | input, |
const String & | marker, | ||
const String & | replacement, | ||
size_t | maxn | ||
) |
Replace substring marker in input with replacement, at most maxn times.
Replace all occouranes of match in input with subst.
Convert bytes in string `input` to hexadecimal numbers.
String string_hexdump | ( | const void * | addr, |
size_t | length, | ||
size_t | initial_offset | ||
) |
Produce hexdump of a memory region. Each output line consists of its hexadecimal offset, 16 hexadecimal bytes and the ASCII representation of the same 16 bytes.
Fill a memory area with a 32-bit quantitiy.
String string_vector_find | ( | const StringS & | svector, |
const String & | prefix, | ||
const String & | fallback | ||
) |
Search for prefix in svector and return the matching element. If multiple matches are possible, the last one is returned.
String string_vector_find_value | ( | const StringS & | svector, |
const String & | prefix, | ||
const String & | fallback | ||
) |
Search for prefix in svector and return reminder of the matching string. If multiple matches are possible, the last one is returned.
StringS cstrings_to_vector | ( | const char * | s, |
... | |||
) |
Construct a StringS from a NULL terminated list of string arguments.
std::string_view string_option_find_value | ( | const char * | string, |
const char * | feature, | ||
const String & | fallback, | ||
const String & | denied, | ||
bool | matchallnone | ||
) |
Low level option search, avoids dynamic allocations.
String string_option_find | ( | const String & | optionlist, |
const String & | feature, | ||
const String & | fallback | ||
) |
Retrieve the option value from an options list separated by ':' or ';' or `fallback`.
Check if an option is set/unset in an options list string.
bool text_convert | ( | const String & | to_charset, |
String & | output_string, | ||
const String & | from_charset, | ||
const String & | input_string, | ||
const String & | fallback_charset, | ||
const String & | output_mark | ||
) |
Convert a string from one encoding to another. Convert input_string from encoding from_charset to to_charset, returning output_string. Interpret unknown characters according to fallback_charset. Use output_mark in place of unconvertible characters. Returns whether the conversion was successful.
const char * strerror | ( | int | errno_num | ) |
Get POSIX locale strerror.
const char * strerror | ( | ) |
String string_from_float | ( | double | value | ) |
double string_to_float | ( | const String & | string | ) |
Type string_to_type | ( | const String & | string | ) |
Convert a string to template argument type, such as bool, int, double.
String string_from_type | ( | Type | value | ) |
Create a string from a templated argument value, such as bool, int, double.
long double string_to_type< long double > | ( | const String & | string | ) |
String string_from_type< long double > | ( | long double | value | ) |
double string_to_type< double > | ( | const String & | string | ) |
String string_from_type< double > | ( | double | value | ) |
float string_to_type< float > | ( | const String & | string | ) |
String string_from_type< float > | ( | float | value | ) |
bool string_to_type< bool > | ( | const String & | string | ) |
String string_from_type< bool > | ( | bool | value | ) |
int16 string_to_type< int16 > | ( | const String & | string | ) |
String string_from_type< int16 > | ( | int16 | value | ) |
uint16 string_to_type< uint16 > | ( | const String & | string | ) |
String string_from_type< uint16 > | ( | uint16 | value | ) |
int string_to_type< int > | ( | const String & | string | ) |
String string_from_type< int > | ( | int | value | ) |
uint string_to_type< uint > | ( | const String & | string | ) |
String string_from_type< uint > | ( | uint | value | ) |
int64 string_to_type< int64 > | ( | const String & | string | ) |
String string_from_type< int64 > | ( | int64 | value | ) |
uint64 string_to_type< uint64 > | ( | const String & | string | ) |
String string_from_type< uint64 > | ( | uint64 | value | ) |
String string_to_type< String > | ( | const String & | string | ) |
String string_from_type< String > | ( | String | value | ) |
uint8 speaker_arrangement_count_channels | ( | SpeakerArrangement | spa | ) |
bool speaker_arrangement_is_aux | ( | SpeakerArrangement | spa | ) |
SpeakerArrangement speaker_arrangement_channels | ( | SpeakerArrangement | spa | ) |
const char * speaker_arrangement_bit_name | ( | SpeakerArrangement | spa | ) |
std::string speaker_arrangement_desc | ( | SpeakerArrangement | spa | ) |
std::string encodefs | ( | const std::string & | fschars | ) |
Encode a file system path consisting of bytes into UTF-8, using surrogate code points to store non UTF-8 bytes.
std::string decodefs | ( | const std::string & | utf8str | ) |
Decode UTF-8 string back into file system path representation, extracting surrogate code points as bytes.
std::string displayfs | ( | const std::string & | utf8str | ) |
Convert UTF-8 encoded file system path into human readable display format, the conversion is lossy but readable.
size_t utf8len | ( | const char * | str | ) |
Count valid UTF-8 sequences, invalid sequences are counted as Latin-1 characters.
size_t utf8len | ( | const std::string & | str | ) |
Count valid UTF-8 sequences, invalid sequences are counted as Latin-1 characters.
std::vector< uint32_t > utf8decode | ( | const std::string & | utf8str | ) |
Convert valid UTF-8 sequences to Unicode codepoints, invalid sequences are treated as Latin-1 characters.
size_t utf8_to_unicode | ( | const char * | str, |
uint32_t * | codepoints | ||
) |
Convert valid UTF-8 sequences to Unicode codepoints, invalid sequences are treated as Latin-1 characters. The array codepoints must be able to hold at least as many elements as are characters stored in str. Returns the number of codepoints stored in codepoints.
size_t utf8_to_unicode | ( | const std::string & | str, |
std::vector< uint32_t > & | codepoints | ||
) |
Convert valid UTF-8 sequences to Unicode codepoints, invalid sequences are treated as Latin-1 characters. Returns the number of codepoints newly stored in codepoints.
std::string utf8encode | ( | const uint32_t * | codepoints, |
size_t | n_codepoints | ||
) |
Convert codepoints into an UTF-8 string, using the shortest possible encoding.
std::string utf8encode | ( | const std::vector< uint32_t > & | codepoints | ) |
Convert codepoints into an UTF-8 string, using the shortest possible encoding.
bool string_is_ncname | ( | const String & | input | ) |
Check `input` to be a NCName, according to the QName EBNF. See https://en.wikipedia.org/wiki/QName
Convert `input` to a NCName, according to the QName EBNF. See https://en.wikipedia.org/wiki/QName
|
constexpr |
Return whether u is an allowed Unicode codepoint within 0x10FFFF and not part of a UTF-16 surrogate pair.
|
constexpr |
Return whether u matches any of the assigned Unicode planes.
|
constexpr |
Return whether u is one of the 66 Unicode noncharacters.
|
constexpr |
Return whether u is not one of the 66 Unicode noncharacters.
|
constexpr |
Return whether u is one of the 65 Unicode control codes.
|
constexpr |
Return whether u is in one of the 3 private use areas of Unicode.
bool debug_key_enabled | ( | const char * | conditional | ) |
Check if `conditional` is enabled by $ASE_DEBUG.
bool debug_key_enabled | ( | const ::std::string & | conditional | ) |
Check if `conditional` is enabled by $ASE_DEBUG.
std::string debug_key_value | ( | const char * | conditional | ) |
Retrieve the value assigned to debug key `conditional` in $ASE_DEBUG.
void debug_message | ( | const char * | cond, |
const std::string & | message | ||
) |
Print a debug message, called from Ase::debug().
void void const char * ase_gettext | ( | const String & | untranslated | ) |
const char void atquit_add | ( | std::function< void()> * | func | ) |
void atquit_del | ( | std::function< void()> * | func | ) |
void atquit_run | ( | int | exitcode | ) |
bool atquit_triggered | ( | ) |
bool ASE_PURE debug_enabled | ( | ) |
Check if any kind of debugging is enabled by $ASE_DEBUG.
bool debug_key_enabled | ( | const std::string & | conditional | ) |
void debug | ( | const char * | cond, |
const char * | format, | ||
const A &... | args | ||
) |
void fatal_error | ( | const char * | format, |
const A &... | args | ||
) |
void warning | ( | const char * | format, |
const A &... | args | ||
) |
void printout | ( | const char * | format, |
const A &... | args | ||
) |
void void printerr | ( | const char * | format, |
const A &... | args | ||
) |
const char * ase_gettext | ( | const char * | format, |
const A0 & | a0, | ||
const Ar &... | restargs | ||
) |
Translate a string, using the ASE locale.
|
constexpr |
Swap 16-Bit integers between __BIG_ENDIAN and __LITTLE_ENDIAN systems.
|
constexpr |
Swap 32-Bit integers between __BIG_ENDIAN and __LITTLE_ENDIAN systems.
|
constexpr |
Swap 64-Bit integers between __BIG_ENDIAN and __LITTLE_ENDIAN systems.
void debug | ( | const char * | cond, |
const char * | format, | ||
const Args &... | args | ||
) |
Issue a printf-like debugging message if `cond` is enabled by $ASE_DEBUG.
void ASE_NORETURN fatal_error | ( | const char * | format, |
const Args &... | args | ||
) |
Issue a printf-like message and abort the program, this function will not return. Avoid using this in library code, aborting may take precious user data with it, library code should instead use warning(), info() or assert_return().
void warning | ( | const char * | format, |
const Args &... | args | ||
) |
Issue a printf-like warning message.
void printout | ( | const char * | format, |
const Args &... | args | ||
) |
Print a message on stdout (and flush stdout) ala printf(), using the POSIX/C locale.
void printerr | ( | const char * | format, |
const Args &... | args | ||
) |
Print a message on stderr (and flush stderr) ala printf(), using the POSIX/C locale.
WaveWriterP wave_writer_create_wav | ( | int | rate, |
int | channels, | ||
const String & | filename, | ||
int | mode, | ||
uint8_t | n_bits | ||
) |
String wave_writer_opus_version | ( | ) |
WaveWriterP wave_writer_create_opus | ( | int | rate, |
int | channels, | ||
const String & | filename, | ||
int | mode, | ||
int | complexity, | ||
float | bitrate | ||
) |
String wave_writer_flac_version | ( | ) |
WaveWriterP wave_writer_create_flac | ( | int | rate, |
int | channels, | ||
const String & | filename, | ||
int | mode, | ||
int | compresion | ||
) |
|
constexpr |
GUI READABLE WRITABLE.
|
constexpr |
STORAGE READABLE WRITABLE.
|
constexpr |
STORAGE GUI READABLE WRITABLE.
|
constexpr |
First (internal) MIDI note event ID (lower IDs are reserved for external notes).
|
constexpr |
Last valid (internal) MIDI note event ID.
size_t level |
size_t size |
bool assertion_failed_fatal |
Global flag to force aborting on assertion warnings.
const A & args |
float const_float_zeros |
Block of const floats allof value 0.
|
constexpr |
Maximum number of values in the const_float_zeros block.
|
constexpr |
|
constexpr |
|
constexpr |
bool const char* fileglob |
bool const char const size_t maxbytes |
|
constexpr |
uint64_t columnline |
uint64_t const char* func |
uint64_t const char const char* format |
MainAppImpl main_app |
const MainApp & App |
MainLoopP main_loop |
RtJobQueue main_rt_jobs |
Queue a callback for the `main_loop` without invoking malloc(), addition is obstruction free.
const float *const cent_table |
Finetune factor table with 201 entries for `-100…0…+100` cent.
const float *const semitone_tables_265 |
Musical Tuning Tables, to be indexed by `MusicalTuning`.
|
constexpr |
Double round-off error at 1.0, equals 2^-53.
void __noreturn__ |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
uint64_t cached_hash_secret |
Use hash_secret() for access.
ServerImpl * SERVER |
|
constexpr |
|
constexpr |
|
constexpr |
Maximum number of sample frames to calculate in Processor::render().
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
bool ase_debugging_enabled |
Global boolean to reduce debugging penalty where possible.
bool ase_fatal_warnings |
Global boolean to cause the program to abort on warnings.