class final
#include <metadata.hpp>
v_1_0_0::AudioSize Uniform access to the size of the input audio information.
Some decoders provide the number of frames, others the number of samples and maybe in some situations just the number of bytes of the sample stream is known. To avoid implementing the appropriate conversion for each decoder, AudioSize provides an interface for uniform representation to this information. Any of the informations provided will determine all of the others.
An AudioSize converts to TRUE if it is greater than 0. An AudioSize of 0 converts to FALSE.
Constructors, destructors, conversion operators
Public functions
- auto bytes() const -> int32_t noexcept
- Size in bytes.
- auto frames() const -> int32_t noexcept
- Size in LBA frames.
- auto samples() const -> int32_t noexcept
- Size in stereo PCM samples.
- void set_bytes(const int32_t bytes) noexcept
- Update this size by an amount of bytes.
- void set_frames(const int32_t frames) noexcept
- Update this size by an amount of LBA frames.
- void set_samples(const int32_t samples) noexcept
- Update this size by an amount of stereo PCM samples.
- auto zero() const -> bool noexcept
- Return
TRUE
if the AudioSize is equivalent to zero.
Friends
Function documentation
arcstk:: v_1_0_0:: AudioSize:: operator bool() const explicit noexcept
Return TRUE
iff this AudioSize is zero(), otherwise FALSE
.
Returns | Return TRUE iff this AudioSize is zero(), otherwise FALSE . |
---|
int32_t arcstk:: v_1_0_0:: AudioSize:: frames() const noexcept
Size in LBA frames.
Returns | The size in LBA frames |
---|
int32_t arcstk:: v_1_0_0:: AudioSize:: samples() const noexcept
Size in stereo PCM samples.
Returns | The size in stereo PCM samples |
---|
void arcstk:: v_1_0_0:: AudioSize:: set_bytes(const int32_t bytes) noexcept
Update this size by an amount of bytes.
Parameters | |
---|---|
bytes in | Updated size to set as an amount of bytes |
void arcstk:: v_1_0_0:: AudioSize:: set_frames(const int32_t frames) noexcept
Update this size by an amount of LBA frames.
Parameters | |
---|---|
frames in | Updated size to set as an amount of LBA frames |
void arcstk:: v_1_0_0:: AudioSize:: set_samples(const int32_t samples) noexcept
Update this size by an amount of stereo PCM samples.
Parameters | |
---|---|
samples in | Updated size to set as an amount of stereo PCM samples |