Epok Engine

EPOK RUNTIME

epok::native_music::View::valid

Method · 1 overload

Method

Performs `valid` as part of XA music streaming and playback state.

Belongs to
epok::native_music::View
Header
native_music_data.hpp
Overloads
1

Declaration

const
Declaration
bool valid(uint16_t samples)const

Performs `valid` as part of XA music streaming and playback state.

ParameterTypeMeaning
samplesuint16_tValue supplied for samples. 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 "native_music_data.hpp"

// Assume these named values have been initialized with valid data:
// uint16_t samples

epok::native_music::View& object = /* obtain a valid instance */;

auto result = object.valid(samples);

Why use it

The method is `const`, so it does not mutate the object through this API surface. The boolean result makes success, availability or state explicit without exceptions. The API exposes the hardware service without hiding latency or bounded memory.

Trade-offs and warnings

Check the return value; `false` is part of normal control flow for many PSX resource operations. Treat device absence, busy state and I/O failure as expected outcomes; do not block the frame loop waiting for hardware.

Declared in runtime/native_music_data.hpp:19

Related members