Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Namespaces | Classes | Concepts | Typedefs | Enumerations | Functions | Variables
Ase Namespace Reference

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
 

Typedefs

template<class T >
using Atomic = boost::atomic< T >
 Substitute for std::atomic<> with fixes for GCC.
 
using AtomicU64 = std::atomic< uint64 >
 
using ClapEventParamS = std::vector< clap_event_param_value >
 
using ClapEventUnionS = std::vector< ClapEventUnion >
 
using ClapResourceHash = std::tuple< clap_id, String >
 
using ClapResourceHashS = std::vector< ClapResourceHash >
 
using ClapParamIdValue = std::tuple< clap_id, double >
 
using ClapParamIdValueS = std::vector< ClapParamIdValue >
 
using ClapParamInfoMap = std::unordered_map< clap_id, ClapParamInfoImpl * >
 
using ClapParamUpdateS = std::vector< ClapParamUpdate >
 
using ClapParamInfoS = std::vector< ClapParamInfo >
 
using ClipImplGeneratorS = std::vector< ClipImpl::Generator >
 
typedef uint32_t uint
 Provide 'uint' as convenience type.
 
typedef uint8_t uint8
 An 8-bit unsigned integer.
 
typedef uint16_t uint16
 A 16-bit unsigned integer.
 
typedef uint32_t uint32
 A 32-bit unsigned integer.
 
typedef uint64_t uint64
 A 64-bit unsigned integer, use PRI*64 in format strings.
 
typedef int8_t int8
 An 8-bit signed integer.
 
typedef int16_t int16
 A 16-bit signed integer.
 
typedef int32_t int32
 A 32-bit signed integer.
 
typedef int64_t int64
 A 64-bit unsigned integer, use PRI*64 in format strings.
 
typedef uint32_t unichar
 A 32-bit unsigned integer used for Unicode characters.
 
using String = std::string
 Convenience alias for std::string.
 
using StringS = std::vector< String >
 Convenience alias for a std::vector<std::string>.
 
using StringPair = std::pair< std::string, std::string >
 
using VoidF = std::function< void()>
 
using VirtualBaseP = std::shared_ptr< VirtualBase >
 
template<bool value>
using REQUIRES = typename ::std::enable_if< value, bool >::type
 REQUIRES<value> - Simplified version of std::enable_if<cond,bool>::type to use SFINAE in function templates.
 
template<bool value>
using REQUIRESv = typename ::std::enable_if< value, void >::type
 REQUIRESv<value> - Simplified version of std::enable_if<cond,void>::type to use SFINAE in struct templates.
 
using CallbackS = std::vector< std::function< void()> >
 
using DCallbackS = std::vector< std::function< void(double)> >
 
using EventConnectionW = std::weak_ptr< EventConnection >
 
using EventConnectionP = std::shared_ptr< EventConnection >
 
using EventHandler = std::function< void(const Event &)>
 
using InstanceP = std::shared_ptr< SharedBase >
 
using ValueP = std::shared_ptr< Value >
 
using WritNodeS = std::vector< WritNode >
 
using RegisteredLoaderFunc = Error(*)()
 
using RegisteredLoaderVector = std::vector< RegisteredLoader >
 
using DriverP = Driver::DriverP
 
using MidiDriverP = MidiDriver::MidiDriverP
 
using PcmDriverP = PcmDriver::PcmDriverP
 
using VoidFunc = std::function< void()>
 
using StartQueue = AsyncBlockingQueue< char >
 
using EngineMidiInputW = ::std::weak_ptr< EngineMidiInput >
 
using EngineMidiInputP = ::std::shared_ptr< EngineMidiInput >
 
using EngineMidiInputS = ::std::vector< EngineMidiInputP >
 
using JsonapiConnectionP = std::shared_ptr< JsonapiConnection >
 
using JsonapiConnectionW = std::weak_ptr< JsonapiConnection >
 
using JsonapiBinarySender = std::function< bool(const String &)>
 
template<typename T >
using LoftPtr = std::unique_ptr< T, LoftFree >
 A std::unique_ptr<> for Loft allocations.
 
typedef std::shared_ptr< EventSourceEventSourceP
 
typedef std::shared_ptr< TimedSourceTimedSourceP
 
typedef std::shared_ptr< PollFDSourcePollFDSourceP
 
typedef std::shared_ptr< DispatcherSourceDispatcherSourceP
 
typedef std::shared_ptr< USignalSourceUSignalSourceP
 
typedef std::shared_ptr< SigchldSourceSigchldSourceP
 
typedef std::shared_ptr< EventLoopEventLoopP
 
typedef std::shared_ptr< MainLoopMainLoopP
 
using CStringS = std::vector< CString >
 
using MonitorImplP = std::shared_ptr< MonitorImpl >
 
using ObjectImplP = std::shared_ptr< ObjectImpl >
 
using String3 = std::tuple< String, String, String >
 
using MinMaxStep = std::tuple< double, double, double >
 Min, max, stepping for double ranges.
 
using ChoicesFunc = std::function< ChoiceS(const CString &)>
 Handler to generate all possible parameter choices dynamically.
 
using ParamInitialVal = std::variant< bool, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, float, double, const char *, std::string >
 Initial value for parameters.
 
using ParameterC = std::shared_ptr< const Parameter >
 
using ThreadId = std::thread::id
 
using StringPairS = std::vector< std::tuple< String, String > >
 
using ProjectImplP = std::shared_ptr< ProjectImpl >
 
using PrefsValueCallbackList = CallbackList< CString, const Value & >
 
using PrefsMap = std::unordered_map< CString, PrefsValue >
 
using PropertyGetter = std::function< void(Value &)>
 Function type for Property value getters.
 
using PropertySetter = std::function< bool(const Value &)>
 Function type for Property value setters.
 
using PropertyLister = std::function< ChoiceS(const ParameterProperty &)>
 Function type to list Choice Property values.
 
using FastRng = Mwc256
 
using WritP = std::shared_ptr< Writ >
 
using TelemetryPlanW = ::std::weak_ptr< TelemetryPlan >
 
using TelemetryPlanP = ::std::shared_ptr< TelemetryPlan >
 
using TelemetryPlanS = ::std::vector< TelemetryPlanP >
 
using ValueVariant = std::variant< std::monostate, bool, int64, double, String, ValueS, ValueR, InstanceP >
 Variant type to hold different types of values.
 
template<size_t I, size_t J>
using IDX = typename ::std::enable_if< I==J, bool >::type
 
template<class T , class C >
using TYP = typename ::std::enable_if< std::is_same< T, C >::value, bool >::type
 
using WaveWriterP = std::shared_ptr< WaveWriter >
 
using WebSocketServerImplP = std::shared_ptr< WebSocketServerImpl >
 
using WppServer = websocketpp::server< CustomServerConfig >
 
using WppConnectionP = WppServer::connection_ptr
 
using WppConnection = WppConnectionP::element_type
 
using WppHdl = websocketpp::connection_hdl
 
using WebSocketServerP = std::shared_ptr< WebSocketServer >
 
using WebSocketConnectionP = std::shared_ptr< WebSocketConnection >
 

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 charase_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().
 
uint8zintern_decompress (unsigned int decompressed_size, const unsigned char *cdata, unsigned int cdata_size)
 
StringS list_clap_files ()
 
const charclap_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 charstring_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_tfind_shared_by_ref (const std::vector< std::shared_ptr< E > > &v, const E &e)
 
boolregister_driver_loader (const char *staticwhat, Error(*loader)())
 Register loader callbacks at static constructor time.
 
void load_registered_drivers ()
 Load all registered drivers.
 
AudioEnginemake_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)
 
CustomDataContainerjsonapi_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 &parameter_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 charase_version ()
 Provide a string containing the package version.
 
const charase_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 >
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 Stringstring_set_a2z ()
 Returns a string containing all of a-z.
 
const Stringstring_set_A2Z ()
 Returns a string containing all of A-Z.
 
const Stringstring_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 charstrrstr (const char *haystack, const char *needle)
 
const charstring_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< doublestring_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 charstrerror (int errno_num)
 Get POSIX locale strerror.
 
