Epok Engine

EPOK RUNTIME

epok::instrument::synth::detail::source_changed

Function · 1 overload

Function

Performs `source changed` as part of the instrument synth module.

Belongs to
epok::instrument::synth::detail
Header
instrument_synth.hpp
Overloads
1

Declaration

Declaration
inline bool source_changed(uint16_t source,const Controls& a,const Controls& b)

Performs `source changed` as part of the instrument synth module.

ParameterTypeMeaning
sourceuint16_tValue supplied for source. Keep referenced or pointed-to data valid for the complete call.
aconst Controls &Value supplied for a. Keep referenced or pointed-to data valid for the complete call.
bconst Controls &Value supplied for b. Keep referenced or pointed-to data valid for the complete call.

Returns: bool. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "instrument_synth.hpp"

// Assume these named values have been initialized with valid data:
// uint16_t source
// const Controls & a
// const Controls & b

auto result = epok::instrument::synth::detail::source_changed(source, a, b);

Why use it

The boolean result makes success, availability or state explicit without exceptions.

Trade-offs and warnings

Check the return value; `false` is part of normal control flow for many PSX resource operations. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in runtime/instrument_synth.hpp:427

Related members