Epok Engine

EPOK RUNTIME

epok::instrument::valid_lfo

Function · 1 overload

Function

Performs `valid lfo` as part of the instrument bank module.

Belongs to
epok::instrument
Header
instrument_bank.hpp
Overloads
1

Declaration

Declaration
inline bool valid_lfo(const Lfo& lfo, bool vibrato)

Performs `valid lfo` as part of the instrument bank module.

ParameterTypeMeaning
lfoconst Lfo &Value supplied for lfo. Keep referenced or pointed-to data valid for the complete call.
vibratoboolValue supplied for vibrato. 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_bank.hpp"

// Assume these named values have been initialized with valid data:
// const Lfo & lfo
// bool vibrato

auto result = epok::instrument::valid_lfo(lfo, vibrato);

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_bank.hpp:45

Related members