const charstrerror ()
 
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 charspeaker_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_tutf8decode (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 charase_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 charase_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 charfileglob
 
static bool const char const size_t maxbytes
 
constexpr const bool __DEV__
 
uint64_t columnline
 
uint64_t const charfunc
 
uint64_t const char const charformat
 
MainAppImpl main_app
 
const MainAppApp
 
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.
 
ServerImplSERVER
 
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.
 

Detailed Description

The Anklang C++ API namespace.

@TODO:


Class Documentation

◆ Ase::AlignedPOD

struct Ase::AlignedPOD
template<size_t SIZE>
struct Ase::AlignedPOD< SIZE >

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:

static AlignedPOD<sizeof (std::string)> pod_mem;
std::string *str = new (&pod_mem) std::string();

Definition at line 19 of file randomhash.hh.

Class Members
type mem

◆ Ase::AudioProcessorInfo

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.

◆ Ase::ClapEventUnion

union Ase::ClapEventUnion

Definition at line 208 of file clapplugin.cc.

Class Members
clap_event_note_expression_t expression
clap_event_param_gesture_t gesture
clap_event_header_t header
clap_event_midi_t midi1
clap_event_midi2_t midi2
clap_event_param_mod_t mod
clap_event_note_t note
clap_event_midi_sysex_t sysex
clap_event_param_value_t value

◆ Ase::ClapParamUpdate

struct Ase::ClapParamUpdate

Definition at line 30 of file clapplugin.hh.

Class Members
clap_id param_id
int64_t steady_time
double value

◆ Ase::CPUInfo

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

◆ Ase::DeviceInfo

struct Ase::DeviceInfo

Info for device types.

Definition at line 203 of file api.hh.

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.

◆ Ase::DriverEntry

struct Ase::DriverEntry

Driver information for PCM and MIDI handling.

Definition at line 16 of file driver.hh.

Class Members
String capabilities
String device_info
String device_name
String devid
String hints
String notice
int32 priority
bool readonly
bool writeonly

◆ Ase::DriverSet

struct Ase::DriverSet

Definition at line 44 of file engine.cc.

Class Members
MidiDriverS midi_drivers
StringS midi_names
PcmDriverP null_pcm_driver
PcmDriverP pcm_driver
String pcm_name

◆ Ase::ErrorReason

struct Ase::ErrorReason

Definition at line 8 of file atquit.hh.

Class Members
int error
string what

◆ Ase::FloatIEEE754.mpn

struct Ase::FloatIEEE754.mpn

Definition at line 34 of file mathutils.hh.

Class Members
uint biased_exponent: 8
uint mantissa: 23
uint sign: 1

◆ Ase::GadgetClassMemberList

struct Ase::GadgetClassMemberList

Definition at line 219 of file gadget.cc.

Class Members
const char * class_typeid_name
MemberClassT classtest
vector< MemberAccessor * > members

◆ Ase::Gtk2WindowSetup

struct Ase::Gtk2WindowSetup

Definition at line 10 of file gtk2wrap.hh.

Class Members
function< void()> deleterequest_mt
int height
string title
int width

◆ Ase::LoftConfig

struct Ase::LoftConfig

Configuration for Loft allocations.

Definition at line 44 of file loft.hh.

Class Members
Flags flags
size_t preallocate Amount of preallocated available memory.
size_t watermark Watermark to trigger async preallocation.

◆ Ase::LoftStats

struct Ase::LoftStats

Statistics for Loft allocations.

Definition at line 64 of file loft.hh.

Class Members
size_t allocated Memory still allocatable from Arenas.
size_t available Total number of arenas.
vector< pair< size_t, size_t > > buckets
size_t maxchunk Memory preallocated in Arenas.
size_t narenas

◆ Ase::MemberAccessor

struct Ase::MemberAccessor

Definition at line 210 of file gadget.cc.

Class Members
ExtraVals ev
uint64_t flags
MemberAccessF func
MemberInfosP infosp
ptrdiff_t memb_offset
const char * member_typeid_name

◆ Ase::MidiEvent.__unnamed14__

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.

◆ Ase::MidiEvent.__unnamed16__

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.

◆ Ase::MidiEvent.__unnamed18__

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.

◆ Ase::MidiEvent.__unnamed18__.__unnamed20__

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.

◆ Ase::MidiEvent.__unnamed18__.__unnamed22__

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.

◆ Ase::PcmDriverConfig

struct Ase::PcmDriverConfig

PCM device configuration.

Definition at line 91 of file driver.hh.

Class Members
uint block_length
uint latency_ms
uint mix_freq
uint n_channels

◆ Ase::PrefsValue

struct Ase::PrefsValue

Definition at line 53 of file properties.cc.

Class Members
shared_ptr< PrefsValueCallbackList > callbacks
ParameterC parameter
Value value

◆ Ase::ProbeFeatures

struct Ase::ProbeFeatures

Bits representing a selection of probe sample data features.

Definition at line 297 of file api.hh.

Class Members
bool probe_energy Provide sample energy measurement.
bool probe_fft Provide FFT analysis probe.
bool probe_range Provide sample range probes.
bool probe_samples Provide probe with bare sample values.

◆ Ase::PwdUser

struct Ase::PwdUser

Definition at line 1164 of file platform.cc.

Class Members
String real_name
int uid
String user_name

◆ Ase::RegisteredLoader

struct Ase::RegisteredLoader

Definition at line 55 of file driver.cc.

Class Members
const RegisteredLoaderFunc func
const char *const what

◆ Ase::Resource

struct Ase::Resource

Description of a resource, possibly nested.

Definition at line 359 of file api.hh.

Class Members
String label UI display name.
int64 mtime Modification time in milliseconds.
int64 size Resource size.
ResourceType type Resource classification.
String uri Unique resource identifier.

◆ Ase::TelemetryField

struct Ase::TelemetryField

Telemetry segment location.

Definition at line 113 of file api.hh.

Class Members
int32 length Length in bytes.
String name Names like "bpm", etc.
int32 offset Position in bytes.
String type Types like "i32", "f32", "f64".

◆ Ase::TelemetrySegment

struct Ase::TelemetrySegment

Telemetry segment location.

Definition at line 394 of file api.hh.

Class Members
int32 length Length in bytes.
int32 offset Position in bytes.

◆ Ase::TransportLimits

struct Ase::TransportLimits

Definition at line 9 of file transport.cc.

◆ Ase::WritConverter

struct Ase::WritConverter
template<typename T, typename = void>
struct Ase::WritConverter< T, typename >

Template to specialize string conversion for various data types.

Definition at line 124 of file serialize.hh.

Typedef Documentation

◆ Atomic

template<class T >
using Ase::Atomic = typedef boost::atomic<T>

Substitute for std::atomic<> with fixes for GCC.

Definition at line 14 of file atomics.hh.

◆ AtomicU64

using Ase::AtomicU64 = typedef std::atomic<uint64>

Definition at line 229 of file atomics.hh.

◆ CallbackS

using Ase::CallbackS = typedef std::vector<std::function<void()> >

Definition at line 76 of file defs.hh.

◆ ChoicesFunc

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.

◆ ClapEventParamS

using Ase::ClapEventParamS = typedef std::vector<clap_event_param_value>

Definition at line 28 of file clapplugin.cc.

◆ ClapEventUnionS

Definition at line 30 of file clapplugin.cc.

◆ ClapParamIdValue

using Ase::ClapParamIdValue = typedef std::tuple<clap_id,double>

Definition at line 33 of file clapplugin.cc.

◆ ClapParamIdValueS

Definition at line 34 of file clapplugin.cc.

◆ ClapParamInfoMap

Definition at line 148 of file clapplugin.cc.

◆ ClapParamInfoS

Definition at line 48 of file clapplugin.hh.

◆ ClapParamUpdateS

Definition at line 35 of file clapplugin.hh.

◆ ClapResourceHash

using Ase::ClapResourceHash = typedef std::tuple<clap_id,String>

Definition at line 31 of file clapplugin.cc.

◆ ClapResourceHashS

Definition at line 32 of file clapplugin.cc.

◆ ClipImplGeneratorS

Definition at line 101 of file clip.hh.

◆ CStringS

using Ase::CStringS = typedef std::vector<CString>

Definition at line 200 of file memory.hh.

◆ DCallbackS

using Ase::DCallbackS = typedef std::vector<std::function<void(double)> >

Definition at line 77 of file defs.hh.

◆ DispatcherSourceP

Definition at line 39 of file loop.hh.

◆ DriverP

using Ase::DriverP = typedef Driver::DriverP

Definition at line 71 of file driver.hh.

◆ EngineMidiInputP

Definition at line 29 of file engine.cc.

◆ EngineMidiInputS

Definition at line 29 of file engine.cc.

◆ EngineMidiInputW

Definition at line 29 of file engine.cc.

◆ EventConnectionP

Definition at line 82 of file defs.hh.

◆ EventConnectionW

Definition at line 81 of file defs.hh.

◆ EventHandler

using Ase::EventHandler = typedef std::function<void (const Event&)>

Definition at line 83 of file defs.hh.

◆ EventLoopP

Definition at line 45 of file loop.hh.

◆ EventSourceP

Definition at line 33 of file loop.hh.

◆ FastRng

using Ase::FastRng = typedef Mwc256

Definition at line 63 of file randomhash.hh.

◆ IDX

template<size_t I, size_t J>
using Ase::IDX = typedef typename ::std::enable_if<I == J, bool>::type

Definition at line 50 of file value.hh.

◆ InstanceP

Definition at line 86 of file defs.hh.

◆ int16

A 16-bit signed integer.

Definition at line 27 of file cxxaux.hh.

◆ int32

A 32-bit signed integer.

Definition at line 28 of file cxxaux.hh.

◆ int64

A 64-bit unsigned integer, use PRI*64 in format strings.

Definition at line 29 of file cxxaux.hh.

◆ int8

typedef int8_t Ase::int8

An 8-bit signed integer.

Definition at line 26 of file cxxaux.hh.

◆ JsonapiBinarySender

Definition at line 17 of file jsonapi.hh.

◆ JsonapiConnectionP

Definition at line 22 of file jsonapi.cc.

◆ JsonapiConnectionW

Definition at line 23 of file jsonapi.cc.

◆ LoftPtr

template<typename T >
using Ase::LoftPtr = typedef std::unique_ptr<T,LoftFree>

A std::unique_ptr<> for Loft allocations.

Definition at line 28 of file loft.hh.

◆ MainLoopP

Definition at line 47 of file loop.hh.

◆ MidiDriverP

Definition at line 88 of file driver.hh.

◆ MinMaxStep

Min, max, stepping for double ranges.

Definition at line 12 of file parameter.hh.

◆ MonitorImplP

Definition at line 20 of file monitor.hh.

◆ ObjectImplP

Definition at line 46 of file object.hh.

◆ ParameterC

using Ase::ParameterC = typedef std::shared_ptr<const Parameter>

Definition at line 90 of file parameter.hh.

◆ ParamInitialVal

Initial value for parameters.

Definition at line 18 of file parameter.hh.

◆ PcmDriverP

Definition at line 118 of file driver.hh.

◆ PollFDSourceP

Definition at line 37 of file loop.hh.

◆ PrefsMap

Definition at line 58 of file properties.cc.

◆ PrefsValueCallbackList

Definition at line 52 of file properties.cc.

◆ ProjectImplP

Definition at line 92 of file project.hh.

◆ PropertyGetter

using Ase::PropertyGetter = typedef std::function<void (Value&)>

Function type for Property value getters.

Definition at line 69 of file properties.hh.

◆ PropertyLister

using Ase::PropertyLister = typedef std::function<ChoiceS (const ParameterProperty&)>

Function type to list Choice Property values.

Definition at line 75 of file properties.hh.

◆ PropertySetter

using Ase::PropertySetter = typedef std::function<bool (const Value&)>

Function type for Property value setters.

Definition at line 72 of file properties.hh.

◆ RegisteredLoaderFunc

using Ase::RegisteredLoaderFunc = typedef Error (*) ()

Definition at line 54 of file driver.cc.

◆ RegisteredLoaderVector

Definition at line 59 of file driver.cc.

◆ REQUIRES

template<bool value>
using Ase::REQUIRES = typedef typename ::std::enable_if<value, bool>::type

REQUIRES<value> - Simplified version of std::enable_if<cond,bool>::type to use SFINAE in function templates.

Definition at line 260 of file cxxaux.hh.

◆ REQUIRESv

template<bool value>
using Ase::REQUIRESv = typedef typename ::std::enable_if<value, void>::type

REQUIRESv<value> - Simplified version of std::enable_if<cond,void>::type to use SFINAE in struct templates.

Definition at line 263 of file cxxaux.hh.

◆ SigchldSourceP

Definition at line 43 of file loop.hh.

◆ StartQueue

Definition at line 28 of file engine.cc.

◆ String

Convenience alias for std::string.

Definition at line 35 of file cxxaux.hh.

◆ String3

Definition at line 479 of file parameter.cc.

◆ StringPair

Definition at line 37 of file cxxaux.hh.

◆ StringPairS

Definition at line 44 of file project.cc.

◆ StringS

using Ase::StringS = typedef std::vector<String>

Convenience alias for a std::vector<std::string>.

Definition at line 36 of file cxxaux.hh.

◆ TelemetryPlanP

Definition at line 465 of file server.cc.

◆ TelemetryPlanS

Definition at line 465 of file server.cc.

◆ TelemetryPlanW

Definition at line 465 of file server.cc.

◆ ThreadId

using Ase::ThreadId = typedef std::thread::id

Definition at line 170 of file platform.hh.

◆ TimedSourceP

Definition at line 35 of file loop.hh.

◆ TYP

template<class T , class C >
using Ase::TYP = typedef typename ::std::enable_if<std::is_same<T, C>::value, bool>::type

Definition at line 51 of file value.hh.

◆ uint

Provide 'uint' as convenience type.

Definition at line 18 of file cxxaux.hh.

◆ uint16

A 16-bit unsigned integer.

Definition at line 23 of file cxxaux.hh.

◆ uint32

A 32-bit unsigned integer.

Definition at line 24 of file cxxaux.hh.

◆ uint64

A 64-bit unsigned integer, use PRI*64 in format strings.

Definition at line 25 of file cxxaux.hh.

◆ uint8

An 8-bit unsigned integer.

Definition at line 22 of file cxxaux.hh.

◆ unichar

A 32-bit unsigned integer used for Unicode characters.

Definition at line 30 of file cxxaux.hh.

◆ USignalSourceP

Definition at line 41 of file loop.hh.

◆ ValueP

using Ase::ValueP = typedef std::shared_ptr<Value>

Definition at line 89 of file defs.hh.

◆ ValueVariant

Variant type to hold different types of values.

Definition at line 48 of file value.hh.

◆ VirtualBaseP

Definition at line 218 of file cxxaux.hh.

◆ VoidF

using Ase::VoidF = typedef std::function<void()>

Definition at line 38 of file cxxaux.hh.

◆ VoidFunc

using Ase::VoidFunc = typedef std::function<void()>

Definition at line 27 of file engine.cc.

◆ WaveWriterP

Definition at line 16 of file wave.hh.

◆ WebSocketConnectionP

Definition at line 40 of file websocket.hh.

◆ WebSocketServerImplP

Definition at line 21 of file websocket.cc.

◆ WebSocketServerP

Definition at line 10 of file websocket.hh.

◆ WppConnection

using Ase::WppConnection = typedef WppConnectionP::element_type

Definition at line 28 of file websocket.cc.

◆ WppConnectionP

using Ase::WppConnectionP = typedef WppServer::connection_ptr

Definition at line 27 of file websocket.cc.

◆ WppHdl

using Ase::WppHdl = typedef websocketpp::connection_hdl

Definition at line 29 of file websocket.cc.

◆ WppServer

using Ase::WppServer = typedef websocketpp::server<CustomServerConfig>

Definition at line 26 of file websocket.cc.

◆ WritNodeS

Definition at line 93 of file defs.hh.

◆ WritP

using Ase::WritP = typedef std::shared_ptr<Writ>

Definition at line 12 of file serialize.hh.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 21 of file loop.cc.

◆ CacheType

enum Ase::CacheType

Definition at line 403 of file websocket.cc.

◆ Error

enum class Ase::Error : int32_t
strong

Enum representing Error states.

Definition at line 22 of file api.hh.

◆ IBusId

enum class Ase::IBusId : uint16
strong

ID type for AudioProcessor input buses, buses are numbered with increasing index.

Definition at line 21 of file processor.hh.

◆ LogFlags

Flags to configure logging behaviour.

Definition at line 26 of file logging.hh.

◆ MidiEventType

enum class Ase::MidiEventType : uint8_t
strong

Type of MIDI Events.

Enumerator
NOTE_OFF 

Ase internal Parameter update.

AFTERTOUCH 

Key Pressure, polyphonic aftertouch.

CONTROL_CHANGE 

Control Change.

CHANNEL_PRESSURE 

Channel Aftertouch.

Definition at line 15 of file midievent.hh.

◆ MidiMessage

enum class Ase::MidiMessage : int32_t
strong

Extended type information for MidiEvent.

Definition at line 28 of file midievent.hh.

◆ MusicalTuning

enum class Ase::MusicalTuning : uint8
strong

Musical tunings, see: http://en.wikipedia.org/wiki/Musical_tuning.

Definition at line 83 of file api.hh.

◆ OBusId

enum class Ase::OBusId : uint16
strong

ID type for AudioProcessor output buses, buses are numbered with increasing index.

Definition at line 25 of file processor.hh.

◆ ParamId

enum class Ase::ParamId : uint32
strong

ID type for AudioProcessor parameters, the ID numbers are user assignable.

Definition at line 17 of file processor.hh.

◆ ResourceType

enum class Ase::ResourceType
strong

Definition at line 353 of file api.hh.

◆ RPath

enum class Ase::RPath
strong

Definition at line 28 of file platform.hh.

◆ SpeakerArrangement

enum class Ase::SpeakerArrangement : uint64_t
strong

Flags to indicate channel arrangements of a bus. See also: https://en.wikipedia.org/wiki/Surround_sound

Enumerator
FRONT_LEFT 

Stereo Left (FL)

FRONT_RIGHT 

Stereo Right (FR)

FRONT_CENTER 

(FC)

LOW_FREQUENCY 

Low Frequency Effects (LFE)

BACK_LEFT 

(BL)

BACK_RIGHT 

(BR)

AUX 

Flag for side chain uses.

MONO 

Single Channel (M)

Definition at line 11 of file transport.hh.

Function Documentation

◆ _() [1/4]

const char *() Ase::_ ( const char string)

Translate message strings in the Anklang/ASE text domain.

Definition at line 118 of file platform.cc.

◆ _() [2/4]

const char *() Ase::_ ( const char string,
const char plural,
int64_t  n 
)

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.

◆ _() [3/4]

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 _.

◆ _() [4/4]

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.

References _, and int64_t.

◆ anklang_cachedir_clean_stale()

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().

◆ anklang_cachedir_cleanup()

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().

◆ anklang_cachedir_create()

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().

◆ anklang_home_dir()

String Ase::anklang_home_dir ( const String subdir)

Get Anklang home dir, possibly adding subdir.

Definition at line 46 of file platform.cc.

References std::string::empty(), and getenv().

◆ anklang_runpath()

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().

◆ application_name()

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().

◆ application_name_init()

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().

◆ ase_build_id()

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().

◆ ase_error_blurb()

const char * Ase::ase_error_blurb ( Error  error)

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().

◆ ase_error_from_errno()

Error Ase::ase_error_from_errno ( int  sys_errno,
Error  fallback = Error::IO 
)

Definition at line 278 of file server.cc.

◆ ase_gettext() [1/2]

template<class A0 , class... Ar>
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().

◆ ase_gettext() [2/2]

void void const char * Ase::ase_gettext ( const String untranslated)

Definition at line 113 of file utils.cc.

◆ ase_version()

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().

◆ assertion_failed()

void Ase::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.

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().

◆ assertion_fatal()

void Ase::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.

Definition at line 110 of file cxxaux.cc.

References abort(), assertion_failed(), and assertion_failed_fatal.

Referenced by fatal_error().

◆ atquit_add()

void Ase::atquit_add ( std::function< void()> *  func)

Definition at line 258 of file atquit.cc.

◆ atquit_add_killl_pid()

void Ase::atquit_add_killl_pid ( int  pid)

Kill pid when the program terminates.

Definition at line 165 of file atquit.cc.

◆ atquit_add_removal()

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().

◆ atquit_del()

void Ase::atquit_del ( std::function< void()> *  func)

Definition at line 266 of file atquit.cc.

◆ atquit_del_killl_pid()

void Ase::atquit_del_killl_pid ( int  pid)

Undo a previous atquit_add_killl_pid() call.

Definition at line 172 of file atquit.cc.

◆ atquit_del_removal()

void Ase::atquit_del_removal ( const std::string filename)

Undo a previous atquit_add_removal() call.

Definition at line 113 of file atquit.cc.

◆ atquit_terminate()

void Ase::atquit_terminate ( int  exitcode,
int  pgroup 
)

Definition at line 292 of file atquit.cc.

◆ atquit_triggered()

bool Ase::atquit_triggered ( )

Definition at line 309 of file atquit.cc.

◆ backtrace_command()

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().

◆ blake3_hash_file()

String Ase::blake3_hash_file ( const String filename)

Definition at line 452 of file compress.cc.

◆ blake3_hash_string()

String Ase::blake3_hash_string ( const String input)

Definition at line 440 of file compress.cc.

◆ breakpoint()

void Ase::breakpoint ( )
extern

Cause a debugging breakpoint, for development only.

Definition at line 202 of file platform.hh.

◆ call_delete()

template<class T >
void Ase::call_delete ( T *  o)

Simple way to create a standalone callback to delete an object of type T.

Definition at line 254 of file cxxaux.hh.

◆ clap_device_info()

DeviceInfo Ase::clap_device_info ( const ClapPluginDescriptor descriptor)

Definition at line 1943 of file clapplugin.cc.

◆ clap_event_to_string()

String Ase::clap_event_to_string ( const clap_event_note_t *  enote)

Definition at line 1924 of file clapplugin.cc.

◆ clap_event_type_string()

const char * Ase::clap_event_type_string ( int  etype)

Definition at line 1902 of file clapplugin.cc.

◆ cleanup_orphaned_tempfiles()

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_runtime_entropy()

void Ase::collect_runtime_entropy ( uint64 data,
size_t  n 
)

Collect entropy from the current process, usually quicker than collect_system_entropy().

To provide good quality random number seeds, this function gathers entropy from a variety of process specific sources. Under Linux, this includes the CPU counters, clocks and random devices. In combination with well established techniques like syscall timings (see Entropics13 [Entropics13]) and a SHA3 algorithm derived random number generator for the mixing, the entropy collection is designed to be fast and good enough for all non-cryptographic uses. On an Intel Core i7, this function takes around 25µs.

Definition at line 408 of file entropy.cc.

◆ collect_system_entropy()

void Ase::collect_system_entropy ( uint64 data,
size_t  n 
)

Collect entropy from system devices, like interrupt counters, clocks and random devices.

This function adds to collect_runtime_entropy() by collecting entropy from aditional but potentially slower system sources, such as interrupt counters, disk + network statistics, system load, execution + pipelining + scheduling latencies and device MACs. The function is designed to yield random number seeds good enough to generate cryptographic tokens like session keys. On an Intel Core i7, this function takes around 2ms, so it's roughly 80 times slower than collect_runtime_entropy().

Definition at line 426 of file entropy.cc.

◆ constexpr_equals()

constexpr bool Ase::constexpr_equals ( const char a,
const char b,
size_t  n 
)
externconstexpr

Test string equality at compile time.

Definition at line 233 of file cxxaux.hh.

References constexpr_equals().

Referenced by constexpr_equals().

◆ convert_clip_samples()

template<>
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.

◆ convert_samples()

template<>
void Ase::convert_samples ( size_t  n,
const int16_t src,
float dst,
uint16  byte_order 
)

Definition at line 55 of file datautils.hh.

◆ cpu_arch()

std::string Ase::cpu_arch ( )

Retrieve string identifying the CPU architecture.

Definition at line 467 of file platform.cc.

◆ cpu_info()

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 ".

Returns
Example: "4 AMD64 GenuineIntel FPU TSC HTT CMPXCHG16B MMX MMXEXT SSESYS SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 "

Definition at line 480 of file platform.cc.

References std::string::c_str(), cpu_info(), strcat(), string_format(), and sysconf().

Referenced by cpu_info().

◆ create_processor_device()

DeviceP Ase::create_processor_device ( AudioEngine engine,
const String uri,
bool  engineproducer 
)

Definition at line 227 of file nativedevice.cc.

◆ create_tempfile_dir()

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().

◆ cstring_to_bool()

bool Ase::cstring_to_bool ( const char string,
bool  fallback 
)

Definition at line 473 of file strings.cc.

◆ cstrings_to_vector()

StringS Ase::cstrings_to_vector ( const char s,
  ... 
)

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().

◆ current_locale_strtold()

long double Ase::current_locale_strtold ( const char nptr,
char **  endptr 
)

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().

◆ damerau_levenshtein_distance()

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().

◆ damerau_levenshtein_restricted()

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().

◆ db2voltage()

template<typename Float >
Float Ase::db2voltage ( Float  x)

Convert Decibel to synthesizer value (Voltage).

Definition at line 110 of file signalmath.hh.

References std::pow().

◆ db_changed()

template<typename Float >
Float Ase::db_changed ( Float  a,
Float  b 
)

Determine a significant Decibel change.

Definition at line 128 of file signalmath.hh.

◆ debug()

template<class ... Args>
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().

◆ debug_enabled()

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().

◆ debug_key_enabled() [1/2]

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().

◆ debug_key_enabled() [2/2]

bool Ase::debug_key_enabled ( const char conditional)

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().

◆ debug_key_value()

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().

◆ debug_message()

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().

◆ decodefs()

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().

◆ diag_flush()

void Ase::diag_flush ( uint8  code,
const String txt 
)

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().

◆ diag_prefix()

String Ase::diag_prefix ( uint8  code)

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().

◆ displayfs()

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().

◆ encodefs()

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().

◆ enum_lister()

template<typename Enum >
requires IsEnum<Enum>
ChoiceS Ase::enum_lister ( const ParameterProperty )

Helper to list Jsonipc::Enum<> type values as Choice.

Definition at line 129 of file properties.hh.

◆ executable_name()

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().

◆ executable_path()

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().

◆ fast_copy() [1/2]

void Ase::fast_copy ( size_t  n,
float d,
const float s 
)
extern

Copy a block of floats.

Definition at line 37 of file datautils.hh.

References float, and wmemcpy().

◆ fast_copy() [2/2]

void Ase::fast_copy ( size_t  n,
uint32_t d,
const uint32_t s 
)
extern

Copy a block of integers.

Definition at line 46 of file datautils.hh.

References uint32_t, and wmemcpy().

◆ fast_db2voltage()

float Ase::fast_db2voltage ( float  x)

Float precision variant of db2voltage using fast_exp2().

Definition at line 116 of file signalmath.hh.

References fast_exp2().

◆ fast_exp2()

float Ase::fast_exp2 ( float  x)
extern

Fast approximation of 2 raised to the power of x. The parameter x is the exponent within [-127.0…+127.0]. Within -1…+1, the error stays below 4e-7 which corresponds to a sample precision of 21 bit. For integer values of x (i.e. x - floor (x) -> 0), the error approaches zero. With FMA instructions and -ffast-math enabled, execution times should be below 10ns on 3GHz machines.

Definition at line 82 of file mathutils.hh.

References Ase::FloatIEEE754::BIAS, and irintf().

Referenced by fast_db2voltage(), and fast_voltage2hz().

◆ fast_hz2voltage()

float Ase::fast_hz2voltage ( float  x)

Float precision variant of hz2voltage using fast_log2().

Definition at line 92 of file signalmath.hh.

References fast_log2().

◆ fast_log2()

float Ase::fast_log2 ( float  x)
extern

Fast approximation of logarithm to base 2. The parameter x is the exponent within [1.1e-38…2^127]. Within 1e-7…+1, the error stays below 3.8e-6 which corresponds to a sample precision of 18 bit. When x is an exact power of 2, the error approaches zero. With FMA instructions and -ffast-math enabled, execution times should be below 10ns on 3GHz machines.

Definition at line 101 of file mathutils.hh.

References Ase::FloatIEEE754::BIAS.

Referenced by fast_hz2voltage(), fast_voltage2db(), and Ase::AudioChain::render().

◆ fast_mem_alloc()

void * Ase::fast_mem_alloc ( size_t  size)

Definition at line 531 of file memory.cc.

◆ fast_mem_free()

void Ase::fast_mem_free ( void *  mem)

Definition at line 545 of file memory.cc.

◆ fast_voltage2db()

float Ase::fast_voltage2db ( float  x)

Float precision variant of voltage2db using fast_log2().

Definition at line 104 of file signalmath.hh.

References fast_log2().

◆ fast_voltage2hz()

float Ase::fast_voltage2hz ( float  x)

Float precision variant of voltage2hz using fast_exp2().

Definition at line 80 of file signalmath.hh.

References fast_exp2(), and float.

◆ fatal_error()

template<class ... Args>
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().

◆ fatal_system_error()

void Ase::fatal_system_error ( const char file,
uint  line,
const char format,
  ... 
)

Definition at line 755 of file platform.cc.

◆ find_shared_by_ref()

template<typename E >
std::pair< std::shared_ptr< E >, ssize_t > Ase::find_shared_by_ref ( const std::vector< std::shared_ptr< E > > &  v,
const E &  e 
)

Definition at line 35 of file device.cc.

◆ fixed_sort()

template<class RandomIt , class Compare >
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().

◆ floatfill()

void Ase::floatfill ( float dst,
float  f,
size_t  n 
)
extern

Fill n values of dst with f.

Definition at line 29 of file datautils.hh.

Referenced by Ase::AudioProcessor::assign_oblock().

◆ force_double()

double Ase::force_double ( double  d)
extern

Force number into double precision floating point format, even with -ffast-math.

Definition at line 17 of file mathutils.hh.

◆ force_float()

float Ase::force_float ( float  f)
extern

Force number into single precision floating point format, even with -ffast-math.

Definition at line 20 of file mathutils.hh.

◆ hz2voltage()

template<typename Float >
Float Ase::hz2voltage ( Float  x)

Convert Hertz to synthesizer value (Voltage).

Definition at line 86 of file signalmath.hh.

References std::log2().

◆ hz_changed()

template<typename Float >
Float Ase::hz_changed ( Float  a,
Float  b 
)

Determine a significant frequency change (audible Hertz).

Definition at line 122 of file signalmath.hh.

◆ irintf()

int Ase::irintf ( float  f)
extern

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().

◆ is_aiff()

bool Ase::is_aiff ( const String input)

Definition at line 18 of file compress.cc.

◆ is_arj()

bool Ase::is_arj ( const String input)

Definition at line 157 of file compress.cc.

◆ is_avi()

bool Ase::is_avi ( const String input)

Definition at line 175 of file compress.cc.

◆ is_compressed()

bool Ase::is_compressed ( const String input)

Definition at line 222 of file compress.cc.

◆ is_gz()

bool Ase::is_gz ( const String input)

Definition at line 181 of file compress.cc.

◆ is_isz()

bool Ase::is_isz ( const String input)

Definition at line 163 of file compress.cc.

◆ is_jpg()

bool Ase::is_jpg ( const String input)

Definition at line 211 of file compress.cc.

◆ is_lz4()

bool Ase::is_lz4 ( const String input)

Definition at line 137 of file compress.cc.

◆ is_midi()

bool Ase::is_midi ( const String input)

Definition at line 30 of file compress.cc.

◆ is_ogg()

bool Ase::is_ogg ( const String input)

Definition at line 169 of file compress.cc.

◆ is_pdf()

bool Ase::is_pdf ( const String input)

Definition at line 36 of file compress.cc.

◆ is_png()

bool Ase::is_png ( const String input)

Definition at line 199 of file compress.cc.

◆ is_wav()

bool Ase::is_wav ( const String input)

Definition at line 24 of file compress.cc.

◆ is_xz()

bool Ase::is_xz ( const String input)

Definition at line 187 of file compress.cc.

◆ is_zip()

bool Ase::is_zip ( const String input)

Definition at line 147 of file compress.cc.

◆ is_zstd()

bool Ase::is_zstd ( const String input)

Definition at line 127 of file compress.cc.

◆ json_parse() [1/2]

template<class T >
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.

◆ json_parse() [2/2]

template<class T >
bool Ase::json_parse ( const String jsonstring,
T &  target 
)

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().

◆ json_stringify()

template<class T >
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().

◆ jsonapi_connection_data()

CustomDataContainer * Ase::jsonapi_connection_data ( )

Definition at line 366 of file jsonapi.cc.

◆ jsonapi_connection_sender()

JsonapiBinarySender Ase::jsonapi_connection_sender ( )

Definition at line 374 of file jsonapi.cc.

◆ jsonapi_make_connection()

WebSocketConnectionP Ase::jsonapi_make_connection ( WebSocketConnection::Internals internals,
int  logflags 
)

Definition at line 186 of file jsonapi.cc.

◆ jsonapi_set_subprotocol()

void Ase::jsonapi_set_subprotocol ( const String subprotocol)

Definition at line 15 of file jsonapi.cc.

◆ kvpair_key()

String Ase::kvpair_key ( const String key_value_pair)

Definition at line 1286 of file strings.cc.

◆ kvpair_value()

String Ase::kvpair_value ( const String key_value_pair)

Definition at line 1293 of file strings.cc.

◆ kvpairs_assign()

bool Ase::kvpairs_assign ( StringS kvs,
const String key_value_pair,
bool  casesensitive 
)

Definition at line 1324 of file strings.cc.

◆ kvpairs_fetch()

String Ase::kvpairs_fetch ( const StringS kvs,
const String key,
bool  casesensitive 
)

Definition at line 1300 of file strings.cc.

◆ kvpairs_search()

ssize_t Ase::kvpairs_search ( const StringS kvs,
const String k,
const bool  casesensitive 
)

Definition at line 1307 of file strings.cc.

◆ libsndfile_version()

String Ase::libsndfile_version ( )

Definition at line 25 of file sndfile.cc.

◆ list_clap_files()

StringS Ase::list_clap_files ( )

Definition at line 1888 of file clapplugin.cc.

◆ load_registered_drivers()

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().

◆ loft_make_unique()

template<class T , class ... Args>
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().

◆ log_setup()

LogFlags Ase::log_setup ( int logfd)

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().

◆ logmsg()

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.

◆ main_loop_autostop_mt()

void Ase::main_loop_autostop_mt ( )

Definition at line 374 of file main.cc.

◆ main_loop_wakeup()

void Ase::main_loop_wakeup ( )

Definition at line 363 of file main.cc.

◆ make_aftertouch()

MidiEvent Ase::make_aftertouch ( uint16  chnl,
uint8  mkey,
float  velo,
float  tune,
uint  nid 
)

Definition at line 107 of file midievent.cc.

◆ make_audio_engine()

AudioEngine & Ase::make_audio_engine ( const VoidF owner_wakeup,
uint  sample_rate,
SpeakerArrangement  speakerarrangement 
)

Definition at line 559 of file engine.cc.

◆ make_control()

MidiEvent Ase::make_control ( uint16  chnl,
uint  prm,
float  val 
)

Definition at line 128 of file midievent.cc.

◆ make_control8()

MidiEvent Ase::make_control8 ( uint16  chnl,
uint  prm,
uint8  cval 
)

Definition at line 139 of file midievent.cc.

◆ make_enum_getter()

template<typename Enum >
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.

◆ make_enum_setter()

template<typename Enum >
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.

◆ make_note_off()

MidiEvent Ase::make_note_off ( uint16  chnl,
uint8  mkey,
float  velo,
float  tune,
uint  nid 
)

Definition at line 95 of file midievent.cc.

◆ make_note_on()

MidiEvent Ase::make_note_on ( uint16  chnl,
uint8  mkey,
float  velo,
float  tune,
uint  nid 
)

Definition at line 83 of file midievent.cc.

◆ make_param_value()

MidiEvent Ase::make_param_value ( uint  param,
double  pvalue 
)

Definition at line 168 of file midievent.cc.

◆ make_pitch_bend()

MidiEvent Ase::make_pitch_bend ( uint16  chnl,
float  val 
)

Definition at line 159 of file midievent.cc.

◆ make_pressure()

MidiEvent Ase::make_pressure ( uint16  chnl,
float  velo 
)

Definition at line 119 of file midievent.cc.

◆ make_program()

MidiEvent Ase::make_program ( uint16  chnl,
uint  prgrm 
)

Definition at line 150 of file midievent.cc.

◆ memset4()

void Ase::memset4 ( uint32 mem,
uint32  filler,
uint  length 
)

Fill a memory area with a 32-bit quantitiy.

Definition at line 1221 of file strings.cc.

References wmemset().

◆ monotonic_counter()

uint64 Ase::monotonic_counter ( )

A monotonically increasing counter, increments are atomic and visible in all threads.

Definition at line 635 of file platform.cc.

◆ now_strftime()

const char String Ase::now_strftime ( const String format)

Definition at line 121 of file utils.cc.

◆ operator!()

constexpr bool Ase::operator! ( Error  error)
constexpr

Definition at line 78 of file api.hh.

◆ operator!=() [1/4]

constexpr bool Ase::operator!= ( Error  v,
int64_t  n 
)
constexpr

Definition at line 77 of file api.hh.

◆ operator!=() [2/4]

constexpr bool Ase::operator!= ( int64_t  n,
Error  v 
)
constexpr

Definition at line 77 of file api.hh.

◆ operator!=() [3/4]

constexpr bool Ase::operator!= ( int64_t  n,
MusicalTuning  v 
)
constexpr

Definition at line 93 of file api.hh.

◆ operator!=() [4/4]

constexpr bool Ase::operator!= ( MusicalTuning  v,
int64_t  n 
)
constexpr

Definition at line 93 of file api.hh.

◆ operator+=()

ChoiceS & Ase::operator+= ( ChoiceS &  choices,
Choice &&  newchoice 
)

Convenience ChoiceS construction helper.

Definition at line 218 of file server.cc.

◆ operator==() [1/5]

bool Ase::operator== ( const std::vector< ValueP > &  v1,
const std::vector< ValueP > &  v2 
)

Definition at line 153 of file value.hh.

◆ operator==() [2/5]

constexpr bool Ase::operator== ( Error  v,
int64_t  n 
)
constexpr

Definition at line 77 of file api.hh.

◆ operator==() [3/5]

constexpr bool Ase::operator== ( int64_t  n,
Error  v 
)
constexpr

Definition at line 77 of file api.hh.

◆ operator==() [4/5]

constexpr bool Ase::operator== ( int64_t  n,
MusicalTuning  v 
)
constexpr

Definition at line 93 of file api.hh.

◆ operator==() [5/5]

constexpr bool Ase::operator== ( MusicalTuning  v,
int64_t  n 
)
constexpr

Definition at line 93 of file api.hh.

◆ operator|()

constexpr Re::Flags Ase::operator| ( Re::Flags  a,
Re::Flags  b 
)
externconstexpr

Definition at line 30 of file regex.hh.

◆ parameter_guess_nick()

String Ase::parameter_guess_nick ( const String parameter_label)

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().

◆ perror_die()

void Ase::perror_die ( const std::string msg)
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().

◆ posix_locale_strtold()

long double Ase::posix_locale_strtold ( const char nptr,
char **  endptr 
)

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().

◆ printerr()

template<class... Args>
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().

◆ printout()

template<class... Args>
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().

◆ program_alias()

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().

◆ program_alias_init()

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().

◆ program_cwd()

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().

◆ QueueMultiplexer_priority()

int Ase::QueueMultiplexer_priority ( const MidiEvent e)

Definition at line 138 of file midievent.hh.

◆ random_float()

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().

◆ random_frange()

double Ase::random_frange ( double  begin,
double  end 
)

Generate uniformly distributed pseudo-random floating point number within a range. This function generates a pseudo-random number like random_float(), constrained to the range: begin <= number < end.

Definition at line 663 of file randomhash.cc.

References return_unless.

Referenced by Ase::Test::random_frange().

◆ random_int64()

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().

◆ random_irange()

int64_t Ase::random_irange ( int64_t  begin,
int64_t  end 
)

Generate uniformly distributed pseudo-random integer within range. This function generates a pseudo-random number like random_int64(), constrained to the range: begin <= number < end.

Definition at line 632 of file randomhash.cc.

References ASE_UNLIKELY, return_unless, and uint64_t.

Referenced by Ase::Test::random_irange().

◆ random_nonce()

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.

◆ random_secret()

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().

◆ register_audio_processor()

template<typename T >
CString Ase::register_audio_processor ( const char aseid = nullptr)

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_driver_loader()

bool * Ase::register_driver_loader ( const char staticwhat,
Error(*)()  loader 
)

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().

◆ sched_fast_priority()

bool Ase::sched_fast_priority ( int  tid)

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().

◆ sched_get_priority()

int Ase::sched_get_priority ( int  tid)

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().

◆ sched_set_priority()

bool Ase::sched_set_priority ( int  tid,
int  nicelevel 
)

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().

◆ sha3_224_hash()

void Ase::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.

Definition at line 351 of file randomhash.cc.

References Ase::SHA3_224::digest(), uint8_t, and Ase::SHA3_224::update().

◆ sha3_256_hash()

void Ase::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.

Definition at line 393 of file randomhash.cc.

References Ase::SHA3_256::digest(), uint8_t, and Ase::SHA3_256::update().

◆ sha3_384_hash()

void Ase::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.

Definition at line 435 of file randomhash.cc.

References Ase::SHA3_384::digest(), uint8_t, and Ase::SHA3_384::update().

◆ sha3_512_hash()

void Ase::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.

Definition at line 477 of file randomhash.cc.

References Ase::SHA3_512::digest(), uint8_t, and Ase::SHA3_512::update().

◆ shake128_hash()

void Ase::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.

Definition at line 519 of file randomhash.cc.

References Ase::SHAKE128::squeeze_digest(), uint8_t, and Ase::SHAKE128::update().

◆ shake256_hash()

void Ase::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.

Definition at line 561 of file randomhash.cc.

References Ase::SHAKE256::squeeze_digest(), uint8_t, and Ase::SHAKE256::update().

◆ shared_ptr_cast() [1/4]

template<class Target , class Source >
const std::shared_ptr< typename std::remove_pointer< Target >::type > Ase::shared_ptr_cast ( const Source *  object)

See shared_ptr_cast(Source*).

Definition at line 326 of file cxxaux.hh.

◆ shared_ptr_cast() [2/4]

template<class Target , class Source >
const std::shared_ptr< typename std::remove_pointer< Target >::type > Ase::shared_ptr_cast ( const std::shared_ptr< Source > &  sptr)

See shared_ptr_cast(Source*).

Definition at line 338 of file cxxaux.hh.

◆ shared_ptr_cast() [3/4]

template<class Target , class Source >
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.

Returns
A std::shared_ptr<Target> storing a pointer to object or NULL.
Exceptions
std::bad_weak_ptrif shared_from_this() throws, unless the Target* form is used.

Definition at line 306 of file cxxaux.hh.

◆ shared_ptr_cast() [4/4]

template<class Target , class Source >
std::shared_ptr< typename std::remove_pointer< Target >::type > Ase::shared_ptr_cast ( std::shared_ptr< Source > &  sptr)

See shared_ptr_cast(Source*).

Definition at line 332 of file cxxaux.hh.

◆ shared_ptr_from()

template<class Source >
std::shared_ptr< typename std::remove_pointer< Source >::type > Ase::shared_ptr_from ( Source *  object)

Use shared_ptr_cast<>() to convert an object pointer into a shared_ptr<>.

Definition at line 345 of file cxxaux.hh.

◆ spawn_process()

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().

◆ speaker_arrangement_bit_name()

const char * Ase::speaker_arrangement_bit_name ( SpeakerArrangement  spa)

Definition at line 177 of file transport.cc.

◆ speaker_arrangement_channels()

SpeakerArrangement Ase::speaker_arrangement_channels ( SpeakerArrangement  spa)

Definition at line 170 of file transport.cc.

◆ speaker_arrangement_count_channels()

uint8 Ase::speaker_arrangement_count_channels ( SpeakerArrangement  spa)

Definition at line 153 of file transport.cc.

◆ speaker_arrangement_desc()

std::string Ase::speaker_arrangement_desc ( SpeakerArrangement  spa)

Definition at line 217 of file transport.cc.

◆ speaker_arrangement_is_aux()

bool Ase::speaker_arrangement_is_aux ( SpeakerArrangement  spa)

Definition at line 163 of file transport.cc.

◆ square_max()

float Ase::square_max ( uint  n_values,
const float ivalues 
)

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().

◆ square_sum()

float Ase::square_sum ( uint  n_values,
const float ivalues 
)

Calculate suqare sum of a block of floats.

Definition at line 10 of file datautils.cc.

◆ stream_reader_from_file()

StreamReaderP Ase::stream_reader_from_file ( const String file)

Definition at line 581 of file storage.cc.

◆ stream_reader_zip_member()

StreamReaderP Ase::stream_reader_zip_member ( const String archive,
const String member,
Storage::StorageFlags  f 
)

Definition at line 665 of file storage.cc.

◆ stream_reader_zstd()

StreamReaderP Ase::stream_reader_zstd ( StreamReaderP &  istream)

Definition at line 312 of file compress.cc.

◆ stream_writer_create_file()

StreamWriterP Ase::stream_writer_create_file ( const String filename,
int  mode 
)

Definition at line 751 of file storage.cc.

◆ stream_writer_zstd()

StreamWriterP Ase::stream_writer_zstd ( const StreamWriterP &  ostream,
int  level 
)

Definition at line 433 of file compress.cc.

◆ strerror() [1/2]

const char * Ase::strerror ( )

Definition at line 1655 of file strings.cc.

◆ strerror() [2/2]

const char * Ase::strerror ( int  errno_num)

Get POSIX locale strerror.

Definition at line 1642 of file strings.cc.

References errno(), and strerror().

◆ string_canonify()

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().

◆ string_capitalize()

String Ase::string_capitalize ( const String str,
size_t  maxn,
bool  rest_tolower 
)

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().

◆ string_casecmp()

int Ase::string_casecmp ( const String s1,
const String s2 
)

Like strcasecmp(3) for UTF-8 strings.

Definition at line 266 of file strings.cc.

References string_casefold(), and string_cmp().

◆ string_casefold()

String Ase::string_casefold ( const String src)

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().

◆ string_cmp()

int Ase::string_cmp ( const String s1,
const String s2 
)

Like strcmp(3) for UTF-8 strings.

Definition at line 259 of file strings.cc.

References std::string::c_str().

Referenced by string_casecmp().

◆ string_cmp_uuid()

int Ase::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.

Definition at line 839 of file strings.cc.

References std::string::c_str(), and strcasecmp().

◆ string_demangle_cxx()

const char * Ase::string_demangle_cxx ( const char mangled_identifier)
noexcept

Demangle identifier via libcc.

Demangle a std::typeinfo.name() string into a proper C++ type name. This function uses abi::__cxa_demangle() from <cxxabi.h> to demangle C++ type names, which works for g++, libstdc++, clang++, libc++.

Definition at line 18 of file cxxaux.cc.

References free().

◆ string_endswith() [1/2]

bool Ase::string_endswith ( const String string,
const String fragment 
)

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().

◆ string_endswith() [2/2]

bool Ase::string_endswith ( const String string,
const StringS fragments 
)

Returns whether string ends with any element of fragments.

Definition at line 870 of file strings.cc.

References string_endswith().

◆ string_find_word()

const char * Ase::string_find_word ( const char haystack,
const char word 
)

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().

◆ string_from_bool()

String Ase::string_from_bool ( bool  value)

Convert a boolean value into a string.

Definition at line 533 of file strings.cc.

◆ string_from_cquote()

String Ase::string_from_cquote ( const String input)

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().

◆ string_from_double()

String Ase::string_from_double ( double  value)

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_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().

◆ string_from_errno()

String Ase::string_from_errno ( int  errno_val)

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().

◆ string_from_float() [1/2]

String Ase::string_from_float ( double  value)

Definition at line 56 of file strings.hh.

◆ string_from_float() [2/2]

String Ase::string_from_float ( float  value)

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().

◆ string_from_int()

String Ase::string_from_int ( int64  value)

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().

◆ string_from_long_double()

String Ase::string_from_long_double ( long double  value)

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().

◆ string_from_pretty_function_name()

String Ase::string_from_pretty_function_name ( const char cxx_pretty_function)

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_from_type()

template<typename Type >
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_from_type< bool >()

template<>
String Ase::string_from_type< bool > ( bool  value)

Definition at line 126 of file strings.hh.

◆ string_from_type< double >()

template<>
String Ase::string_from_type< double > ( double  value)

Definition at line 122 of file strings.hh.

◆ string_from_type< float >()

template<>
String Ase::string_from_type< float > ( float  value)

Definition at line 124 of file strings.hh.

◆ string_from_type< int >()

template<>
String Ase::string_from_type< int > ( int  value)

Definition at line 132 of file strings.hh.

◆ string_from_type< int16 >()

template<>
String Ase::string_from_type< int16 > ( int16  value)

Definition at line 128 of file strings.hh.

◆ string_from_type< int64 >()

template<>
String Ase::string_from_type< int64 > ( int64  value)

Definition at line 136 of file strings.hh.

◆ string_from_type< long double >()

template<>
String Ase::string_from_type< long double > ( long double  value)

Definition at line 120 of file strings.hh.

◆ string_from_type< String >()

template<>
String Ase::string_from_type< String > ( String  value)

Definition at line 140 of file strings.hh.

◆ string_from_type< uint >()

template<>
String Ase::string_from_type< uint > ( uint  value)

Definition at line 134 of file strings.hh.

◆ string_from_type< uint16 >()

template<>
String Ase::string_from_type< uint16 > ( uint16  value)

Definition at line 130 of file strings.hh.

◆ string_from_type< uint64 >()

template<>
String Ase::string_from_type< uint64 > ( uint64  value)

Definition at line 138 of file strings.hh.

◆ string_from_uint()

String Ase::string_from_uint ( uint64  value)

Convert a 64bit unsigned integer into a string.

Definition at line 561 of file strings.cc.

References string_format().

◆ string_has_int()

bool Ase::string_has_int ( const String string)

Checks if a string contains a digit, optionally preceeded by whitespaces.

Definition at line 568 of file strings.cc.

◆ string_hexdump()

String Ase::string_hexdump ( const void *  addr,
size_t  length,
size_t  initial_offset 
)

Produce hexdump of a memory region. Each output line consists of its hexadecimal offset, 16 hexadecimal bytes and the ASCII representation of the same 16 bytes.

Definition at line 1184 of file strings.cc.

References std::string::c_str(), and string_format().

◆ string_is_ascii_alnum()

bool Ase::string_is_ascii_alnum ( const String str)

Definition at line 125 of file strings.cc.

◆ string_is_canonified()

bool Ase::string_is_canonified ( const String string,
const String valid_chars 
)

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().

◆ string_is_ncname()

bool Ase::string_is_ncname ( const String input)

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().

◆ string_is_uuid()

bool Ase::string_is_uuid ( const String uuid_string)

Returns whether uuid_string contains a properly formatted UUID string.

Definition at line 815 of file strings.cc.

References std::string::size().

◆ string_islower()

bool Ase::string_islower ( const String str)

Check if all string characters are Unicode lower case characters.

Definition at line 146 of file strings.cc.

References std::string::size().

◆ string_isupper()

bool Ase::string_isupper ( const String str)

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_().

◆ string_join()

String Ase::string_join ( const String junctor,
const StringS strvec 
)

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().

◆ string_locale_vprintf()

String Ase::string_locale_vprintf ( const char format,
va_list  vargs 
)

Formatted printing like string_vprintf using the current locale.

Definition at line 316 of file strings.cc.

◆ string_lstrip()

String Ase::string_lstrip ( const String input)

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().

◆ string_match_identifier()

bool Ase::string_match_identifier ( const String ident1,
const String ident2 
)

Check equality of strings canonicalized to "[0-9a-z_]+".

Definition at line 926 of file strings.cc.

References std::string::size().

◆ string_match_identifier_tail()

bool Ase::string_match_identifier_tail ( const String ident,
const String tail 
)

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().

◆ string_multiply()

String Ase::string_multiply ( const String s,
uint64  count 
)

Reproduce a string s for count times.

Definition at line 31 of file strings.cc.

References string_multiply().

Referenced by string_multiply().

◆ string_normalize_nfc()

String Ase::string_normalize_nfc ( const String src)

Yield normalized composed UTF-8 string.

Definition at line 209 of file strings.cc.

References std::string::c_str(), and std::string::size().

◆ string_normalize_nfd()

String Ase::string_normalize_nfd ( const String src)

Yield normalized decomposed UTF-8 string.

Definition at line 219 of file strings.cc.

References std::string::c_str(), and std::string::size().

◆ string_normalize_nfkc()

String Ase::string_normalize_nfkc ( const String src)

Formatting stripped normalized composed UTF-8 string.

Definition at line 229 of file strings.cc.

References std::string::c_str(), and std::string::size().

◆ string_normalize_nfkd()

String Ase::string_normalize_nfkd ( const String src)

Formatting stripped normalized decomposed UTF-8 string.

Definition at line 239 of file strings.cc.

References std::string::c_str(), and std::string::size().

◆ string_option_check()

bool Ase::string_option_check ( const String optionlist,
const String feature 
)

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_option_find()

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().

◆ string_option_find_value()

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_replace()

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().

◆ string_rstrip()

String Ase::string_rstrip ( const String input)

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().

◆ string_set_a2z()

const String & Ase::string_set_a2z ( )

Returns a string containing all of a-z.

Definition at line 102 of file strings.cc.

◆ string_set_A2Z()

const String & Ase::string_set_A2Z ( )

Returns a string containing all of A-Z.

Definition at line 110 of file strings.cc.

◆ string_set_ascii_alnum()

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().

◆ string_split()

StringS Ase::string_split ( const String string,
const String splitter,
size_t  maxn 
)

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().

◆ string_split_any()

StringS Ase::string_split_any ( const String string,
const String splitchars,
size_t  maxn 
)

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().

◆ string_startswith() [1/2]

bool Ase::string_startswith ( const String string,
const String fragment 
)

◆ string_startswith() [2/2]

bool Ase::string_startswith ( const String string,
const StringS fragments 
)

Returns whether string starts with any element of fragments.

Definition at line 853 of file strings.cc.

References string_startswith().

◆ string_strip()

String Ase::string_strip ( const String input)

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().

◆ string_substitute_char()

String Ase::string_substitute_char ( const String input,
const char  match,
const char  subst 
)

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().

◆ string_to_bool()

bool Ase::string_to_bool ( const String string,
bool  fallback 
)

Interpret a string as boolean value. Interpret the string as number, "ON"/"OFF" or distinguish "false"/"true" or "yes"/"no" by starting letter. For empty strings, fallback is returned.

Definition at line 467 of file strings.cc.

Referenced by debug_key_enabled(), Ase::Test::slow(), string_option_check(), and Ase::Test::verbose().

◆ string_to_cescape()

String Ase::string_to_cescape ( const String str)

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().

◆ string_to_cquote()

String Ase::string_to_cquote ( const String str)

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().

◆ string_to_double() [1/2]

double Ase::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.

Definition at line 681 of file strings.cc.

References current_locale_strtold().

◆ string_to_double() [2/2]

double Ase::string_to_double ( const String string)

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().

◆ string_to_double_vector()

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().

◆ string_to_float()

double Ase::string_to_float ( const String string)

Definition at line 57 of file strings.hh.

◆ string_to_hex()

String Ase::string_to_hex ( const String input)

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.

◆ string_to_identifier()

String Ase::string_to_identifier ( const String input)

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().

◆ string_to_int()

int64 Ase::string_to_int ( const String string,
size_t consumed,
uint  base 
)

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().

◆ string_to_long_double() [1/2]

long double Ase::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.

Definition at line 667 of file strings.cc.

References current_locale_strtold().

◆ string_to_long_double() [2/2]

long double Ase::string_to_long_double ( const String string)

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().

◆ string_to_ncname()

String Ase::string_to_ncname ( const String input,
uint32_t  substitute 
)

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().

◆ string_to_seconds()

double Ase::string_to_seconds ( const String string,
double  fallback 
)

Parse string into seconds.

Definition at line 773 of file strings.cc.

References std::string::c_str(), string_to_double(), strlen(), and strncmp().

◆ string_to_type()

template<typename Type >
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.

◆ string_to_type< bool >()

template<>
bool Ase::string_to_type< bool > ( const String string)

Definition at line 125 of file strings.hh.

◆ string_to_type< double >()

template<>
double Ase::string_to_type< double > ( const String string)

Definition at line 121 of file strings.hh.

◆ string_to_type< float >()

template<>
float Ase::string_to_type< float > ( const String string)

Definition at line 123 of file strings.hh.

◆ string_to_type< int >()

template<>
int Ase::string_to_type< int > ( const String string)

Definition at line 131 of file strings.hh.

◆ string_to_type< int16 >()

template<>
int16 Ase::string_to_type< int16 > ( const String string)

Definition at line 127 of file strings.hh.

◆ string_to_type< int64 >()

template<>
int64 Ase::string_to_type< int64 > ( const String string)

Definition at line 135 of file strings.hh.

◆ string_to_type< long double >()

template<>
long double Ase::string_to_type< long double > ( const String string)

Definition at line 119 of file strings.hh.

◆ string_to_type< String >()

template<>
String Ase::string_to_type< String > ( const String string)

Definition at line 139 of file strings.hh.

◆ string_to_type< uint >()

template<>
uint Ase::string_to_type< uint > ( const String string)

Definition at line 133 of file strings.hh.

◆ string_to_type< uint16 >()

template<>
uint16 Ase::string_to_type< uint16 > ( const String string)

Definition at line 129 of file strings.hh.

◆ string_to_type< uint64 >()

template<>
uint64 Ase::string_to_type< uint64 > ( const String string)

Definition at line 137 of file strings.hh.

◆ string_to_uint()

uint64 Ase::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.

Definition at line 540 of file strings.cc.

References std::string::c_str(), and strtoull().

◆ string_tolower()

String Ase::string_tolower ( const String str)

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().

◆ string_totitle()

String Ase::string_totitle ( const String str)

Convert all string characters into Unicode title characters.

Definition at line 176 of file strings.cc.

References std::string::size().

◆ string_toupper()

String Ase::string_toupper ( const String str)

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().

◆ string_url_decode()

String Ase::string_url_decode ( const String urlstr,
const bool  form_url_encoded 
)

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().

◆ string_url_encode()

String Ase::string_url_encode ( const String rawstr,
const bool  form_url_encoded 
)

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.

◆ string_vector_erase_empty()

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_vector_find()

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.

Returns
fallback if no match was found.

Definition at line 1235 of file strings.cc.

References std::string::data(), std::string::size(), std::vector::size(), and strncmp().

◆ string_vector_find_value()

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.

Returns
fallback if no match was found.

Definition at line 1252 of file strings.cc.

References std::string::data(), std::string::size(), std::vector::size(), strncmp(), and std::string::substr().

◆ string_vector_lstrip()

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().

◆ string_vector_rstrip()

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().

◆ string_vector_strip()

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().

◆ string_vprintf()

String Ase::string_vprintf ( const char format,
va_list  vargs 
)

Formatted printing ala vprintf() into a String, using the POSIX/C locale.

Definition at line 309 of file strings.cc.

◆ stringify_clip_note()

String Ase::stringify_clip_note ( const ClipNote n)

Definition at line 414 of file clip.cc.

◆ strings_version_sort() [1/2]

StringS Ase::strings_version_sort ( const StringS strings,
bool  reverse 
)

Definition at line 395 of file strings.cc.

◆ strings_version_sort() [2/2]

void Ase::strings_version_sort ( StringS strings,
bool  reverse 
)

Definition at line 403 of file strings.cc.

◆ strrstr()

const char * Ase::strrstr ( const char haystack,
const char needle 
)

Definition at line 506 of file strings.cc.

◆ telemetry_field()

template<class T >
TelemetryField Ase::telemetry_field ( const String name,
const T *  field 
)

Definition at line 49 of file server.hh.

◆ text_convert()

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().

◆ this_thread_get_name()

String Ase::this_thread_get_name ( )

Definition at line 1128 of file platform.cc.

◆ this_thread_getpid()

int Ase::this_thread_getpid ( )

Definition at line 1137 of file platform.cc.

◆ this_thread_gettid()

int Ase::this_thread_gettid ( )

Definition at line 1143 of file platform.cc.

◆ this_thread_is_ase()

bool Ase::this_thread_is_ase ( )

Definition at line 177 of file platform.hh.

◆ this_thread_online_cpus()

int Ase::this_thread_online_cpus ( )

Definition at line 1155 of file platform.cc.

◆ this_thread_self()

ThreadId Ase::this_thread_self ( )

Definition at line 1114 of file platform.cc.

◆ this_thread_set_name()

void Ase::this_thread_set_name ( const String name16chars)

Definition at line 1120 of file platform.cc.

◆ timestamp_benchmark()

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().

◆ timestamp_format()

String Ase::timestamp_format ( uint64  stamp,
uint  maxlength 
)

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().

◆ timestamp_now()

uint64_t Ase::timestamp_now ( )

Current time in µseconds.

Definition at line 14 of file logging.cc.

References gettimeofday().

◆ timestamp_realtime()

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().

◆ timestamp_resolution()

uint64 Ase::timestamp_resolution ( )

Provide resolution of timestamp_benchmark() in nano-seconds.

Definition at line 593 of file platform.cc.

◆ timestamp_startup()

uint64 Ase::timestamp_startup ( )

Provides the timestamp_realtime() value from program startup.

Definition at line 570 of file platform.cc.

◆ uint16_swap_le_be()

constexpr uint16_t Ase::uint16_swap_le_be ( uint16_t  v)
constexpr

Swap 16-Bit integers between __BIG_ENDIAN and __LITTLE_ENDIAN systems.

Definition at line 135 of file utils.hh.

◆ uint32_swap_le_be()

constexpr uint32_t Ase::uint32_swap_le_be ( uint32_t  v)
constexpr

Swap 32-Bit integers between __BIG_ENDIAN and __LITTLE_ENDIAN systems.

Definition at line 141 of file utils.hh.

◆ uint64_swap_le_be()

constexpr uint64_t Ase::uint64_swap_le_be ( uint64_t  v)
constexpr

Swap 64-Bit integers between __BIG_ENDIAN and __LITTLE_ENDIAN systems.

Definition at line 151 of file utils.hh.

◆ unicode_is_assigned()

constexpr bool Ase::unicode_is_assigned ( uint32_t  u)
constexpr

Return whether u matches any of the assigned Unicode planes.

Definition at line 33 of file unicode.hh.

◆ unicode_is_character()

constexpr bool Ase::unicode_is_character ( uint32_t  u)
constexpr

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().

◆ unicode_is_control_code()

constexpr bool Ase::unicode_is_control_code ( uint32_t  u)
constexpr

Return whether u is one of the 65 Unicode control codes.

Definition at line 74 of file unicode.hh.

◆ unicode_is_noncharacter()

constexpr bool Ase::unicode_is_noncharacter ( uint32_t  u)
constexpr

Return whether u is one of the 66 Unicode noncharacters.

Definition at line 59 of file unicode.hh.

Referenced by unicode_is_character().

◆ unicode_is_private()

constexpr bool Ase::unicode_is_private ( uint32_t  u)
constexpr

Return whether u is in one of the 3 private use areas of Unicode.

Definition at line 82 of file unicode.hh.

◆ unicode_is_valid()

constexpr bool Ase::unicode_is_valid ( uint32_t  u)
constexpr

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.

◆ user_id()

int Ase::user_id ( )

Definition at line 1194 of file platform.cc.

◆ user_name()

String Ase::user_name ( )

Definition at line 1200 of file platform.cc.

◆ user_real_name()

String Ase::user_real_name ( )

Definition at line 1206 of file platform.cc.

◆ utf8_to_unicode() [1/2]

size_t Ase::utf8_to_unicode ( const char str,
uint32_t codepoints 
)

Convert valid UTF-8 sequences to Unicode codepoints, invalid sequences are treated as Latin-1 characters. The array codepoints must be able to hold at least as many elements as are characters stored in str. Returns the number of codepoints stored in codepoints.

Definition at line 221 of file unicode.cc.

Referenced by string_is_ncname(), string_to_ncname(), Ase::MakeIcon::UcIcon(), and utf8decode().

◆ utf8_to_unicode() [2/2]

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.

◆ utf8decode()

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().

◆ utf8encode() [1/2]

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().

◆ utf8encode() [2/2]

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().

◆ utf8len() [1/2]

size_t Ase::utf8len ( const char str)

Count valid UTF-8 sequences, invalid sequences are counted as Latin-1 characters.

Definition at line 184 of file unicode.cc.

◆ utf8len() [2/2]

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().

◆ voltage2db()

template<typename Float >
Float Ase::voltage2db ( Float  x)

Convert synthesizer value (Voltage) to Decibel.

Definition at line 98 of file signalmath.hh.

References std::log10().

◆ voltage2hz()

template<typename Float >
Float Ase::voltage2hz ( Float  x)

Convert synthesizer value (Voltage) to Hertz.

Definition at line 74 of file signalmath.hh.

References std::exp2().

◆ voltage_changed()

template<typename Float >
Float Ase::voltage_changed ( Float  a,
Float  b 
)

Determine a significant synthesizer value (Voltage) change.

Definition at line 134 of file signalmath.hh.

◆ warning()

template<class ... Args>
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().

◆ wave_writer_create_flac()

WaveWriterP Ase::wave_writer_create_flac ( int  rate,
int  channels,
const String filename,
int  mode,
int  compresion 
)

Definition at line 633 of file wave.cc.

◆ wave_writer_create_opus()

WaveWriterP Ase::wave_writer_create_opus ( int  rate,
int  channels,
const String filename,
int  mode,
int  complexity,
float  bitrate 
)

Definition at line 499 of file wave.cc.

◆ wave_writer_create_wav()

WaveWriterP Ase::wave_writer_create_wav ( int  rate,
int  channels,
const String filename,
int  mode,
uint8_t  n_bits 
)

Definition at line 235 of file wave.cc.

◆ wave_writer_flac_version()

String Ase::wave_writer_flac_version ( )

Definition at line 511 of file wave.cc.

◆ wave_writer_opus_version()

String Ase::wave_writer_opus_version ( )

Definition at line 245 of file wave.cc.

◆ weak_ptr_fetch_or_create()

template<class C >
std::shared_ptr< C > Ase::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.

Definition at line 353 of file cxxaux.hh.

◆ webui_create_auth_redirect()

String Ase::webui_create_auth_redirect ( const std::string executable,
unsigned  port,
const std::string token,
const std::string snapmode 
)

Definition at line 19 of file webui.cc.

◆ webui_start_browser()

ErrorReason Ase::webui_start_browser ( const std::string mode,
MainLoopP  loop,
const std::string url,
const std::function< void()> &  onclose 
)

Definition at line 69 of file webui.cc.

◆ zintern_decompress()

uint8 * Ase::zintern_decompress ( unsigned int  decompressed_size,
const unsigned char cdata,
unsigned int  cdata_size 
)

Decompress data via zlib.

Parameters
decompressed_sizeexact size of the decompressed data to be returned
cdatacompressed data block
cdata_sizeexact size of the compressed data block
Returns
decompressed data block or NULL in low memory situations

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().

◆ 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().

◆ zstd_compress() [1/2]

String Ase::zstd_compress ( const String input,
int  level 
)

Definition at line 61 of file compress.cc.

◆ zstd_compress() [2/2]

String Ase::zstd_compress ( const void *  src,
size_t  src_size,
int  level 
)

Definition at line 67 of file compress.cc.

◆ zstd_target_size()

ssize_t Ase::zstd_target_size ( const String input)

Definition at line 84 of file compress.cc.

◆ zstd_uncompress() [1/2]

String Ase::zstd_uncompress ( const String input)

Definition at line 108 of file compress.cc.

◆ zstd_uncompress() [2/2]

ssize_t Ase::zstd_uncompress ( const String input,
void *  dst,
size_t  dst_size 
)

Definition at line 97 of file compress.cc.

Variable Documentation

◆ __DEV__

constexpr const bool Ase::__DEV__
constexpr

Definition at line 89 of file internal.hh.

◆ __noreturn__

void Ase::__noreturn__

Definition at line 752 of file platform.cc.

◆ App

const MainApp & Ase::App

Definition at line 34 of file main.cc.

◆ args

const A & Ase::args

Definition at line 240 of file cxxaux.hh.

◆ ase_debugging_enabled

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().

◆ ase_fatal_warnings

bool Ase::ase_fatal_warnings

Global boolean to cause the program to abort on warnings.

Definition at line 20 of file utils.cc.

◆ assertion_failed_fatal

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().

◆ AUDIO_BLOCK_FLOAT_ZEROS_SIZE

constexpr const uint Ase::AUDIO_BLOCK_FLOAT_ZEROS_SIZE
constexpr

Maximum number of values in the const_float_zeros block.

Definition at line 10 of file datautils.hh.

◆ cached_hash_secret

uint64_t Ase::cached_hash_secret

Use hash_secret() for access.

Definition at line 696 of file randomhash.cc.

◆ cent_table

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.

◆ columnline

uint64_t Ase::columnline

Definition at line 40 of file logging.hh.

◆ const_float_zeros

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().

◆ DOUBLE_EPSILON

constexpr const double Ase::DOUBLE_EPSILON
constexpr

Double round-off error at 1.0, equals 2^-53.

Definition at line 10 of file mathutils.hh.

◆ fileglob

bool const char* Ase::fileglob

Definition at line 177 of file entropy.cc.

◆ FIXED_N_CHANNELS

constexpr const uint Ase::FIXED_N_CHANNELS
constexpr

Definition at line 22 of file engine.cc.

◆ FIXED_N_MIDI_DRIVERS

constexpr const uint Ase::FIXED_N_MIDI_DRIVERS
constexpr

Definition at line 24 of file engine.cc.

◆ FIXED_SAMPLE_RATE

constexpr const uint Ase::FIXED_SAMPLE_RATE
constexpr

Definition at line 23 of file engine.cc.

◆ format

uint64_t const char const char* Ase::format

Definition at line 40 of file logging.hh.

◆ func

uint64_t const char* Ase::func

Definition at line 40 of file logging.hh.

◆ GUIONLY

constexpr const char Ase::GUIONLY[]
constexpr

GUI READABLE WRITABLE.

Definition at line 12 of file api.hh.

◆ INVERSE_SEMIQUAVER

constexpr double Ase::INVERSE_SEMIQUAVER
constexpr

Definition at line 18 of file transport.cc.

◆ main_app

MainAppImpl Ase::main_app

Definition at line 33 of file main.cc.

◆ main_jobs

JobQueue Ase::main_jobs ( call_main_loop  )

Execute a job callback in the Ase main loop.

Definition at line 39 of file main.hh.

◆ main_loop

MainLoopP Ase::main_loop

Definition at line 39 of file main.cc.

◆ main_rt_jobs

RtJobQueue Ase::main_rt_jobs

Queue a callback for the main_loop without invoking malloc(), addition is obstruction free.

Definition at line 65 of file main.cc.

◆ MAX_BPM

constexpr const int64 Ase::MAX_BPM
constexpr

Definition at line 56 of file transport.hh.

◆ MAX_SAMPLERATE

constexpr const int64 Ase::MAX_SAMPLERATE
constexpr

Definition at line 58 of file transport.hh.

◆ maxbytes

bool const char const size_t Ase::maxbytes

Definition at line 177 of file entropy.cc.

◆ MIDI_NOTE_ID_FIRST

constexpr const uint Ase::MIDI_NOTE_ID_FIRST
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().

◆ MIDI_NOTE_ID_LAST

constexpr const uint Ase::MIDI_NOTE_ID_LAST
constexpr

Last valid (internal) MIDI note event ID.

Definition at line 14 of file clip.hh.

Referenced by Ase::ClipImpl::change_batch().

◆ MIN_BPM

constexpr const int64 Ase::MIN_BPM
constexpr

Definition at line 55 of file transport.hh.

◆ MIN_SAMPLERATE

constexpr const int64 Ase::MIN_SAMPLERATE
constexpr

Definition at line 57 of file transport.hh.

◆ SEMIQUAVER_TICKS

constexpr const int64 Ase::SEMIQUAVER_TICKS
constexpr

Definition at line 54 of file transport.hh.

◆ semitone_tables_265

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().

◆ SERVER

ServerImpl * Ase::SERVER

Definition at line 24 of file server.cc.

◆ speaker_arrangement_channels_mask

constexpr SpeakerArrangement Ase::speaker_arrangement_channels_mask
constexpr

Definition at line 45 of file transport.hh.

◆ STANDARD

constexpr const char Ase::STANDARD[]
constexpr

STORAGE GUI READABLE WRITABLE.

Definition at line 14 of file api.hh.

◆ STORAGE

constexpr const char Ase::STORAGE[]
constexpr

STORAGE READABLE WRITABLE.

Definition at line 13 of file api.hh.

◆ TRANSPORT_PPQN

constexpr const int64 Ase::TRANSPORT_PPQN
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().

◆ unicode_last_codepoint

constexpr uint32_t Ase::unicode_last_codepoint
constexpr

Definition at line 23 of file unicode.hh.