Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
The Anklang C++ API namespace. More...
Namespaces | |
namespace | AnsiColors |
The AnsiColors namespace contains utility functions for colored terminal output. | |
namespace | Aux |
Auxillary algorithms brodly useful. | |
namespace | FastMemory |
Utilities for allocating cache line aligned memory from huge pages. | |
namespace | Loft |
Loft - A special purpose memory allocator for lock- and obstruction-free thread progress. | |
namespace | MidiLib |
Namespace used for Midi Processor implementations. | |
namespace | Path |
The Path namespace provides functions for file path manipulation and testing. | |
namespace | Test |
Helper namespace for unit testing. | |
Classes | |
struct | AlignedPOD |
class | AsyncBlockingQueue |
This is a thread-safe asyncronous queue which blocks in pop() until data is provided through push(). More... | |
class | AtomicBits |
Vector of atomic bits, operates in blocks of 64 bits. More... | |
class | AtomicIntrusiveStack |
struct | AtomicStack |
struct | AtquitHandlers |
class | AudioChain |
class | AudioCombo |
class | AudioEngine |
class | AudioEngineThread |
struct | AudioParams |
Audio parameter handling, internal to AudioProcessor. More... | |
class | AudioProcessor |
Audio signal AudioProcessor base class, implemented by all effects and instruments. More... | |
struct | AudioProcessorInfo |
Detailed information and common properties of AudioProcessor subclasses. More... | |
struct | AudioProcessorRegistry |
class | AudioPropertyImpl |
struct | AudioTransport |
Transport information for AudioSignal processing. More... | |
class | AutoSeeder |
AutoSeeder provides non-deterministic seeding entropy. More... | |
class | Blob |
Binary large object storage container. More... | |
class | BlobImpl |
struct | BusInfo |
Structure providing supplementary information about input/output buses. More... | |
class | ByteBlob |
class | CallbackList |
Reentrant callback list with configurable arguments. More... | |
struct | Choice |
Representation of one possible choice for selection properties. More... | |
class | ClapAudioProcessor |
class | ClapDeviceImpl |
union | ClapEventUnion |
class | ClapFileHandle |
struct | ClapParamInfo |
struct | ClapParamInfoImpl |
struct | ClapParamUpdate |
class | ClapPluginDescriptor |
class | ClapPluginHandle |
class | ClapPluginHandleImpl |
struct | ClapPropertyImpl |
class | Clip |
Container for MIDI note and control events. More... | |
class | ClipImpl |
struct | ClipNote |
Part specific note event representation. More... | |
class | CoalesceNotifies |
struct | ConvertJsTrigger |
Convert between Jsonipc::JsonValue to JsTrigger. More... | |
struct | ConvertValue |
Convert between Value and Jsonipc::JsonValue. More... | |
struct | ConvertValueP |
Convert between ValueP and Jsonipc::JsonValue. More... | |
struct | ConvertValueR |
Convert between ValueR and Jsonipc::JsonValue. More... | |
struct | ConvertValueRP |
Convert between std::shared_ptr<ValueR> and Jsonipc::JsonValue. More... | |
struct | CPUInfo |
Acquire information about the runtime architecture and CPU type. More... | |
class | CString |
Compact, deduplicating string variant for constant strings. More... | |
class | CStringTable |
Map std::string <-> uint IDs, thread safe. More... | |
class | CustomDataContainer |
class | CustomDataKey |
CustomDataKey objects are used to identify and manage custom data members of CustomDataContainer objects. More... | |
struct | CustomServerConfig |
class | Device |
Interface to access Device instances. More... | |
class | DeviceImpl |
struct | DeviceInfo |
Info for device types. More... | |
class | DispatcherSource |
EventLoop source for handler execution. More... | |
class | Driver |
Base class for a PCM and MIDI devices. More... | |
struct | DriverEntry |
Driver information for PCM and MIDI handling. More... | |
struct | DriverSet |
class | Emittable |
Base type for classes with Event subscription. More... | |
class | EmittableImpl |
Implementation type for classes with Event subscription. More... | |
struct | EngineJobImpl |
class | EngineMidiInput |
struct | EnumInfo |
Get auxiallary enum information. More... | |
struct | ErrorReason |
struct | Event |
Structure for callback based notifications. More... | |
class | EventConnection |
class | EventFd |
Wakeup facility for IPC. More... | |
class | EventList |
Maintain an array of unique Event structures with change notification. More... | |
class | EventLoop |
Loop object, polling for events and executing callbacks in accordance. More... | |
class | EventSource |
EventLoop source for callback execution. More... | |
class | FastMemArray |
Array with cache-line-alignment containing a fixed numer of PODs. More... | |
class | FileCrawler |
Class implementing a file system crawler. More... | |
class | FileStreamWriter |
class | FlacWriter |
union | FloatIEEE754 |
struct | FloatIEEE754.mpn |
class | Gadget |
Base type for classes that have a Property. More... | |
struct | GadgetClassMemberList |
class | GadgetImpl |
Base type for classes that have a Property. More... | |
struct | Gtk2DlWrapEntry |
struct | Gtk2WindowSetup |
struct | Has_serialize_f |
Has_serialize_f<T> - Check if serialize(T&,WritNode&) is provided for T . More... | |
struct | Has_serialize_f< T, void_t< decltype(serialize(std::declval< T & >(), std::declval< WritNode & >())) > > |
struct | IconString |
struct | Id32 |
Helper class for integer IDs up to 32 Bit, possibly of enum type. More... | |
class | IniFile |
Class to parse INI configuration file sections and values. More... | |
class | IniWriter |
Class to write INI configuration file sections and values. More... | |
struct | JobQueue |
class | JsonapiConnection |
class | JsTrigger |
Callback mechanism for Jsonapi/Jsonipc. More... | |
class | KeccakCryptoRng |
class | KeccakFastRng |
class | KeccakGoodRng |
class | KeccakRng |
struct | KillPids |
Cleanup list of child processes still running at exit. More... | |
struct | L2DMatrix |
class | LadderVCF |
class | LinearSmooth |
struct | LocalResourceEntry |
struct | LoftConfig |
Configuration for Loft allocations. More... | |
struct | LoftFree |
A std::unique_ptr<> deleter for Loft allocations. More... | |
struct | LoftStats |
Statistics for Loft allocations. More... | |
struct | LogFormat |
Wrap a string together with its source code location. More... | |
struct | Logscale |
Logarithmically map (and invert) a range onto 0…+1. More... | |
struct | LoopState |
struct | MainApp |
struct | MainAppImpl |
class | MainLoop |
An EventLoop implementation that offers public API for running the loop. More... | |
class | Member |
Implement C++ member field API with a 0-sized class from setter and getter, maybe combined with [[no_unique_address]] . More... | |
struct | MemberAccessor |
struct | MemberDetails |
class | MidiDriver |
Base class for a MIDI devices. More... | |
struct | MidiEvent |
MidiEvent data structure. More... | |
union | MidiEvent.__unnamed14__ |
union | MidiEvent.__unnamed16__ |
union | MidiEvent.__unnamed18__ |
struct | MidiEvent.__unnamed18__.__unnamed20__ |
struct | MidiEvent.__unnamed18__.__unnamed22__ |
class | MidiEventOutput |
A stream of writable MidiEvent structures. More... | |
class | MidiEventReader |
An in-order MidiEvent reader for multiple MidiEvent sources. More... | |
struct | MidiNote |
Components of a MIDI note. More... | |
class | Monitor |
Interface for monitoring output signals. More... | |
class | MonitorImpl |
struct | MpmcStack |
struct | Mutable |
Helper to modify const struct contents, e.g. asyn job lambda members. More... | |
class | Mwc256 |
Marsaglia multiply-with-carry generator, period ca 2^255. More... | |
class | NativeDevice |
Interface to access NativeDevice instances. More... | |
class | NativeDeviceImpl |
struct | NoDelete |
class | NullMidiDriver |
class | NullPcmDriver |
class | Object |
Base type for classes with Property interfaces. More... | |
class | ObjectImpl |
Implementation type for classes with Property interfaces. More... | |
class | OpusWriter |
struct | OrderedEventList |
Container for a sorted array of opaque Event structures with binary lookup. More... | |
struct | Param |
Structured initializer for Parameter. More... | |
struct | Parameter |
Structure to provide information about properties or preferences. More... | |
struct | ParameterMap |
Parameter list construction helper. More... | |
class | ParameterProperty |
Abstract base type for Property implementations with Parameter meta data. More... | |
struct | ParamExtraVals |
Helper to specify parameter ranges. More... | |
class | Pcg32Rng |
class | PcmDriver |
Base class for a PCM devices. More... | |
struct | PcmDriverConfig |
PCM device configuration. More... | |
struct | PcRe2 |
struct | PendingRemovals |
Cleanup list of temporary files/dirs to be removed at exit. More... | |
class | Persistent |
struct | PollFD |
Mirrors struct pollfd for poll(3posix) More... | |
class | PollFDSource |
EventLoop source for IO callbacks. More... | |
class | Preference |
Class for preference parameters (global settings) More... | |
struct | PrefsValue |
struct | ProbeFeatures |
Bits representing a selection of probe sample data features. More... | |
class | ProcessorManager |
Interface for management, connecting and processing of AudioProcessor instances. More... | |
class | Project |
Projects support loading, saving, playback and act as containers for all other sound objects. More... | |
class | ProjectImpl |
class | Property |
A Property allows querying, setting and monitoring of an object property. More... | |
class | PropertyImpl |
Property implementation for GadgetImpl, using lambdas as accessors. More... | |
struct | PwdUser |
struct | QueueMultiplexer |
class | QuickArray |
struct | QuickSourcePArray |
class | Re |
Wrapper for std::regex to simplify usage and reduce compilation time. More... | |
struct | RegisteredDriver |
struct | RegisteredLoader |
struct | Resource |
Description of a resource, possibly nested. More... | |
class | ResourceCrawler |
Helper to crawl hierarchical resources. More... | |
struct | RtCall |
Wrap simple callback pointers, without using malloc (obstruction free). More... | |
struct | RtCallJob |
struct | RtJobQueue |
Add a simple callback to the main event loop, without using malloc (obstruction free). More... | |
class | SaturationDSP |
class | ScopedPosixLocale |
Class to push the POSIX/C locale_t (UTF-8) for the scope of its lifetime. More... | |
class | ScopedSemaphore |
class | Serializable |
Interface for serializable objects with Reflink support. More... | |
class | Server |
Central singleton, serves as API entry point. More... | |
class | ServerImpl |
struct | SHA3_224 |
struct | SHA3_256 |
struct | SHA3_384 |
struct | SHA3_512 |
struct | SHAKE128 |
struct | SHAKE256 |
class | SHAKE_Base |
class | SharedBase |
Common base type for polymorphic classes managed by std::shared_ptr<> . More... | |
class | SigchldSource |
EventLoop source for handler execution. More... | |
class | SortedVector |
Vector that keeps its elements sorted. More... | |
class | Stopwatch |
class | Storage |
class | StorageReader |
class | StorageWriter |
class | StreamReader |
class | StreamReaderFile |
class | StreamReaderZipMember |
class | StreamReaderZStd |
class | StreamWriter |
class | StreamWriterZStd |
class | StringBlob |
class | Strings |
Convenience Constructor for StringSeq or std::vector<std::string> More... | |
class | SubLoop |
class | TaskRegistry |
The task registry keeps track of runtime threads for profiling and statistical purposes. More... | |
struct | TaskStatus |
Acquire information about a task (process or thread) at runtime. More... | |
struct | TelemetryField |
Telemetry segment location. More... | |
class | TelemetryPlan |
struct | TelemetrySegment |
Telemetry segment location. More... | |
struct | TickSignature |
Musical time signature and tick conversions. More... | |
class | TimedSource |
EventLoop source for timer execution. More... | |
class | Track |
Container for Clip objects and sequencing information. More... | |
class | TrackImpl |
Ase::Track implementation. More... | |
struct | TransportLimits |
class | UndoScope |
struct | UserNote |
Contents of user interface notifications. More... | |
class | USignalSource |
EventLoop source for handler execution. More... | |
struct | Value |
Value type used to interface with various property types. More... | |
struct | ValueField |
struct | ValueR |
struct | ValueS |
struct | VirtualBase |
Common base type to allow casting between polymorphic classes. More... | |
class | WaveWriter |
class | WavWriterImpl |
class | WebSocketConnection |
class | WebSocketServer |
struct | WebSocketServerImpl |
class | Writ |
Document containing all information needed to serialize and deserialize a Value. More... | |
struct | WritConverter |
Template to specialize string conversion for various data types. More... | |
struct | WritConverter< T, REQUIRESv< !std::is_base_of< Serializable, T >::value &&!Jsonipc::DerivesVector< T >::value &&!Jsonipc::DerivesSharedPtr< T >::value &&std::is_class< T >::value > > |
struct | WritConverter< T, REQUIRESv< std::is_base_of< Serializable, T >::value > > |
struct | WritConverter< T, REQUIRESv< std::is_enum< T >::value > > |
struct | WritConverter< T, REQUIRESv< std::is_integral< T >::value||std::is_floating_point< T >::value > > |
class | WritLink |
class | WritNode |
One entry in a Writ serialization document. More... | |
Concepts | |
concept | IsEnum |
Enumerations | |
enum class | Error : int32_t { NONE , PERMS , IO , NO_MEMORY , NO_SPACE , NO_FILES , MANY_FILES , RETRY , NOT_DIRECTORY , FILE_NOT_FOUND , FILE_IS_DIR , FILE_EXISTS , FILE_BUSY , INTERNAL , UNIMPLEMENTED , FILE_EOF , FILE_OPEN_FAILED , FILE_SEEK_FAILED , FILE_READ_FAILED , FILE_WRITE_FAILED , PARSE_ERROR , NO_HEADER , NO_SEEK_INFO , NO_DATA_AVAILABLE , DATA_CORRUPT , WRONG_N_CHANNELS , FORMAT_INVALID , FORMAT_UNKNOWN , DATA_UNMATCHED , CODEC_FAILURE , BROKEN_ARCHIVE , BAD_PROJECT , NO_PROJECT_DIR , DEVICE_NOT_AVAILABLE , DEVICE_ASYNC , DEVICE_BUSY , DEVICE_FORMAT , DEVICE_BUFFER , DEVICE_LATENCY , DEVICE_CHANNELS , DEVICE_FREQUENCY , DEVICES_MISMATCH , WAVE_NOT_FOUND , INVALID_PROPERTY , INVALID_MIDI_CONTROL , OPERATION_BUSY } |
Enum representing Error states. More... | |
enum class | MusicalTuning : uint8 { OD_12_TET , OD_7_TET , OD_5_TET , DIATONIC_SCALE , INDIAN_SCALE , PYTHAGOREAN_TUNING , PENTATONIC_5_LIMIT , PENTATONIC_BLUES , PENTATONIC_GOGO , QUARTER_COMMA_MEANTONE , SILBERMANN_SORGE , WERCKMEISTER_3 , WERCKMEISTER_4 , WERCKMEISTER_5 , WERCKMEISTER_6 , KIRNBERGER_3 , YOUNG } |
Musical tunings, see: http://en.wikipedia.org/wiki/Musical_tuning. More... | |
enum class | ResourceType { FOLDER , FILE } |
enum | LogFlags { LOG_FILE , LOG_STDERR , LOG_LOCATIONS } |
Flags to configure logging behaviour. More... | |
enum | { WAITING , PREPARED , NEEDS_DISPATCH } |
enum class | MidiEventType : uint8_t { PARAM_VALUE , NOTE_OFF , NOTE_ON , AFTERTOUCH , CONTROL_CHANGE , PROGRAM_CHANGE , CHANNEL_PRESSURE , PITCH_BEND , SYSEX } |
Type of MIDI Events. More... | |
enum class | MidiMessage : int32_t { NONE , ALL_SOUND_OFF , RESET_ALL_CONTROLLERS , LOCAL_CONTROL , ALL_NOTES_OFF , OMNI_MODE_OFF , OMNI_MODE_ON , MONO_MODE_ON , POLY_MODE_ON , PARAM_VALUE , NOTE_OFF , NOTE_ON , AFTERTOUCH , CONTROL_CHANGE , PROGRAM_CHANGE , CHANNEL_PRESSURE , PITCH_BEND , SYSEX } |
Extended type information for MidiEvent. More... | |
enum class | RPath { PREFIXDIR , INSTALLDIR , LOCALEDIR , LIBDIR , ELECTRONDIR , DEMODIR , LADSPADIRS } |
enum class | ParamId : uint32 |
ID type for AudioProcessor parameters, the ID numbers are user assignable. More... | |
enum class | IBusId : uint16 |
ID type for AudioProcessor input buses, buses are numbered with increasing index. More... | |
enum class | OBusId : uint16 |
ID type for AudioProcessor output buses, buses are numbered with increasing index. More... | |
enum class | SpeakerArrangement : uint64_t { NONE , FRONT_LEFT , FRONT_RIGHT , FRONT_CENTER , LOW_FREQUENCY , BACK_LEFT , BACK_RIGHT , AUX , MONO , STEREO , STEREO_21 , STEREO_30 , STEREO_31 , SURROUND_50 , SURROUND_51 } |
enum | CacheType { CACHE_NEVER , CACHE_AUTO , CACHE_BRIEFLY , CACHE_FOREVER } |
Functions | |
constexpr bool | operator== (Error v, int64_t n) |
constexpr bool | operator== (int64_t n, Error v) |
constexpr bool | operator!= (Error v, int64_t n) |
constexpr bool | operator!= (int64_t n, Error v) |
constexpr bool | operator! (Error error) |
const char * | ase_error_blurb (Error error) |
Describe Error condition. | |
Error | ase_error_from_errno (int sys_errno, Error fallback=Error::IO) |
constexpr bool | operator== (MusicalTuning v, int64_t n) |
constexpr bool | operator== (int64_t n, MusicalTuning v) |
constexpr bool | operator!= (MusicalTuning v, int64_t n) |
constexpr bool | operator!= (int64_t n, MusicalTuning v) |
ChoiceS & | operator+= (ChoiceS &choices, Choice &&newchoice) |
Convenience ChoiceS construction helper. | |
void | cleanup_orphaned_tempfiles (const std::string &directory) |
Delete all files that contain @TEMPFILE_PID=d@ without a running pid_t d. | |
void | atquit_add_removal (const std::string &filename) |
Remove filename (or directory) when the program terminates. | |
void | atquit_del_removal (const std::string &filename) |
Undo a previous atquit_add_removal() call. | |
void | atquit_add_killl_pid (int pid) |
Kill pid when the program terminates. | |
void | atquit_del_killl_pid (int pid) |
Undo a previous atquit_add_killl_pid() call. | |
ErrorReason | spawn_process (const std::vector< std::string > &argv, pid_t *child_pid, int pdeathsig) |
Span a child process after cleaning up the environment. | |
std::string | create_tempfile_dir (const std::string &basename) |
Create temporary directory under /tmp, scheduled for removal atquit. | |
void | atquit_add (std::function< void()> *func) |
void | atquit_del (std::function< void()> *func) |
void | atquit_terminate (int exitcode, int pgroup) |
bool | atquit_triggered () |
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) |
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) |
String | stringify_clip_note (const ClipNote &n) |
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 String &input, int level) |
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) |
String | zstd_uncompress (const String &input) |
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) |
String | blake3_hash_string (const String &input) |
String | blake3_hash_file (const String &filename) |
const char * | string_demangle_cxx (const char *mangled_identifier) noexcept |
Demangle identifier via libcc. | |
std::string | backtrace_command () |
Find GDB and construct command line. | |
void | perror_die (const std::string &msg) noexcept __attribute__((__noreturn__)) |
Issue a warning about an assertion error. | |
void | assertion_fatal (const char *msg, const char *file, int line, const char *func) noexcept |
Print a debug message via assertion_failed() and abort the program. | |
void | assertion_failed (const char *msg, const char *file, int line, const char *func) noexcept |
Print instructive message, handle "breakpoint", "backtrace" and "fatal-warnings" in $ASE_DEBUG. | |
constexpr bool | constexpr_equals (const char *a, const char *b, size_t n) |
Test string equality at compile time. | |
template<class T > | |
void | call_delete (T *o) |
Simple way to create a standalone callback to delete an object of type T . | |
template<class Target , class Source > | |
std::shared_ptr< typename std::remove_pointer< Target >::type > | shared_ptr_cast (Source *object) |
template<class Target , class Source > | |
const std::shared_ptr< typename std::remove_pointer< Target >::type > | shared_ptr_cast (const Source *object) |
See shared_ptr_cast(Source*). | |
template<class Target , class Source > | |
std::shared_ptr< typename std::remove_pointer< Target >::type > | shared_ptr_cast (std::shared_ptr< Source > &sptr) |
See shared_ptr_cast(Source*). | |
template<class Target , class Source > | |
const std::shared_ptr< typename std::remove_pointer< Target >::type > | shared_ptr_cast (const std::shared_ptr< Source > &sptr) |
See shared_ptr_cast(Source*). | |
template<class Source > | |
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<> . | |
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) |
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. | |
template<class S , class D > | |
void | convert_samples (size_t n, S *src, D *dst, uint16 byte_order) |
template<class S , class D > | |
void | convert_clip_samples (size_t n, S *src, D *dst, uint16 byte_order) |
void | floatfill (float *dst, float f, size_t n) |
Fill n values of dst with f . | |
void | fast_copy (size_t n, float *d, const float *s) |
Copy a block of floats. | |
void | fast_copy (size_t n, uint32_t *d, const uint32_t *s) |
Copy a block of integers. | |
template<> | |
void | convert_samples (size_t n, const int16_t *src, float *dst, uint16 byte_order) |
template<> | |
void | convert_clip_samples (size_t n, const float *src, int16_t *dst, uint16 byte_order) |
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) |
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(). | |
void | collect_system_entropy (uint64 *data, size_t n) |
Collect entropy from system devices, like interrupt counters, clocks and random devices. | |
template<class ... Args> | |
std::string | string_format (const char *format, const Args &...args) __attribute__((__format__(__printf__ |
Format a string similar to sprintf(3) with support for std::string and std::ostringstream convertible objects. | |
void | jsonapi_set_subprotocol (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) |
float | damerau_levenshtein_distance (const std::string &source, const std::string &target, const float ci, const float cd, const float cs, const float ct) |
template<class T , class ... Args> | |
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) |
template<class... A> | |
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 () |
int | irintf (float f) |
double | force_double (double d) |
Force number into double precision floating point format, even with -ffast-math . | |
float | force_float (float f) |
Force number into single precision floating point format, even with -ffast-math . | |
float | fast_exp2 (float x) |
float | fast_log2 (float x) |
float | value2hz (float x) |
Convert synthesizer value (Voltage) to Hertz. | |
float | hz2value (float x) |
Convert Hertz to synthesizer value (Voltage). | |
void * | fast_mem_alloc (size_t size) |
void | fast_mem_free (void *mem) |
MidiEvent | make_note_on (uint16 chnl, uint8 mkey, float velo, float tune, uint nid) |
MidiEvent | make_note_off (uint16 chnl, uint8 mkey, float velo, float tune, uint nid) |
MidiEvent | make_aftertouch (uint16 chnl, uint8 mkey, float velo, float tune, uint nid) |
MidiEvent | make_pressure (uint16 chnl, float velo) |
MidiEvent | make_control (uint16 chnl, uint prm, float val) |
MidiEvent | make_control8 (uint16 chnl, uint prm, uint8 cval) |
MidiEvent | make_program (uint16 chnl, uint prgrm) |
MidiEvent | make_pitch_bend (uint16 chnl, float val) |
MidiEvent | make_param_value (uint param, double pvalue) |
int | QueueMultiplexer_priority (const MidiEvent &e) |
DeviceP | create_processor_device (AudioEngine &engine, const String &uri, bool engineproducer) |
String | parameter_guess_nick (const String ¶meter_label) |
Create a few letter nick name from a multi word parameter label. | |
String | anklang_home_dir (const String &subdir) |
Get Anklang home dir, possibly adding subdir . | |
std::string | anklang_runpath (RPath rpath, const String &segment) |
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. | |
String | cpu_info () |
Retrieve string identifying the runtime CPU type. | |
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. | |
String | timestamp_format (uint64 stamp, uint maxlength) |
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 () ASE_PURE |
Retrieve the name part of executable_path(). | |
void | fatal_system_error (const char *file, uint line, const char *format,...) __attribute__((__format__(printf |
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 () |
void | breakpoint () |
Cause a debugging breakpoint, for development only. | |
template<typename T > | |
CString | register_audio_processor (const char *aseid=nullptr) |
Add an AudioProcessor derived type to the audio processor registry. | |
template<typename Enum > | |
std::function< void(Value &)> | make_enum_getter (Enum *v) |
Value getter for enumeration types. | |
template<typename Enum > | |
std::function< bool(const Value &)> | make_enum_setter (Enum *v) |
Value setter for enumeration types. | |
template<typename Enum > requires IsEnum<Enum> | |
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 () |
int64_t | random_irange (int64_t begin, int64_t end) |
double | random_float () |
double | random_frange (double begin, double 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. | |
constexpr Re::Flags | operator| (Re::Flags a, Re::Flags b) |
template<class T > | |
String | json_stringify (const T &source, Writ::Flags flags=Writ::Flags(0)) |
Create JSON string from source . | |
template<class T > | |
bool | json_parse (const String &jsonstring, T &target) |
Parse a well formed JSON string and assign contents to target . | |
template<class T > | |
T | json_parse (const String &jsonstring) |
Parse a well formed JSON string and return the resulting value. | |
template<class T > | |
TelemetryField | telemetry_field (const String &name, const T *field) |
template<typename Float > | |
Float | hz_changed (Float a, Float b) |
Determine a significant frequency change (audible Hertz). | |
template<typename Float > | |
Float | voltage2hz (Float x) |
Convert synthesizer value (Voltage) to Hertz. | |
float | fast_voltage2hz (float x) |
Float precision variant of voltage2hz using fast_exp2(). | |
template<typename Float > | |
Float | hz2voltage (Float x) |
Convert Hertz to synthesizer value (Voltage). | |
float | fast_hz2voltage (float x) |
Float precision variant of hz2voltage using fast_log2(). | |
template<typename Float > | |
Float | db_changed (Float a, Float b) |
Determine a significant Decibel change. | |
template<typename Float > | |
Float | voltage2db (Float x) |
Convert synthesizer value (Voltage) to Decibel. | |
float | fast_voltage2db (float x) |
Float precision variant of voltage2db using fast_log2(). | |
template<typename Float > | |
Float | db2voltage (Float x) |
Convert Decibel to synthesizer value (Voltage). | |
float | fast_db2voltage (float x) |
Float precision variant of db2voltage using fast_exp2(). | |
template<typename Float > | |
Float | voltage_changed (Float a, Float b) |
Determine a significant synthesizer value (Voltage) change. | |
String | libsndfile_version () |
template<class RandomIt , class Compare > | |
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) |
String | string_multiply (const String &s, uint64 count) |
Reproduce a string s for count times. | |
String | string_to_identifier (const String &input) |
Force lower case, alphanumerics + underscore and non-digit start. | |
String | string_canonify (const String &string, const String &valid_chars, const String &substitute) |
bool | string_is_canonified (const String &string, const String &valid_chars) |
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) |
String | string_tolower (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. | |
String | string_toupper (const String &str) |
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. | |
String | string_totitle (const String &str) |
Convert all string characters into Unicode title characters. | |
String | string_capitalize (const String &str, size_t maxn, bool rest_tolower) |
Capitalize words, so the first letter is upper case, the rest lower case. | |
String | string_normalize_nfc (const String &src) |
Yield normalized composed UTF-8 string. | |
String | string_normalize_nfd (const String &src) |
Yield normalized decomposed UTF-8 string. | |
String | string_normalize_nfkc (const String &src) |
Formatting stripped normalized composed UTF-8 string. | |
String | string_normalize_nfkd (const String &src) |
Formatting stripped normalized decomposed UTF-8 string. | |
String | string_casefold (const String &src) |
Yield UTF-8 string useful for case insensitive comparisons. | |
int | string_cmp (const String &s1, const String &s2) |
Like strcmp(3) for UTF-8 strings. | |
int | string_casecmp (const String &s1, const String &s2) |
Like strcasecmp(3) for UTF-8 strings. | |
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. | |
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) |
StringS | strings_version_sort (const StringS &strings, bool reverse) |
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(). | |
String | string_join (const String &junctor, const StringS &strvec) |
bool | string_to_bool (const String &string, bool fallback) |
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. | |
uint64 | string_to_uint (const String &string, size_t *consumed, uint base) |
Parse a string into a 64bit unsigned integer, optionally specifying the expected number base. | |
String | string_from_uint (uint64 value) |
Convert a 64bit unsigned integer into a string. | |
bool | string_has_int (const String &string) |
Checks if a string contains a digit, optionally preceeded by whitespaces. | |
int64 | string_to_int (const String &string, size_t *consumed, uint base) |
Parse a string into a 64bit integer, optionally specifying the expected number base. | |
String | string_from_int (int64 value) |
Convert a 64bit signed integer into a string. | |
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. | |
String | string_from_double_vector (const std::vector< double > &dvec, const String &delim) |
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. | |
int | string_cmp_uuid (const String &uuid_string1, const String &uuid_string2) |
Returns whether uuid_string1 compares smaller (-1), equal (0) or greater (+1) to uuid_string2. | |
bool | string_startswith (const String &string, const String &fragment) |
Returns whether string starts with fragment . | |
bool | string_startswith (const String &string, const StringS &fragments) |
Returns whether string starts with any element of fragments . | |
bool | string_endswith (const String &string, const String &fragment) |
Returns whether string ends with fragment . | |
bool | string_endswith (const String &string, const StringS &fragments) |
Returns whether string ends with any element of fragments . | |
bool | string_match_identifier_tail (const String &ident, const String &tail) |
Variant of string_match_identifier() that matches tail against ident at word boundary. | |
bool | string_match_identifier (const String &ident1, const String &ident2) |
Check equality of strings canonicalized to "[0-9a-z_]+". | |
String | string_from_pretty_function_name (const char *cxx_pretty_function) |
String | string_url_decode (const String &urlstr, const bool form_url_encoded) |
Decode URL %-sequences in a string, decode '+' if form_url_encoded . | |
String | string_url_encode (const String &rawstr, const bool form_url_encoded) |
Encode special characters to URL %-sequences, encode space as '+' if form_url_encoded . | |
String | string_to_cescape (const String &str) |
String | string_to_cquote (const String &str) |
Returns a string as C string including double quotes. | |
String | string_from_cquote (const String &input) |
Parse a possibly quoted C string into regular string. | |
String | string_lstrip (const String &input) |
Strip whitespaces from the left of a string. | |
String | string_rstrip (const String &input) |
Strip whitespaces from the right of a string. | |
String | string_strip (const String &input) |
Strip whitespaces from the left and right of a 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. | |
String | string_substitute_char (const String &input, const char match, const char subst) |
Replace all occouranes of match in input with subst. | |
String | string_to_hex (const String &input) |
Convert bytes in string input to hexadecimal numbers. | |
String | string_hexdump (const void *addr, size_t length, size_t initial_offset) |
void | memset4 (uint32 *mem, uint32 filler, uint length) |
Fill a memory area with a 32-bit quantitiy. | |
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) |
StringS | cstrings_to_vector (const char *s,...) |
Construct a StringS from a NULL terminated list of string arguments. | |
String | kvpair_key (const String &key_value_pair) |
String | kvpair_value (const String &key_value_pair) |
String | kvpairs_fetch (const StringS &kvs, const String &key, bool casesensitive) |
ssize_t | kvpairs_search (const StringS &kvs, const String &k, const bool casesensitive) |
bool | kvpairs_assign (StringS &kvs, const String &key_value_pair, bool casesensitive) |
std::string_view | string_option_find_value (const char *string, const char *feature, const char *fallback, const char *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 . | |
bool | string_option_check (const String &optionlist, const String &feature) |
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) |
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) |
template<typename Type > | |
Type | string_to_type (const String &string) |
Convert a string to template argument type, such as bool, int, double. | |
template<typename Type > | |
String | string_from_type (Type value) |
Create a string from a templated argument value, such as bool, int, double. | |
template<> | |
long double | string_to_type< long double > (const String &string) |
template<> | |
String | string_from_type< long double > (long double value) |
template<> | |
double | string_to_type< double > (const String &string) |
template<> | |
String | string_from_type< double > (double value) |
template<> | |
float | string_to_type< float > (const String &string) |
template<> | |
String | string_from_type< float > (float value) |
template<> | |
bool | string_to_type< bool > (const String &string) |
template<> | |
String | string_from_type< bool > (bool value) |
template<> | |
int16 | string_to_type< int16 > (const String &string) |
template<> | |
String | string_from_type< int16 > (int16 value) |
template<> | |
uint16 | string_to_type< uint16 > (const String &string) |
template<> | |
String | string_from_type< uint16 > (uint16 value) |
template<> | |
int | string_to_type< int > (const String &string) |
template<> | |
String | string_from_type< int > (int value) |
template<> | |
uint | string_to_type< uint > (const String &string) |
template<> | |
String | string_from_type< uint > (uint value) |
template<> | |
int64 | string_to_type< int64 > (const String &string) |
template<> | |
String | string_from_type< int64 > (int64 value) |
template<> | |
uint64 | string_to_type< uint64 > (const String &string) |
template<> | |
String | string_from_type< uint64 > (uint64 value) |
template<> | |
String | string_to_type< String > (const String &string) |
template<> | |
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) |
size_t | utf8_to_unicode (const std::string &str, std::vector< uint32_t > &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) |
String | string_to_ncname (const String &input, uint32_t substitute) |
constexpr bool | unicode_is_valid (uint32_t u) |
Return whether u is an allowed Unicode codepoint within 0x10FFFF and not part of a UTF-16 surrogate pair. | |
constexpr bool | unicode_is_assigned (uint32_t u) |
Return whether u matches any of the assigned Unicode planes. | |
constexpr bool | unicode_is_noncharacter (uint32_t u) |
Return whether u is one of the 66 Unicode noncharacters. | |
constexpr bool | unicode_is_character (uint32_t u) |
Return whether u is not one of the 66 Unicode noncharacters. | |
constexpr bool | unicode_is_control_code (uint32_t u) |
Return whether u is one of the 65 Unicode control codes. | |
constexpr bool | unicode_is_private (uint32_t u) |
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 | diag_flush (uint8 code, const String &txt) |
Handle stdout and stderr printing with flushing. | |
String | diag_prefix (uint8 code) |
Create prefix for warnings and errors. | |
const char * | ase_gettext (const String &untranslated) |
String | now_strftime (const String &format) |
bool | debug_enabled () |
Check if any kind of debugging is enabled by $ASE_DEBUG. | |
bool | debug_key_enabled (const std::string &conditional) ASE_PURE |
template<class ... A> | |
void | debug (const char *cond, const char *format, const A &...args) |
template<class ... A> | |
void | fatal_error (const char *format, const A &...args) ASE_NORETURN |
template<class ... A> | |
void | warning (const char *format, const A &...args) |
template<class... A> | |
void | printout (const char *format, const A &...args) ASE_PRINTF(1 |
template<class... A> | |
void void | printerr (const char *format, const A &...args) ASE_PRINTF(1 |
template<class A0 , class... Ar> | |
const char * | ase_gettext (const char *format, const A0 &a0, const Ar &...restargs) |
Translate a string, using the ASE locale. | |
constexpr uint16_t | uint16_swap_le_be (uint16_t v) |
Swap 16-Bit integers between __BIG_ENDIAN and __LITTLE_ENDIAN systems. | |
constexpr uint32_t | uint32_swap_le_be (uint32_t v) |
Swap 32-Bit integers between __BIG_ENDIAN and __LITTLE_ENDIAN systems. | |
constexpr uint64_t | uint64_swap_le_be (uint64_t v) |
Swap 64-Bit integers between __BIG_ENDIAN and __LITTLE_ENDIAN systems. | |
template<class ... Args> | |
void | debug (const char *cond, const char *format, const Args &...args) |
Issue a printf-like debugging message if cond is enabled by $ASE_DEBUG. | |
template<class ... Args> | |
void ASE_NORETURN | fatal_error (const char *format, const Args &...args) |
template<class ... Args> | |
void | warning (const char *format, const Args &...args) |
Issue a printf-like warning message. | |
template<class... Args> | |
void | printout (const char *format, const Args &...args) |
Print a message on stdout (and flush stdout) ala printf(), using the POSIX/C locale. | |
template<class... Args> | |
void | printerr (const char *format, const Args &...args) |
Print a message on stderr (and flush stderr) ala printf(), using the POSIX/C locale. | |
bool | operator== (const std::vector< ValueP > &v1, const std::vector< ValueP > &v2) |
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) |
String | webui_create_auth_redirect (const std::string &executable, unsigned port, const std::string &token, const std::string &snapmode) |
ErrorReason | webui_start_browser (const std::string &mode, MainLoopP loop, const std::string &url, const std::function< void()> &onclose) |
Variables | |
constexpr const char | GUIONLY [] |
GUI READABLE WRITABLE. | |
constexpr const char | STORAGE [] |
STORAGE READABLE WRITABLE. | |
constexpr const char | STANDARD [] |
STORAGE GUI READABLE WRITABLE. | |
constexpr const uint | MIDI_NOTE_ID_FIRST |
First (internal) MIDI note event ID (lower IDs are reserved for external notes). | |
constexpr const uint | MIDI_NOTE_ID_LAST |
Last valid (internal) MIDI note event ID. | |
bool | assertion_failed_fatal |
Global flag to force aborting on assertion warnings. | |
Ts && | args |
float | const_float_zeros [AUDIO_BLOCK_FLOAT_ZEROS_SIZE] |
Block of const floats allof value 0. | |
constexpr const uint | AUDIO_BLOCK_FLOAT_ZEROS_SIZE |
Maximum number of values in the const_float_zeros block. | |
constexpr const uint | FIXED_N_CHANNELS |
constexpr const uint | FIXED_SAMPLE_RATE |
constexpr const uint | FIXED_N_MIDI_DRIVERS |
static bool const char * | fileglob |
static bool const char const size_t | maxbytes |
constexpr const bool | __DEV__ |
uint64_t | columnline |
uint64_t const char * | func |
uint64_t const char const char * | format |
MainAppImpl | main_app |
const MainApp & | App |
MainLoopP | main_loop |
JobQueue | main_jobs (call_main_loop) |
Execute a job callback in the Ase 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 [17] |
Musical Tuning Tables, to be indexed by MusicalTuning | |
constexpr const double | DOUBLE_EPSILON |
Double round-off error at 1.0, equals 2^-53. | |
void | __noreturn__ |
const int | ase_major_version |
const int | ase_minor_version |
const int | ase_micro_version |
const char *const | ase_version_long |
const char *const | ase_version_short |
const char *const | ase_gettext_domain |
const char *const | ase_sharedir |
uint64_t | cached_hash_secret |
Use hash_secret() for access. | |
ServerImpl * | SERVER |
constexpr double | INVERSE_SEMIQUAVER |
constexpr SpeakerArrangement | speaker_arrangement_channels_mask |
constexpr const int64 | TRANSPORT_PPQN |
Maximum number of sample frames to calculate in Processor::render(). | |
constexpr const int64 | SEMIQUAVER_TICKS |
constexpr const int64 | MIN_BPM |
constexpr const int64 | MAX_BPM |
constexpr const int64 | MIN_SAMPLERATE |
constexpr const int64 | MAX_SAMPLERATE |
constexpr uint32_t | unicode_last_codepoint |
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. | |
The Anklang C++ API namespace.
@TODO:
struct Ase::AlignedPOD |
Helper to provide memory for placement new AlignedPOD<SIZE> is aligned like max_align_t or like malloc()-ed memory and provides SIZE bytes. Idiomatic use is:
Definition at line 19 of file randomhash.hh.
Class Members | ||
---|---|---|
type | mem |
struct Ase::AudioProcessorInfo |
Detailed information and common properties of AudioProcessor subclasses.
Definition at line 29 of file processor.hh.
Class Members | ||
---|---|---|
CString | blurb | Short description for overviews. |
CString | category | Category to allow grouping for processors of similar function. |
CString | creator_name | Name of the creator. |
CString | creator_url | Internet contact of the creator. |
CString | description | Elaborate description for help dialogs. |
CString | label | Preferred user interface name. |
CString | version | Version identifier. |
CString | website_url | Website of/about this AudioProcessor. |
union Ase::ClapEventUnion |
Definition at line 208 of file clapplugin.cc.
struct Ase::ClapParamUpdate |
Definition at line 30 of file clapplugin.hh.
Class Members | ||
---|---|---|
clap_id | param_id | |
int64_t | steady_time | |
double | value |
struct Ase::CPUInfo |
Acquire information about the runtime architecture and CPU type.
Definition at line 292 of file platform.cc.
Class Members | ||
---|---|---|
char | cpu_vendor[13] | |
const char * | machine | |
uint | x86_3dnow: 1 | |
uint | x86_3dnowext: 1 | |
uint | x86_cx16: 1 | |
uint | x86_fpu: 1 | |
uint | x86_htt: 1 | |
uint | x86_mmx: 1 | |
uint | x86_mmxext: 1 | |
uint | x86_rdrand: 1 | |
uint | x86_sse: 1 | |
uint | x86_sse2: 1 | |
uint | x86_sse3: 1 | |
uint | x86_sse4_1: 1 | |
uint | x86_sse4_2: 1 | |
uint | x86_ssesys: 1 | |
uint | x86_ssse3: 1 | |
uint | x86_tsc: 1 |
struct Ase::DeviceInfo |
Class Members | ||
---|---|---|
String | category | Category to allow grouping for processors of similar function. |
String | creator_name | Name of the creator. |
String | creator_url | Internet contact of the creator. |
String | description | Elaborate description for help dialogs. |
String | name | Preferred user interface name. |
String | uri | Unique identifier for de-/serialization. |
String | website_url | Website of/about this Processor. |
struct Ase::DriverEntry |
struct Ase::DriverSet |
Class Members | ||
---|---|---|
MidiDriverS | midi_drivers | |
StringS | midi_names | |
PcmDriverP | null_pcm_driver | |
PcmDriverP | pcm_driver | |
String | pcm_name |
struct Ase::FloatIEEE754.mpn |
Definition at line 34 of file mathutils.hh.
Class Members | ||
---|---|---|
uint | biased_exponent: 8 | |
uint | mantissa: 23 | |
uint | sign: 1 |
struct Ase::GadgetClassMemberList |
Class Members | ||
---|---|---|
const char * | class_typeid_name | |
MemberClassT | classtest | |
vector< MemberAccessor * > | members |
struct Ase::Gtk2WindowSetup |
Definition at line 10 of file gtk2wrap.hh.
Class Members | ||
---|---|---|
function< void()> | deleterequest_mt | |
int | height | |
string | title | |
int | width |
struct Ase::LoftConfig |
struct Ase::LoftStats |
struct Ase::MemberAccessor |
union Ase::MidiEvent.__unnamed14__ |
Definition at line 56 of file midievent.hh.
Class Members | ||
---|---|---|
uint8 | fragment | Flag for multi-part control change mesages. |
uint8 | key | NOTE, KEY_PRESSURE MIDI note, 0…0x7f, 60 = middle C at 261.63 Hz. |
union Ase::MidiEvent.__unnamed16__ |
Definition at line 60 of file midievent.hh.
Class Members | ||
---|---|---|
uint | length | Data event length of byte array. |
uint | noteid | NOTE, identifier for note expression handling or 0xffffffff. |
uint | param | PROGRAM_CHANGE (program), CONTROL_CHANGE (controller):0…0x7f; PARAM_VALUE:uint32_t. |
union Ase::MidiEvent.__unnamed18__ |
Definition at line 65 of file midievent.hh.
Class Members | ||
---|---|---|
struct MidiEvent.__unnamed18__.__unnamed20__ | __unnamed__ | |
struct MidiEvent.__unnamed18__.__unnamed22__ | __unnamed__ | |
char * | data | Data event byte array. |
double | pvalue | Numeric parameter value, PARAM_VALUE. |
struct Ase::MidiEvent.__unnamed18__.__unnamed20__ |
Definition at line 68 of file midievent.hh.
Class Members | ||
---|---|---|
uint | cval | CONTROL_CHANGE control value, 0…0x7f. |
float | value | CONTROL_CHANGE 0…+1, CHANNEL_PRESSURE, 0…+1, PITCH_BEND -1…+1. |
struct Ase::MidiEvent.__unnamed18__.__unnamed22__ |
Definition at line 72 of file midievent.hh.
Class Members | ||
---|---|---|
float | tuning | NOTE, fine tuning in ±cents. |
float | velocity | NOTE, KEY_PRESSURE, CHANNEL_PRESSURE, 0…+1. |
struct Ase::PcmDriverConfig |
struct Ase::PrefsValue |
Definition at line 53 of file properties.cc.
Class Members | ||
---|---|---|
shared_ptr< PrefsValueCallbackList > | callbacks | |
ParameterC | parameter | |
Value | value |
struct Ase::ProbeFeatures |
struct Ase::PwdUser |
Definition at line 1164 of file platform.cc.
Class Members | ||
---|---|---|
String | real_name | |
int | uid | |
String | user_name |
struct Ase::RegisteredLoader |
struct Ase::Resource |
struct Ase::TelemetryField |
struct Ase::TelemetrySegment |
struct Ase::TransportLimits |
Definition at line 9 of file transport.cc.
struct Ase::WritConverter |
Template to specialize string conversion for various data types.
Definition at line 124 of file serialize.hh.
using Ase::Atomic = typedef boost::atomic<T> |
Substitute for std::atomic<> with fixes for GCC.
Definition at line 14 of file atomics.hh.
using Ase::AtomicU64 = typedef std::atomic<uint64> |
Definition at line 229 of file atomics.hh.
using Ase::CallbackS = typedef std::vector<std::function<void()> > |
using Ase::ChoicesFunc = typedef std::function<ChoiceS(const CString&)> |
Handler to generate all possible parameter choices dynamically.
Definition at line 15 of file parameter.hh.
using Ase::ClapEventParamS = typedef std::vector<clap_event_param_value> |
Definition at line 28 of file clapplugin.cc.
using Ase::ClapEventUnionS = typedef std::vector<ClapEventUnion> |
Definition at line 30 of file clapplugin.cc.
using Ase::ClapParamIdValue = typedef std::tuple<clap_id,double> |
Definition at line 33 of file clapplugin.cc.
using Ase::ClapParamIdValueS = typedef std::vector<ClapParamIdValue> |
Definition at line 34 of file clapplugin.cc.
using Ase::ClapParamInfoMap = typedef std::unordered_map<clap_id,ClapParamInfoImpl*> |
Definition at line 148 of file clapplugin.cc.
using Ase::ClapParamInfoS = typedef std::vector<ClapParamInfo> |
Definition at line 48 of file clapplugin.hh.
using Ase::ClapParamUpdateS = typedef std::vector<ClapParamUpdate> |
Definition at line 35 of file clapplugin.hh.
using Ase::ClapResourceHash = typedef std::tuple<clap_id,String> |
Definition at line 31 of file clapplugin.cc.
using Ase::ClapResourceHashS = typedef std::vector<ClapResourceHash> |
Definition at line 32 of file clapplugin.cc.
using Ase::ClipImplGeneratorS = typedef std::vector<ClipImpl::Generator> |
using Ase::CStringS = typedef std::vector<CString> |
using Ase::DCallbackS = typedef std::vector<std::function<void(double)> > |
using Ase::DriverP = typedef Driver::DriverP |
using Ase::EngineMidiInputP = typedef ::std::shared_ptr< EngineMidiInput > |
using Ase::EngineMidiInputS = typedef ::std::vector< EngineMidiInputP > |
using Ase::EngineMidiInputW = typedef ::std::weak_ptr< EngineMidiInput > |
using Ase::EventConnectionP = typedef std::shared_ptr<EventConnection> |
using Ase::EventConnectionW = typedef std::weak_ptr<EventConnection> |
using Ase::EventHandler = typedef std::function<void (const Event&)> |
typedef std::shared_ptr<EventLoop> Ase::EventLoopP |
typedef std::shared_ptr<EventSource> Ase::EventSourceP |
using Ase::FastRng = typedef Mwc256 |
Definition at line 63 of file randomhash.hh.
using Ase::IDX = typedef typename ::std::enable_if<I == J, bool>::type |
using Ase::InstanceP = typedef std::shared_ptr<SharedBase> |
typedef int16_t Ase::int16 |
typedef int32_t Ase::int32 |
typedef int64_t Ase::int64 |
using Ase::JsonapiBinarySender = typedef std::function<bool(const String&)> |
Definition at line 17 of file jsonapi.hh.
using Ase::JsonapiConnectionP = typedef std::shared_ptr<JsonapiConnection> |
Definition at line 22 of file jsonapi.cc.
using Ase::JsonapiConnectionW = typedef std::weak_ptr<JsonapiConnection> |
Definition at line 23 of file jsonapi.cc.
using Ase::LoftPtr = typedef std::unique_ptr<T,LoftFree> |
typedef std::shared_ptr<MainLoop> Ase::MainLoopP |
using Ase::MidiDriverP = typedef MidiDriver::MidiDriverP |
using Ase::MinMaxStep = typedef std::tuple<double,double,double> |
Min, max, stepping for double ranges.
Definition at line 12 of file parameter.hh.
using Ase::MonitorImplP = typedef std::shared_ptr<MonitorImpl> |
Definition at line 20 of file monitor.hh.
using Ase::ObjectImplP = typedef std::shared_ptr<ObjectImpl> |
using Ase::ParameterC = typedef std::shared_ptr<const Parameter> |
Definition at line 90 of file parameter.hh.
using Ase::ParamInitialVal = typedef 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.
Definition at line 18 of file parameter.hh.
using Ase::PcmDriverP = typedef PcmDriver::PcmDriverP |
using Ase::PrefsMap = typedef std::unordered_map<CString,PrefsValue> |
Definition at line 58 of file properties.cc.
using Ase::PrefsValueCallbackList = typedef CallbackList<CString,const Value&> |
Definition at line 52 of file properties.cc.
using Ase::ProjectImplP = typedef std::shared_ptr<ProjectImpl> |
Definition at line 92 of file project.hh.
using Ase::PropertyGetter = typedef std::function<void (Value&)> |
Function type for Property value getters.
Definition at line 69 of file properties.hh.
using Ase::PropertyLister = typedef std::function<ChoiceS (const ParameterProperty&)> |
Function type to list Choice Property values.
Definition at line 75 of file properties.hh.
using Ase::PropertySetter = typedef std::function<bool (const Value&)> |
Function type for Property value setters.
Definition at line 72 of file properties.hh.
using Ase::RegisteredLoaderVector = typedef std::vector<RegisteredLoader> |
using Ase::REQUIRES = typedef typename ::std::enable_if<value, bool>::type |
using Ase::REQUIRESv = typedef typename ::std::enable_if<value, void>::type |
using Ase::StartQueue = typedef AsyncBlockingQueue<char> |
typedef std::string Ase::String |
Convenience alias for std::string.
using Ase::String3 = typedef std::tuple<String,String,String> |
Definition at line 479 of file parameter.cc.
using Ase::StringPair = typedef std::pair<std::string, std::string> |
using Ase::StringPairS = typedef std::vector<std::tuple<String,String> > |
Definition at line 44 of file project.cc.
using Ase::StringS = typedef std::vector<String> |
using Ase::TelemetryPlanP = typedef ::std::shared_ptr< TelemetryPlan > |
using Ase::TelemetryPlanS = typedef ::std::vector< TelemetryPlanP > |
using Ase::TelemetryPlanW = typedef ::std::weak_ptr< TelemetryPlan > |
using Ase::ThreadId = typedef std::thread::id |
Definition at line 170 of file platform.hh.
typedef std::shared_ptr<TimedSource> Ase::TimedSourceP |
using Ase::TYP = typedef typename ::std::enable_if<std::is_same<T, C>::value, bool>::type |
typedef uint16_t Ase::uint16 |
typedef uint32_t Ase::uint32 |
typedef uint64_t Ase::uint64 |
typedef uint8_t Ase::uint8 |
typedef uint32_t Ase::unichar |
using Ase::ValueP = typedef std::shared_ptr<Value> |
using Ase::ValueVariant = typedef std::variant<std::monostate,bool,int64,double,String,ValueS,ValueR,InstanceP> |
using Ase::VirtualBaseP = typedef std::shared_ptr<VirtualBase> |
using Ase::VoidF = typedef std::function<void()> |
using Ase::VoidFunc = typedef std::function<void()> |
using Ase::WaveWriterP = typedef std::shared_ptr<WaveWriter> |
using Ase::WebSocketConnectionP = typedef std::shared_ptr<WebSocketConnection> |
Definition at line 40 of file websocket.hh.
using Ase::WebSocketServerImplP = typedef std::shared_ptr<WebSocketServerImpl> |
Definition at line 21 of file websocket.cc.
using Ase::WebSocketServerP = typedef std::shared_ptr<WebSocketServer> |
Definition at line 10 of file websocket.hh.
using Ase::WppConnection = typedef WppConnectionP::element_type |
Definition at line 28 of file websocket.cc.
using Ase::WppConnectionP = typedef WppServer::connection_ptr |
Definition at line 27 of file websocket.cc.
using Ase::WppHdl = typedef websocketpp::connection_hdl |
Definition at line 29 of file websocket.cc.
using Ase::WppServer = typedef websocketpp::server<CustomServerConfig> |
Definition at line 26 of file websocket.cc.
using Ase::WritNodeS = typedef std::vector<WritNode> |
using Ase::WritP = typedef std::shared_ptr<Writ> |
Definition at line 12 of file serialize.hh.
enum Ase::CacheType |
Definition at line 403 of file websocket.cc.
|
strong |
|
strong |
ID type for AudioProcessor input buses, buses are numbered with increasing index.
Definition at line 21 of file processor.hh.
enum Ase::LogFlags |
Flags to configure logging behaviour.
Definition at line 26 of file logging.hh.
|
strong |
Type of MIDI Events.
Enumerator | |
---|---|
NOTE_OFF | |
AFTERTOUCH | Key Pressure, polyphonic aftertouch. |
CONTROL_CHANGE | Control Change. |
CHANNEL_PRESSURE | Channel Aftertouch. |
Definition at line 15 of file midievent.hh.
|
strong |
Extended type information for MidiEvent.
Definition at line 28 of file midievent.hh.
|
strong |
Musical tunings, see: http://en.wikipedia.org/wiki/Musical_tuning.
|
strong |
ID type for AudioProcessor output buses, buses are numbered with increasing index.
Definition at line 25 of file processor.hh.
|
strong |
ID type for AudioProcessor parameters, the ID numbers are user assignable.
Definition at line 17 of file processor.hh.
|
strong |
Definition at line 28 of file platform.hh.
|
strong |
Flags to indicate channel arrangements of a bus. See also: https://en.wikipedia.org/wiki/Surround_sound
Definition at line 11 of file transport.hh.
Translate message strings in the Anklang/ASE text domain.
Definition at line 118 of file platform.cc.
Translate message strings in the Anklang/ASE text domain, use @plural forms if
!= 1.
Definition at line 132 of file platform.cc.
References uint64_t.
std::string() Ase::_ | ( | const std::string & | string | ) |
Translate message strings in the Anklang/ASE text domain.
Definition at line 125 of file platform.cc.
References _.
std::string() Ase::_ | ( | 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.
Definition at line 141 of file platform.cc.
void Ase::anklang_cachedir_clean_stale | ( | ) |
Clean stale cache directories from past runtimes, may be called from any thread.
Definition at line 161 of file storage.cc.
References Ase::Path::check(), dirname(), std::string::empty(), getpid(), kill(), Ase::Path::rmrf(), std::string::size(), string_format(), string_startswith(), and string_to_int().
Referenced by Ase::ProjectImpl::save_project().
void Ase::anklang_cachedir_cleanup | ( | const String & | cachedir | ) |
Cleanup a cachedir previously created with anklang_cachedir_create().
Definition at line 142 of file storage.cc.
References assert_return, Ase::Path::check(), Ase::Path::rmrf(), string_startswith(), and string_to_int().
Referenced by Ase::ProjectImpl::save_project().
String Ase::anklang_cachedir_create | ( | ) |
Create exclusive cache directory for this process' runtime.
Definition at line 106 of file storage.cc.
References std::atexit(), std::string::c_str(), close(), std::string::data(), std::string::empty(), errno(), getpid(), mkdtemp(), open(), std::vector::push_back(), Ase::Path::rmrf(), and strerror().
Referenced by Ase::ProjectImpl::save_project().
Get Anklang home dir, possibly adding subdir
.
Definition at line 46 of file platform.cc.
References std::string::empty(), and getenv().
std::string Ase::anklang_runpath | ( | RPath | rpath, |
const String & | segment | ||
) |
Retrieve various resource paths at runtime.
Definition at line 58 of file platform.cc.
References Ase::Path::dirname().
Referenced by Ase::FileCrawler::assign_(), and Ase::FileCrawler::expand_fsdir().
String Ase::application_name | ( | ) |
Retrieve the localized program name intended for user display.
Definition at line 864 of file platform.cc.
References std::string::empty(), and program_alias().
void Ase::application_name_init | ( | String | desktopname | ) |
Set the application_name to a name other than program_alias if desired.
Definition at line 870 of file platform.cc.
References assert_return, and std::string::empty().
const char * Ase::ase_build_id | ( | ) |
Provide a string containing the ASE library build id.
Definition at line 841 of file platform.cc.
Referenced by Ase::ServerImpl::get_build_id().
Describe Error condition.
Definition at line 227 of file server.cc.
References _, and strerror().
Referenced by load_registered_drivers(), Ase::ProjectImpl::match_serialized(), Ase::PcmDriver::open(), and Ase::ProjectImpl::save_project().
const char * Ase::ase_gettext | ( | const char * | format, |
const A0 & | a0, | ||
const Ar &... | restargs | ||
) |
Translate a string, using the ASE locale.
Definition at line 224 of file utils.hh.
References string_format().
const char * Ase::ase_version | ( | ) |
Provide a string containing the package version.
Definition at line 835 of file platform.cc.
Referenced by Ase::ServerImpl::get_version().
|
noexcept |
Print instructive message, handle "breakpoint", "backtrace" and "fatal-warnings" in $ASE_DEBUG.
Definition at line 122 of file cxxaux.cc.
References assertion_failed_fatal, std::string::back(), backtrace_command(), std::string::c_str(), std::string::empty(), fflush(), fputs(), getenv(), stderr(), stdout(), system(), and std::to_string().
Referenced by assertion_fatal(), perror_die(), and warning().
|
noexcept |
Print a debug message via assertion_failed() and abort the program.
Definition at line 110 of file cxxaux.cc.
References abort(), assertion_failed(), and assertion_failed_fatal.
Referenced by fatal_error().
void Ase::atquit_add | ( | std::function< void()> * | func | ) |
void Ase::atquit_add_killl_pid | ( | int | pid | ) |
void Ase::atquit_add_removal | ( | const std::string & | filename | ) |
Remove filename (or directory) when the program terminates.
Definition at line 106 of file atquit.cc.
Referenced by create_tempfile_dir().
void Ase::atquit_del | ( | std::function< void()> * | func | ) |
void Ase::atquit_del_killl_pid | ( | int | pid | ) |
Undo a previous atquit_add_killl_pid() call.
void Ase::atquit_del_removal | ( | const std::string & | filename | ) |
Undo a previous atquit_add_removal() call.
std::string Ase::backtrace_command | ( | ) |
Find GDB and construct command line.
Command to start external debugger for a backtrace.
Definition at line 44 of file cxxaux.cc.
References access(), close(), open(), read(), and snprintf().
Referenced by assertion_failed().
Definition at line 452 of file compress.cc.
Definition at line 440 of file compress.cc.
|
extern |
Cause a debugging breakpoint, for development only.
Definition at line 202 of file platform.hh.
void Ase::call_delete | ( | T * | o | ) |
DeviceInfo Ase::clap_device_info | ( | const ClapPluginDescriptor & | descriptor | ) |
Definition at line 1943 of file clapplugin.cc.
String Ase::clap_event_to_string | ( | const clap_event_note_t * | enote | ) |
Definition at line 1924 of file clapplugin.cc.
Definition at line 1902 of file clapplugin.cc.
void Ase::cleanup_orphaned_tempfiles | ( | const std::string & | directory | ) |
Delete all files that contain @TEMPFILE_PID=d@ without a running pid_t d.
Definition at line 20 of file atquit.cc.
References access(), std::string::c_str(), closedir(), errno(), fclose(), fopen(), fread(), log(), opendir(), PATH_MAX, pid_t, readdir(), snprintf(), stat(), strerror(), strlen(), strstr(), strtol(), and unlink().
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.
Definition at line 408 of file entropy.cc.
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().
Definition at line 426 of file entropy.cc.
Test string equality at compile time.
Definition at line 233 of file cxxaux.hh.
References constexpr_equals().
Referenced by constexpr_equals().
void Ase::convert_clip_samples | ( | size_t | n, |
const float * | src, | ||
int16_t * | dst, | ||
uint16 | byte_order | ||
) |
Definition at line 64 of file datautils.hh.
void Ase::convert_samples | ( | size_t | n, |
const int16_t * | src, | ||
float * | dst, | ||
uint16 | byte_order | ||
) |
Definition at line 55 of file datautils.hh.
std::string Ase::cpu_arch | ( | ) |
Retrieve string identifying the CPU architecture.
Definition at line 467 of file platform.cc.
std::string Ase::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 ".
Definition at line 480 of file platform.cc.
References std::string::c_str(), cpu_info(), strcat(), string_format(), and sysconf().
Referenced by cpu_info().
DeviceP Ase::create_processor_device | ( | AudioEngine & | engine, |
const String & | uri, | ||
bool | engineproducer | ||
) |
Definition at line 227 of file nativedevice.cc.
std::string Ase::create_tempfile_dir | ( | const std::string & | basename | ) |
Create temporary directory under /tmp, scheduled for removal atquit.
Definition at line 233 of file atquit.cc.
References atquit_add_removal(), basename(), std::string::data(), dirname(), getuid(), mkdtemp(), string_format(), and std::filesystem::temp_directory_path().
Definition at line 473 of file strings.cc.
Construct a StringS from a NULL terminated list of string arguments.
Definition at line 1265 of file strings.cc.
References std::vector::push_back(), va_arg(), va_end(), and va_start().
Parse a double from a string ala strtod(), trying locale specific characters and POSIX/C formatting.
Definition at line 638 of file strings.cc.
References posix_locale_strtold().
Referenced by string_to_double(), string_to_double(), string_to_long_double(), and string_to_long_double().
float Ase::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.
Definition at line 125 of file levenshtein.cc.
References std::string::data(), and std::string::size().
float Ase::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.
Definition at line 16 of file levenshtein.cc.
References damerau_levenshtein_restricted(), std::string::data(), std::min(), std::string::size(), and ssize_t.
Referenced by damerau_levenshtein_restricted().
Float Ase::db2voltage | ( | Float | x | ) |
Convert Decibel to synthesizer value (Voltage).
Definition at line 110 of file signalmath.hh.
References std::pow().
Float Ase::db_changed | ( | Float | a, |
Float | b | ||
) |
Determine a significant Decibel change.
Definition at line 128 of file signalmath.hh.
void Ase::debug | ( | const char * | cond, |
const char * | format, | ||
const Args &... | args | ||
) |
Issue a printf-like debugging message if cond
is enabled by $ASE_DEBUG.
Definition at line 182 of file utils.hh.
References ASE_UNLIKELY, debug_enabled(), debug_key_enabled(), debug_message(), and string_format().
bool ASE_PURE Ase::debug_enabled | ( | ) |
Check if any kind of debugging is enabled by $ASE_DEBUG.
Definition at line 175 of file utils.hh.
References ase_debugging_enabled, and ASE_UNLIKELY.
Referenced by debug().
bool Ase::debug_key_enabled | ( | const ::std::string & | conditional | ) |
Check if conditional
is enabled by $ASE_DEBUG.
Definition at line 46 of file utils.cc.
References debug_key_enabled().
Check if conditional
is enabled by $ASE_DEBUG.
Definition at line 38 of file utils.cc.
References string_option_find_value(), and string_to_bool().
Referenced by debug(), debug_key_enabled(), and debug_message().
std::string Ase::debug_key_value | ( | const char * | conditional | ) |
Retrieve the value assigned to debug key conditional
in $ASE_DEBUG.
Definition at line 53 of file utils.cc.
References string_option_find_value().
void Ase::debug_message | ( | const char * | cond, |
const std::string & | message | ||
) |
Print a debug message, called from Ase::debug().
Definition at line 61 of file utils.cc.
References std::string::c_str(), std::string::data(), debug_key_enabled(), std::string::empty(), executable_name(), gettimeofday(), return_unless, std::string::size(), and string_format().
Referenced by debug().
std::string Ase::decodefs | ( | const std::string & | utf8str | ) |
Decode UTF-8 string back into file system path representation, extracting surrogate code points as bytes.
Definition at line 131 of file unicode.cc.
References std::string::c_str(), char, std::string::reserve(), std::string::size(), and uint32_t.
Referenced by Ase::FileCrawler::assign_(), Ase::FileCrawler::canonify(), Ase::ProjectImpl::load_project(), and Ase::ProjectImpl::save_project().
Handle stdout and stderr printing with flushing.
Definition at line 79 of file utils.cc.
References std::string::c_str(), fflush(), fputs(), stderr(), and stdout().
Referenced by printerr(), and printout().
Create prefix for warnings and errors.
Definition at line 88 of file utils.cc.
References std::string::empty(), executable_path(), std::string::find(), std::string::rfind(), and std::string::substr().
Referenced by fatal_error(), and warning().
std::string Ase::displayfs | ( | const std::string & | utf8str | ) |
Convert UTF-8 encoded file system path into human readable display format, the conversion is lossy but readable.
Definition at line 150 of file unicode.cc.
References std::string::c_str(), std::string::reserve(), std::string::size(), uint32_t, and utf8encode().
Referenced by Ase::FileCrawler::canonify(), Ase::FileCrawler::current_folder(), and Ase::FileCrawler::list_entries().
std::string Ase::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.
Definition at line 112 of file unicode.cc.
References std::string::c_str(), std::string::reserve(), std::string::size(), uint32_t, and utf8encode().
Referenced by Ase::FileCrawler::canonify(), Ase::FileCrawler::current_folder(), Ase::FileCrawler::list_entries(), and Ase::ProjectImpl::saved_filename().
ChoiceS Ase::enum_lister | ( | const ParameterProperty & | ) |
Helper to list Jsonipc::Enum<> type values as Choice.
Definition at line 129 of file properties.hh.
std::string Ase::executable_name | ( | ) |
Retrieve the name part of executable_path().
Definition at line 742 of file platform.cc.
References std::string::c_str(), executable_path(), and strrchr().
Referenced by debug_message(), and program_alias().
std::string Ase::executable_path | ( | ) |
Retrieve the path to the currently running executable.
Definition at line 734 of file platform.cc.
Referenced by diag_prefix(), and executable_name().
Copy a block of floats.
Definition at line 37 of file datautils.hh.
Copy a block of integers.
Definition at line 46 of file datautils.hh.
Float precision variant of db2voltage using fast_exp2().
Definition at line 116 of file signalmath.hh.
References fast_exp2().
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.
Definition at line 82 of file mathutils.hh.
References Ase::FloatIEEE754::BIAS, and irintf().
Referenced by fast_db2voltage(), and fast_voltage2hz().
Float precision variant of hz2voltage using fast_log2().
Definition at line 92 of file signalmath.hh.
References fast_log2().
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.
Definition at line 101 of file mathutils.hh.
References Ase::FloatIEEE754::BIAS.
Referenced by fast_hz2voltage(), fast_voltage2db(), and Ase::AudioChain::render().
Float precision variant of voltage2db using fast_log2().
Definition at line 104 of file signalmath.hh.
References fast_log2().
Float precision variant of voltage2hz using fast_exp2().
Definition at line 80 of file signalmath.hh.
References fast_exp2(), and float.
void ASE_NORETURN Ase::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().
Definition at line 196 of file utils.hh.
References assertion_fatal(), diag_prefix(), and string_format().
Definition at line 755 of file platform.cc.
std::pair< std::shared_ptr< E >, ssize_t > Ase::find_shared_by_ref | ( | const std::vector< std::shared_ptr< E > > & | v, |
const E & | e | ||
) |
void Ase::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.
Definition at line 193 of file sortnet.hh.
References std::sort().
Referenced by Ase::MidiEventOutput::ensure_order().
Fill n
values of dst
with f
.
Definition at line 29 of file datautils.hh.
Referenced by Ase::AudioProcessor::assign_oblock().
Force number into double precision floating point format, even with -ffast-math
.
Definition at line 17 of file mathutils.hh.
Force number into single precision floating point format, even with -ffast-math
.
Definition at line 20 of file mathutils.hh.
Float Ase::hz2voltage | ( | Float | x | ) |
Convert Hertz to synthesizer value (Voltage).
Definition at line 86 of file signalmath.hh.
References std::log2().
Float Ase::hz_changed | ( | Float | a, |
Float | b | ||
) |
Determine a significant frequency change (audible Hertz).
Definition at line 122 of file signalmath.hh.
Round float to int, using round-to-nearest Fast version of f < 0 ? int (f - 0.5) : int (f + 0.5)
.
Definition at line 14 of file mathutils.hh.
Referenced by fast_exp2().
Definition at line 18 of file compress.cc.
Definition at line 157 of file compress.cc.
Definition at line 175 of file compress.cc.
Definition at line 222 of file compress.cc.
Definition at line 181 of file compress.cc.
Definition at line 163 of file compress.cc.
Definition at line 211 of file compress.cc.
Definition at line 137 of file compress.cc.
Definition at line 30 of file compress.cc.
Definition at line 169 of file compress.cc.
Definition at line 36 of file compress.cc.
Definition at line 199 of file compress.cc.
Definition at line 24 of file compress.cc.
Definition at line 187 of file compress.cc.
Definition at line 147 of file compress.cc.
Definition at line 127 of file compress.cc.
T Ase::json_parse | ( | const String & | jsonstring | ) |
Parse a well formed JSON string and return the resulting value.
Definition at line 547 of file serialize.hh.
Parse a well formed JSON string and assign contents to target
.
Definition at line 538 of file serialize.hh.
Referenced by Ase::ProjectImpl::load_project().
String Ase::json_stringify | ( | const T & | source, |
Writ::Flags | flags = Writ::Flags (0) |
||
) |
Create JSON string from source
.
Definition at line 530 of file serialize.hh.
Referenced by Ase::ProjectImpl::save_project().
CustomDataContainer * Ase::jsonapi_connection_data | ( | ) |
Definition at line 366 of file jsonapi.cc.
JsonapiBinarySender Ase::jsonapi_connection_sender | ( | ) |
Definition at line 374 of file jsonapi.cc.
WebSocketConnectionP Ase::jsonapi_make_connection | ( | WebSocketConnection::Internals & | internals, |
int | logflags | ||
) |
Definition at line 186 of file jsonapi.cc.
void Ase::jsonapi_set_subprotocol | ( | const String & | subprotocol | ) |
Definition at line 15 of file jsonapi.cc.
Definition at line 1286 of file strings.cc.
Definition at line 1293 of file strings.cc.
Definition at line 1324 of file strings.cc.
Definition at line 1300 of file strings.cc.
Definition at line 1307 of file strings.cc.
String Ase::libsndfile_version | ( | ) |
Definition at line 25 of file sndfile.cc.
StringS Ase::list_clap_files | ( | ) |
Definition at line 1888 of file clapplugin.cc.
void Ase::load_registered_drivers | ( | ) |
Load all registered drivers.
Definition at line 76 of file driver.cc.
References ase_error_blurb(), assert_return, and load_registered_drivers().
Referenced by load_registered_drivers().
LoftPtr< T > Ase::loft_make_unique | ( | Args &&... | args | ) |
Construct an object T
from Loft memory, wrapped in a unique_ptr.
Definition at line 112 of file loft.hh.
References ASE_ASSERT_WARN, std::unique_ptr::get(), std::unique_ptr::get_deleter(), and std::unique_ptr::release().
Configurable handler to open log files.
Definition at line 152 of file main.cc.
References std::string::c_str(), EBUSY, EEXIST, errno(), getenv(), gethostid(), Ase::Path::mkdirs(), open(), perror(), program_alias(), rename(), string_format(), and strstr().
void Ase::logmsg | ( | const std::string & | msg, |
const char *const | filename, | ||
const uint64_t | columnline, | ||
const char *const | function_name | ||
) |
Definition at line 52 of file logging.cc.
Definition at line 107 of file midievent.cc.
AudioEngine & Ase::make_audio_engine | ( | const VoidF & | owner_wakeup, |
uint | sample_rate, | ||
SpeakerArrangement | speakerarrangement | ||
) |
Definition at line 128 of file midievent.cc.
Definition at line 139 of file midievent.cc.
std::function< void(Value &)> Ase::make_enum_getter | ( | Enum * | v | ) |
Value getter for enumeration types.
Definition at line 90 of file properties.hh.
References std::string::empty(), and int64_t.
std::function< bool(const Value &)> Ase::make_enum_setter | ( | Enum * | v | ) |
Value setter for enumeration types.
Definition at line 109 of file properties.hh.
References ASE_RETURN_UNLESS.
Definition at line 95 of file midievent.cc.
Definition at line 83 of file midievent.cc.
Definition at line 168 of file midievent.cc.
Definition at line 159 of file midievent.cc.
Definition at line 119 of file midievent.cc.
Definition at line 150 of file midievent.cc.
Fill a memory area with a 32-bit quantitiy.
Definition at line 1221 of file strings.cc.
References wmemset().
uint64 Ase::monotonic_counter | ( | ) |
A monotonically increasing counter, increments are atomic and visible in all threads.
Definition at line 635 of file platform.cc.
|
constexpr |
|
constexpr |
ChoiceS & Ase::operator+= | ( | ChoiceS & | choices, |
Choice && | newchoice | ||
) |
bool Ase::operator== | ( | const std::vector< ValueP > & | v1, |
const std::vector< ValueP > & | v2 | ||
) |
|
constexpr |
|
constexpr |
|
externconstexpr |
Create a few letter nick name from a multi word parameter label.
Find a suitable 3-letter abbreviation for a Parameter without nick.
Definition at line 583 of file parameter.cc.
References std::string::substr().
Referenced by Ase::ClapPropertyImpl::nick().
|
noexcept |
Issue a warning about an assertion error.
Definition at line 94 of file cxxaux.cc.
References abort(), assertion_failed(), assertion_failed_fatal, std::string::c_str(), errno(), and strerror().
Parse a double from a string ala strtod(), trying locale specific characters and POSIX/C formatting.
Definition at line 626 of file strings.cc.
Referenced by current_locale_strtold().
void Ase::printerr | ( | const char * | format, |
const Args &... | args | ||
) |
Print a message on stderr (and flush stderr) ala printf(), using the POSIX/C locale.
Definition at line 217 of file utils.hh.
References diag_flush(), and string_format().
void Ase::printout | ( | const char * | format, |
const Args &... | args | ||
) |
Print a message on stdout (and flush stdout) ala printf(), using the POSIX/C locale.
Definition at line 210 of file utils.hh.
References diag_flush(), and string_format().
String Ase::program_alias | ( | ) |
Retrieve the program name as used for logging or debug messages.
Definition at line 849 of file platform.cc.
References std::string::empty(), and executable_name().
Referenced by application_name(), log_setup(), and Ase::ProjectImpl::save_project().
void Ase::program_alias_init | ( | String | customname | ) |
Set program_alias to a non-localized alias other than program_argv0 if desired.
Definition at line 855 of file platform.cc.
References assert_return, and std::string::empty().
String Ase::program_cwd | ( | ) |
The current working directory during startup.
Definition at line 877 of file platform.cc.
References Ase::Path::cwd().
Referenced by Ase::Path::abspath().
Definition at line 138 of file midievent.hh.
double Ase::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.
Definition at line 649 of file randomhash.cc.
References ASE_UNLIKELY.
Referenced by Ase::Test::random_float().
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.
Definition at line 663 of file randomhash.cc.
References return_unless.
Referenced by Ase::Test::random_frange().
uint64_t Ase::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.
Definition at line 622 of file randomhash.cc.
Referenced by Ase::AutoSeeder::random(), and Ase::Test::random_int64().
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.
Definition at line 632 of file randomhash.cc.
References ASE_UNLIKELY, return_unless, and uint64_t.
Referenced by Ase::Test::random_irange().
uint64_t Ase::random_nonce | ( | ) |
Provide a unique 64 bit identifier that is not 0, see also random_int64().
Definition at line 672 of file randomhash.cc.
References ASE_UNLIKELY, random_secret(), and uint64_t.
void Ase::random_secret | ( | uint64_t * | secret_var | ) |
Generate a secret non-zero nonce in secret_var, unless it has already been assigned.
Definition at line 682 of file randomhash.cc.
References uint64_t.
Referenced by random_nonce().
Add an AudioProcessor derived type to the audio processor registry.
Definition at line 582 of file processor.hh.
References Ase::AudioProcessor::engine(), and Ase::AudioProcessor::registry_add().
Register loader callbacks at static constructor time.
Definition at line 65 of file driver.cc.
References assert_return, and register_driver_loader().
Referenced by register_driver_loader().
Try to acquire low latency scheduling priority, returns true if nice level is < 0.
Definition at line 939 of file platform.cc.
References std::string::empty(), EPERM, errno(), sched_get_priority(), sched_set_priority(), and strerror().
Retrieve the nice level of process or thread tid
.
Definition at line 920 of file platform.cc.
References errno(), getpriority(), and strerror().
Referenced by sched_fast_priority().
Try to set the nice level of process or thread tid
to nicelevel
.
Definition at line 931 of file platform.cc.
References errno(), and setpriority().
Referenced by sched_fast_priority().
Calculate 224 bit SHA3 digest from data, see also class SHA3_224.
Definition at line 351 of file randomhash.cc.
References Ase::SHA3_224::digest(), uint8_t, and Ase::SHA3_224::update().
Calculate 256 bit SHA3 digest from data, see also class SHA3_256.
Definition at line 393 of file randomhash.cc.
References Ase::SHA3_256::digest(), uint8_t, and Ase::SHA3_256::update().
Calculate 384 bit SHA3 digest from data, see also class SHA3_384.
Definition at line 435 of file randomhash.cc.
References Ase::SHA3_384::digest(), uint8_t, and Ase::SHA3_384::update().
Calculate 512 bit SHA3 digest from data, see also class SHA3_512.
Definition at line 477 of file randomhash.cc.
References Ase::SHA3_512::digest(), uint8_t, and Ase::SHA3_512::update().
Calculate SHA3 extendable output digest for 128 bit security strength, see also class SHAKE128.
Definition at line 519 of file randomhash.cc.
References Ase::SHAKE128::squeeze_digest(), uint8_t, and Ase::SHAKE128::update().
Calculate SHA3 extendable output digest for 256 bit security strength, see also class SHAKE256.
Definition at line 561 of file randomhash.cc.
References Ase::SHAKE256::squeeze_digest(), uint8_t, and Ase::SHAKE256::update().
const std::shared_ptr< typename std::remove_pointer< Target >::type > Ase::shared_ptr_cast | ( | const Source * | object | ) |
const std::shared_ptr< typename std::remove_pointer< Target >::type > Ase::shared_ptr_cast | ( | const std::shared_ptr< Source > & | sptr | ) |
std::shared_ptr< typename std::remove_pointer< Target >::type > Ase::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. |
std::shared_ptr< typename std::remove_pointer< Target >::type > Ase::shared_ptr_cast | ( | std::shared_ptr< Source > & | sptr | ) |
std::shared_ptr< typename std::remove_pointer< Source >::type > Ase::shared_ptr_from | ( | Source * | object | ) |
ErrorReason Ase::spawn_process | ( | const std::vector< std::string > & | argv, |
pid_t * | child_pid, | ||
int | pdeathsig | ||
) |
Span a child process after cleaning up the environment.
Definition at line 179 of file atquit.cc.
References _exit(), std::string::c_str(), chdir(), close(), errno(), execvp(), fork(), fprintf(), getenv(), getpid(), pid_t, sigemptyset(), sigprocmask(), stderr(), strerror(), sysconf(), and unsetenv().
const char * Ase::speaker_arrangement_bit_name | ( | SpeakerArrangement | spa | ) |
Definition at line 177 of file transport.cc.
SpeakerArrangement Ase::speaker_arrangement_channels | ( | SpeakerArrangement | spa | ) |
Definition at line 170 of file transport.cc.
uint8 Ase::speaker_arrangement_count_channels | ( | SpeakerArrangement | spa | ) |
Definition at line 153 of file transport.cc.
std::string Ase::speaker_arrangement_desc | ( | SpeakerArrangement | spa | ) |
Definition at line 217 of file transport.cc.
bool Ase::speaker_arrangement_is_aux | ( | SpeakerArrangement | spa | ) |
Definition at line 163 of file transport.cc.
Find the maximum suqared value in a block of floats.
Definition at line 19 of file datautils.cc.
References std::max().
Referenced by Ase::AudioChain::render().
Calculate suqare sum of a block of floats.
Definition at line 10 of file datautils.cc.
StreamReaderP Ase::stream_reader_from_file | ( | const String & | file | ) |
Definition at line 581 of file storage.cc.
StreamReaderP Ase::stream_reader_zip_member | ( | const String & | archive, |
const String & | member, | ||
Storage::StorageFlags | f | ||
) |
Definition at line 665 of file storage.cc.
StreamReaderP Ase::stream_reader_zstd | ( | StreamReaderP & | istream | ) |
Definition at line 312 of file compress.cc.
Definition at line 751 of file storage.cc.
StreamWriterP Ase::stream_writer_zstd | ( | const StreamWriterP & | ostream, |
int | level | ||
) |
Definition at line 433 of file compress.cc.
const char * Ase::strerror | ( | ) |
Definition at line 1655 of file strings.cc.
Get POSIX locale strerror.
Definition at line 1642 of file strings.cc.
References errno(), and strerror().
String Ase::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.
Definition at line 68 of file strings.cc.
References std::string::c_str(), std::string::size(), strchr(), and std::string::substr().
Referenced by string_to_identifier().
Capitalize words, so the first letter is upper case, the rest lower case.
Definition at line 186 of file strings.cc.
References isalpha(), and std::string::size().
Like strcasecmp(3) for UTF-8 strings.
Definition at line 266 of file strings.cc.
References string_casefold(), and string_cmp().
Yield UTF-8 string useful for case insensitive comparisons.
Definition at line 249 of file strings.cc.
References std::string::c_str(), and std::string::size().
Referenced by string_casecmp().
Like strcmp(3) for UTF-8 strings.
Definition at line 259 of file strings.cc.
References std::string::c_str().
Referenced by string_casecmp().
Returns whether uuid_string1 compares smaller (-1), equal (0) or greater (+1) to uuid_string2.
Definition at line 839 of file strings.cc.
References std::string::c_str(), and strcasecmp().
Returns whether string
ends with fragment
.
Definition at line 863 of file strings.cc.
References std::string::size().
Referenced by Ase::FileCrawler::canonify(), Ase::ProjectImpl::save_project(), and string_endswith().
Returns whether string ends with any element of fragments
.
Definition at line 870 of file strings.cc.
References string_endswith().
Find occurance of word
in haystack
.
Definition at line 520 of file strings.cc.
References return_unless, strlen(), and strstr().
Referenced by Ase::WebSocketConnection::http_request().
Convert a boolean value into a string.
Definition at line 533 of file strings.cc.
Parse a possibly quoted C string into regular string.
Definition at line 1043 of file strings.cc.
References char, MIN, and std::string::size().
Referenced by Ase::IniFile::cook_string().
Convert a double into a string, using the POSIX/C locale.
Definition at line 699 of file strings.cc.
References std::isinf(), std::isnan(), std::signbit(), and string_format().
Referenced by Ase::Value::as_string(), and string_from_double_vector().
String Ase::string_from_double_vector | ( | const std::vector< double > & | dvec, |
const String & | delim | ||
) |
Construct a string out of all double values passed in dvec, separated by delim.
Definition at line 759 of file strings.cc.
References string_from_double().
Returns a String describing the passed in errno value, similar to strerror().
Definition at line 802 of file strings.cc.
References strerror(), and strerror_r().
Definition at line 56 of file strings.hh.
Convert a float into a string, using the POSIX/C locale.
Definition at line 688 of file strings.cc.
References std::isinf(), std::isnan(), std::signbit(), and string_format().
Convert a 64bit signed integer into a string.
Definition at line 604 of file strings.cc.
References string_format().
Referenced by Ase::Value::as_string().
Convert a long double into a string, using the POSIX/C locale.
Definition at line 710 of file strings.cc.
References std::isinf(), std::isnan(), std::signbit(), and string_format().
Extract the full function name from PRETTY_FUNCTION. See also ASE_SIMPLE_FUNCTION.
Definition at line 934 of file strings.cc.
References std::string::c_str(), strchr(), and string_replace().
String Ase::string_from_type | ( | Type | value | ) |
Create a string from a templated argument value, such as bool, int, double.
Definition at line 115 of file strings.hh.
String Ase::string_from_type< bool > | ( | bool | value | ) |
Definition at line 126 of file strings.hh.
String Ase::string_from_type< double > | ( | double | value | ) |
Definition at line 122 of file strings.hh.
String Ase::string_from_type< float > | ( | float | value | ) |
Definition at line 124 of file strings.hh.
String Ase::string_from_type< int > | ( | int | value | ) |
Definition at line 132 of file strings.hh.
String Ase::string_from_type< int16 > | ( | int16 | value | ) |
Definition at line 128 of file strings.hh.
String Ase::string_from_type< int64 > | ( | int64 | value | ) |
Definition at line 136 of file strings.hh.
Definition at line 120 of file strings.hh.
String Ase::string_from_type< String > | ( | String | value | ) |
Definition at line 140 of file strings.hh.
String Ase::string_from_type< uint > | ( | uint | value | ) |
Definition at line 134 of file strings.hh.
String Ase::string_from_type< uint16 > | ( | uint16 | value | ) |
Definition at line 130 of file strings.hh.
String Ase::string_from_type< uint64 > | ( | uint64 | value | ) |
Definition at line 138 of file strings.hh.
Convert a 64bit unsigned integer into a string.
Definition at line 561 of file strings.cc.
References string_format().
Checks if a string contains a digit, optionally preceeded by whitespaces.
Definition at line 568 of file strings.cc.
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.
Definition at line 1184 of file strings.cc.
References std::string::c_str(), and string_format().
Definition at line 125 of file strings.cc.
Check if string_canonify() would modify string.
Definition at line 90 of file strings.cc.
References std::string::c_str(), and strchr().
Referenced by Ase::MakeIcon::KwIcon(), and Ase::IniWriter::output().
Check input
to be a NCName, according to the QName EBNF. See https://en.wikipedia.org/wiki/QName
Definition at line 325 of file unicode.cc.
References utf8_to_unicode().
Returns whether uuid_string contains a properly formatted UUID string.
Definition at line 815 of file strings.cc.
References std::string::size().
Check if all string characters are Unicode lower case characters.
Definition at line 146 of file strings.cc.
References std::string::size().
Check if all string characters are Unicode upper case characters.
Definition at line 166 of file strings.cc.
References std::string::size().
Referenced by Ase::FileCrawler::assign_().
Join a number of strings. Join a string vector into a single string, using junctor inbetween each pair of strings.
Definition at line 452 of file strings.cc.
References std::vector::size().
Referenced by Ase::MakeIcon::KwIcon(), Ase::Driver::priority_string(), and Ase::Path::simplify_abspath().
Formatted printing like string_vprintf using the current locale.
Definition at line 316 of file strings.cc.
Strip whitespaces from the left of a string.
Definition at line 1106 of file strings.cc.
References std::string::size(), strchr(), and std::string::substr().
Referenced by string_vector_lstrip().
Check equality of strings canonicalized to "[0-9a-z_]+".
Definition at line 926 of file strings.cc.
References std::string::size().
Variant of string_match_identifier() that matches tail against ident at word boundary.
Definition at line 919 of file strings.cc.
References std::string::size().
Reproduce a string s for count times.
Definition at line 31 of file strings.cc.
References string_multiply().
Referenced by string_multiply().
Yield normalized composed UTF-8 string.
Definition at line 209 of file strings.cc.
References std::string::c_str(), and std::string::size().
Yield normalized decomposed UTF-8 string.
Definition at line 219 of file strings.cc.
References std::string::c_str(), and std::string::size().
Formatting stripped normalized composed UTF-8 string.
Definition at line 229 of file strings.cc.
References std::string::c_str(), and std::string::size().
Formatting stripped normalized decomposed UTF-8 string.
Definition at line 239 of file strings.cc.
References std::string::c_str(), and std::string::size().
Check if an option is set/unset in an options list string.
Definition at line 1412 of file strings.cc.
References string_option_find(), and string_to_bool().
Referenced by Ase::GadgetImpl::serialize().
String Ase::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
.
Definition at line 1404 of file strings.cc.
References std::string::data(), std::string_view::data(), and std::string_view::size().
Referenced by string_option_check().
std::string_view Ase::string_option_find_value | ( | const char * | string, |
const char * | feature, | ||
const char * | fallback, | ||
const char * | denied, | ||
bool | matchallnone | ||
) |
Low level option search, avoids dynamic allocations.
Definition at line 1397 of file strings.cc.
Referenced by debug_key_enabled(), debug_key_value(), Ase::Test::slow(), and Ase::Test::verbose().
String Ase::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.
Definition at line 1144 of file strings.cc.
References std::string::find(), std::string::size(), and std::string::substr().
Referenced by string_from_pretty_function_name().
Strip whitespaces from the right of a string.
Definition at line 1116 of file strings.cc.
References std::string::size(), strchr(), and std::string::substr().
Referenced by string_vector_rstrip().
const String & Ase::string_set_a2z | ( | ) |
Returns a string containing all of a-z.
Definition at line 102 of file strings.cc.
const String & Ase::string_set_A2Z | ( | ) |
Returns a string containing all of A-Z.
Definition at line 110 of file strings.cc.
const String & Ase::string_set_ascii_alnum | ( | ) |
Returns a string containing all of 0-9, A-Z and a-z.
Definition at line 118 of file strings.cc.
Referenced by Ase::MakeIcon::KwIcon(), and Ase::IniWriter::output().
Split a string, using splitter as delimiter. Passing "" as splitter will split the string at whitespace positions.
Definition at line 343 of file strings.cc.
References std::vector::push_back(), std::string::size(), and std::vector::size().
Referenced by Ase::WebSocketConnection::http_request(), and Ase::Path::simplify_abspath().
Split a string, using any of the splitchars as delimiter. Passing "" as splitter will split the string between all position.
Definition at line 365 of file strings.cc.
References std::string::c_str(), std::string::empty(), std::vector::push_back(), std::string::size(), std::vector::size(), and strchr().
Referenced by Ase::MakeIcon::KwIcon().
Returns whether string
starts with fragment
.
Definition at line 846 of file strings.cc.
References std::string::size().
Referenced by anklang_cachedir_clean_stale(), anklang_cachedir_cleanup(), Ase::WebSocketConnection::http_request(), Ase::AudioProcessor::registry_add(), string_startswith(), and Ase::MakeIcon::SvgIcon().
Returns whether string starts with any element of fragments
.
Definition at line 853 of file strings.cc.
References string_startswith().
Strip whitespaces from the left and right of a string.
Definition at line 1126 of file strings.cc.
References std::string::size(), strchr(), and std::string::substr().
Referenced by string_vector_strip().
Replace all occouranes of match in input with subst.
Definition at line 1159 of file strings.cc.
References std::string::data(), and std::string::size().
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.
Definition at line 467 of file strings.cc.
Referenced by debug_key_enabled(), Ase::Test::slow(), string_option_check(), and Ase::Test::verbose().
Escape text like a C string. Returns a string that escapes all characters with a backslash '\' that need escaping in C language string syntax.
Definition at line 1011 of file strings.cc.
References std::string::begin(), std::string::end(), and string_format().
Referenced by string_to_cquote().
Returns a string as C string including double quotes.
Definition at line 1036 of file strings.cc.
References string_to_cescape().
Referenced by Ase::IniFile::IniFile(), Ase::IniFile::IniFile(), Ase::IniWriter::output(), and Ase::Value::repr().
Similar to string_to_double(const String&), but returns the first failing character position in endptr.
Definition at line 681 of file strings.cc.
References current_locale_strtold().
Parse a double from a string, trying locale specific characters and POSIX/C formatting.
Definition at line 674 of file strings.cc.
References current_locale_strtold().
Referenced by Ase::Value::as_double(), string_to_double_vector(), and string_to_seconds().
std::vector< double > Ase::string_to_double_vector | ( | const String & | string | ) |
Parse a string into a list of doubles, expects ';' as delimiter.
Definition at line 721 of file strings.cc.
References strchr(), and string_to_double().
Definition at line 57 of file strings.hh.
Convert bytes in string input
to hexadecimal numbers.
Definition at line 1171 of file strings.cc.
References std::string::reserve(), std::string::size(), string_format(), and uint8_t.
Force lower case, alphanumerics + underscore and non-digit start.
Definition at line 54 of file strings.cc.
References std::string::empty(), string_canonify(), and string_tolower().
Referenced by Ase::AudioProcessor::add_input_bus(), and Ase::AudioProcessor::add_output_bus().
Parse a string into a 64bit integer, optionally specifying the expected number base.
Definition at line 578 of file strings.cc.
References int64_t, strtoull(), and uint64_t.
Referenced by anklang_cachedir_clean_stale(), anklang_cachedir_cleanup(), and Ase::Value::as_int().
Similar to string_to_long_double(const String&), but returns the first failing character position in endptr.
Definition at line 667 of file strings.cc.
References current_locale_strtold().
Parse a long double from a string, trying locale specific characters and POSIX/C formatting.
Definition at line 660 of file strings.cc.
References current_locale_strtold().
Convert input
to a NCName, according to the QName EBNF. See https://en.wikipedia.org/wiki/QName
Definition at line 339 of file unicode.cc.
References utf8_to_unicode(), and utf8encode().
Parse string into seconds.
Definition at line 773 of file strings.cc.
References std::string::c_str(), string_to_double(), strlen(), and strncmp().
Type Ase::string_to_type | ( | const String & | string | ) |
Convert a string to template argument type, such as bool, int, double.
Definition at line 111 of file strings.hh.
bool Ase::string_to_type< bool > | ( | const String & | string | ) |
Definition at line 125 of file strings.hh.
double Ase::string_to_type< double > | ( | const String & | string | ) |
Definition at line 121 of file strings.hh.
float Ase::string_to_type< float > | ( | const String & | string | ) |
Definition at line 123 of file strings.hh.
int Ase::string_to_type< int > | ( | const String & | string | ) |
Definition at line 131 of file strings.hh.
int16 Ase::string_to_type< int16 > | ( | const String & | string | ) |
Definition at line 127 of file strings.hh.
int64 Ase::string_to_type< int64 > | ( | const String & | string | ) |
Definition at line 135 of file strings.hh.
Definition at line 119 of file strings.hh.
String Ase::string_to_type< String > | ( | const String & | string | ) |
Definition at line 139 of file strings.hh.
uint Ase::string_to_type< uint > | ( | const String & | string | ) |
Definition at line 133 of file strings.hh.
uint16 Ase::string_to_type< uint16 > | ( | const String & | string | ) |
Definition at line 129 of file strings.hh.
uint64 Ase::string_to_type< uint64 > | ( | const String & | string | ) |
Definition at line 137 of file strings.hh.
Parse a string into a 64bit unsigned integer, optionally specifying the expected number base.
Definition at line 540 of file strings.cc.
References std::string::c_str(), and strtoull().
Convert all string characters into Unicode lower case characters.
Definition at line 136 of file strings.cc.
References std::string::size().
Referenced by Ase::Blob::from_url(), and string_to_identifier().
Convert all string characters into Unicode title characters.
Definition at line 176 of file strings.cc.
References std::string::size().
Convert all string characters into Unicode upper case characters.
Definition at line 156 of file strings.cc.
References std::string::size().
Referenced by Ase::FileCrawler::expand_fsdir().
Decode URL %-sequences in a string, decode '+' if form_url_encoded
.
Definition at line 965 of file strings.cc.
References isxdigit(), std::string::push_back(), std::string::reserve(), std::string::size(), and strtol().
Encode special characters to URL %-sequences, encode space as '+' if form_url_encoded
.
Definition at line 989 of file strings.cc.
References isalnum(), std::string::push_back(), std::string::reserve(), std::string::size(), strchr(), and uint8_t.
void Ase::string_vector_erase_empty | ( | StringS & | svector | ) |
Remove empty elements from a string vector.
Definition at line 414 of file strings.cc.
References std::vector::begin(), std::vector::erase(), and std::vector::size().
String Ase::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.
Definition at line 1235 of file strings.cc.
References std::string::data(), std::string::size(), std::vector::size(), and strncmp().
String Ase::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.
Definition at line 1252 of file strings.cc.
References std::string::data(), std::string::size(), std::vector::size(), strncmp(), and std::string::substr().
void Ase::string_vector_lstrip | ( | StringS & | svector | ) |
Left-strip all elements of a string vector, see string_lstrip().
Definition at line 426 of file strings.cc.
References string_lstrip().
void Ase::string_vector_rstrip | ( | StringS & | svector | ) |
Right-strip all elements of a string vector, see string_rstrip().
Definition at line 434 of file strings.cc.
References string_rstrip().
void Ase::string_vector_strip | ( | StringS & | svector | ) |
Strip all elements of a string vector, see string_strip().
Definition at line 442 of file strings.cc.
References string_strip().
Formatted printing ala vprintf() into a String, using the POSIX/C locale.
Definition at line 309 of file strings.cc.
Definition at line 395 of file strings.cc.
Definition at line 403 of file strings.cc.
Definition at line 506 of file strings.cc.
TelemetryField Ase::telemetry_field | ( | const String & | name, |
const T * | field | ||
) |
bool Ase::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.
Definition at line 1573 of file strings.cc.
References std::string::append(), std::string::c_str(), EILSEQ, EINVAL, errno(), iconv(), iconv_close(), and std::string::size().
String Ase::this_thread_get_name | ( | ) |
Definition at line 1128 of file platform.cc.
int Ase::this_thread_getpid | ( | ) |
Definition at line 1137 of file platform.cc.
int Ase::this_thread_gettid | ( | ) |
Definition at line 1143 of file platform.cc.
bool Ase::this_thread_is_ase | ( | ) |
Definition at line 177 of file platform.hh.
int Ase::this_thread_online_cpus | ( | ) |
Definition at line 1155 of file platform.cc.
ThreadId Ase::this_thread_self | ( | ) |
Definition at line 1114 of file platform.cc.
void Ase::this_thread_set_name | ( | const String & | name16chars | ) |
Definition at line 1120 of file platform.cc.
uint64 Ase::timestamp_benchmark | ( | ) |
Returns benchmark timestamp in nano-seconds, clock starts around program startup.
Definition at line 601 of file platform.cc.
References clock_gettime(), ISLIKELY, std::min(), and timestamp_realtime().
Convert stamp into a string, adding µsecond fractions if space permits.
Definition at line 620 of file platform.cc.
References std::max(), std::string::size(), string_format(), and std::string::substr().
uint64_t Ase::timestamp_now | ( | ) |
uint64 Ase::timestamp_realtime | ( | ) |
Return the current time as uint64 in µseconds.
Definition at line 578 of file platform.cc.
References clock_gettime(), gettimeofday(), and ISLIKELY.
Referenced by Ase::TimedSource::dispatch(), Ase::Stopwatch::start(), Ase::Stopwatch::stop(), timestamp_benchmark(), and Ase::TaskStatus::update().
uint64 Ase::timestamp_resolution | ( | ) |
Provide resolution of timestamp_benchmark() in nano-seconds.
Definition at line 593 of file platform.cc.
uint64 Ase::timestamp_startup | ( | ) |
Provides the timestamp_realtime() value from program startup.
Definition at line 570 of file platform.cc.
Return whether u matches any of the assigned Unicode planes.
Definition at line 33 of file unicode.hh.
Return whether u is not one of the 66 Unicode noncharacters.
Definition at line 67 of file unicode.hh.
References unicode_is_noncharacter().
Referenced by Ase::MakeIcon::UcIcon().
Return whether u is one of the 65 Unicode control codes.
Definition at line 74 of file unicode.hh.
Return whether u is one of the 66 Unicode noncharacters.
Definition at line 59 of file unicode.hh.
Referenced by unicode_is_character().
Return whether u is in one of the 3 private use areas of Unicode.
Definition at line 82 of file unicode.hh.
Return whether u is an allowed Unicode codepoint within 0x10FFFF and not part of a UTF-16 surrogate pair.
Definition at line 51 of file unicode.hh.
int Ase::user_id | ( | ) |
Definition at line 1194 of file platform.cc.
String Ase::user_name | ( | ) |
Definition at line 1200 of file platform.cc.
String Ase::user_real_name | ( | ) |
Definition at line 1206 of file platform.cc.
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.
Definition at line 221 of file unicode.cc.
Referenced by string_is_ncname(), string_to_ncname(), Ase::MakeIcon::UcIcon(), and utf8decode().
size_t Ase::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.
Definition at line 233 of file unicode.cc.
References std::string::data(), std::string::size(), and uint32_t.
std::vector< uint32_t > Ase::utf8decode | ( | const std::string & | utf8str | ) |
Convert valid UTF-8 sequences to Unicode codepoints, invalid sequences are treated as Latin-1 characters.
Definition at line 208 of file unicode.cc.
References std::string::c_str(), std::string::size(), and utf8_to_unicode().
std::string Ase::utf8encode | ( | const std::vector< uint32_t > & | codepoints | ) |
Convert codepoints into an UTF-8 string, using the shortest possible encoding.
Definition at line 287 of file unicode.cc.
References utf8encode().
std::string Ase::utf8encode | ( | const uint32_t * | codepoints, |
size_t | n_codepoints | ||
) |
Convert codepoints into an UTF-8 string, using the shortest possible encoding.
Definition at line 249 of file unicode.cc.
References std::string::push_back(), std::string::reserve(), and uint32_t.
Referenced by displayfs(), encodefs(), string_to_ncname(), and utf8encode().
Count valid UTF-8 sequences, invalid sequences are counted as Latin-1 characters.
Definition at line 184 of file unicode.cc.
size_t Ase::utf8len | ( | const std::string & | str | ) |
Count valid UTF-8 sequences, invalid sequences are counted as Latin-1 characters.
Definition at line 194 of file unicode.cc.
References std::string::data(), and std::string::size().
Float Ase::voltage2db | ( | Float | x | ) |
Convert synthesizer value (Voltage) to Decibel.
Definition at line 98 of file signalmath.hh.
References std::log10().
Float Ase::voltage2hz | ( | Float | x | ) |
Convert synthesizer value (Voltage) to Hertz.
Definition at line 74 of file signalmath.hh.
References std::exp2().
Float Ase::voltage_changed | ( | Float | a, |
Float | b | ||
) |
Determine a significant synthesizer value (Voltage) change.
Definition at line 134 of file signalmath.hh.
void Ase::warning | ( | const char * | format, |
const Args &... | args | ||
) |
Issue a printf-like warning message.
Definition at line 203 of file utils.hh.
References assertion_failed(), diag_prefix(), and string_format().
std::shared_ptr< C > Ase::weak_ptr_fetch_or_create | ( | std::weak_ptr< C > & | wptr, |
const std::function< std::shared_ptr< C >()> & | ctor | ||
) |
String Ase::webui_create_auth_redirect | ( | const std::string & | executable, |
unsigned | port, | ||
const std::string & | token, | ||
const std::string & | snapmode | ||
) |
ErrorReason Ase::webui_start_browser | ( | const std::string & | mode, |
MainLoopP | loop, | ||
const std::string & | url, | ||
const std::function< void()> & | onclose | ||
) |
uint8 * Ase::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.
Definition at line 257 of file blob.cc.
References assert_return_unreached, EINVAL, ENOMEM, errno(), and zintern_free().
void Ase::zintern_free | ( | uint8 * | dc_data | ) |
Free data returned from zintern_decompress().
Definition at line 235 of file blob.cc.
Referenced by zintern_decompress().
Definition at line 61 of file compress.cc.
Definition at line 67 of file compress.cc.
Definition at line 84 of file compress.cc.
Definition at line 108 of file compress.cc.
Definition at line 97 of file compress.cc.
|
constexpr |
Definition at line 89 of file internal.hh.
void Ase::__noreturn__ |
Definition at line 752 of file platform.cc.
bool Ase::ase_debugging_enabled |
Global boolean to reduce debugging penalty where possible.
Definition at line 19 of file utils.cc.
Referenced by debug_enabled().
bool Ase::ase_fatal_warnings |
bool Ase::assertion_failed_fatal |
Global flag to force aborting on assertion warnings.
Definition at line 106 of file cxxaux.cc.
Referenced by assertion_failed(), assertion_fatal(), and perror_die().
|
constexpr |
Maximum number of values in the const_float_zeros block.
Definition at line 10 of file datautils.hh.
uint64_t Ase::cached_hash_secret |
Use hash_secret() for access.
Definition at line 696 of file randomhash.cc.
const float *const Ase::cent_table |
Finetune factor table with 201 entries for -100…0…+100
cent.
Definition at line 63 of file mathtables.cc.
uint64_t Ase::columnline |
Definition at line 40 of file logging.hh.
float Ase::const_float_zeros |
Block of const floats allof value 0.
Definition at line 7 of file datautils.cc.
Referenced by Ase::AudioProcessor::redirect_oblock().
|
constexpr |
Double round-off error at 1.0, equals 2^-53.
Definition at line 10 of file mathutils.hh.
Definition at line 177 of file entropy.cc.
Definition at line 40 of file logging.hh.
Definition at line 40 of file logging.hh.
|
constexpr |
|
constexpr |
Definition at line 18 of file transport.cc.
MainAppImpl Ase::main_app |
JobQueue Ase::main_jobs | ( | call_main_loop | ) |
RtJobQueue Ase::main_rt_jobs |
|
constexpr |
Definition at line 56 of file transport.hh.
|
constexpr |
Definition at line 58 of file transport.hh.
Definition at line 177 of file entropy.cc.
|
constexpr |
First (internal) MIDI note event ID (lower IDs are reserved for external notes).
Definition at line 12 of file clip.hh.
Referenced by Ase::ClipImpl::change_batch().
|
constexpr |
Last valid (internal) MIDI note event ID.
Definition at line 14 of file clip.hh.
Referenced by Ase::ClipImpl::change_batch().
|
constexpr |
Definition at line 55 of file transport.hh.
|
constexpr |
Definition at line 57 of file transport.hh.
|
constexpr |
Definition at line 54 of file transport.hh.
const float *const Ase::semitone_tables_265 |
Musical Tuning Tables, to be indexed by MusicalTuning
Definition at line 439 of file mathtables.cc.
Referenced by Ase::MidiNote::note_to_freq().
ServerImpl * Ase::SERVER |
|
constexpr |
Definition at line 45 of file transport.hh.
|
constexpr |
|
constexpr |
|
constexpr |
Maximum number of sample frames to calculate in Processor::render().
Definition at line 53 of file transport.hh.
Referenced by Ase::ClipImpl::serialize(), Ase::TickSignature::set_bpm(), and Ase::TickSignature::set_samplerate().
|
constexpr |
Definition at line 23 of file unicode.hh.