utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
utility::sound::DecodedAudio Struct Reference

Contains decoded Pulse-Code Modulation (PCM) audio data. More...

#include <headers/utility/sound/decoder/audio_decoder.hpp>

Public Attributes

std::vector< std::byte > samples
 Raw PCM sample data.
 
uint32_t sampleRate = 0
 Audio sample rate in hertz.
 
uint16_t channels = 0
 Number of audio channels.
 
uint16_t bitsPerSample = 0
 Number of bits used to represent each sample.
 
ALenum format = 0
 OpenAL format corresponding to the decoded audio data.
 

Detailed Description

Contains decoded Pulse-Code Modulation (PCM) audio data.

This structure stores raw audio samples together with the metadata required to upload them to an OpenAL buffer.

Instances of this structure are typically produced by implementations of AAudioDecoder during the decoding process.

Definition at line 48 of file audio_decoder.hpp.

Member Data Documentation

◆ bitsPerSample

uint16_t utility::sound::DecodedAudio::bitsPerSample = 0

Number of bits used to represent each sample.

Typical values are 8 or 16.

Definition at line 73 of file audio_decoder.hpp.

◆ channels

uint16_t utility::sound::DecodedAudio::channels = 0

Number of audio channels.

Typical values are:

  • 1 for mono
  • 2 for stereo

Definition at line 66 of file audio_decoder.hpp.

◆ format

ALenum utility::sound::DecodedAudio::format = 0

OpenAL format corresponding to the decoded audio data.

The value is typically obtained using AAudioDecoder::getALFormat().

Definition at line 81 of file audio_decoder.hpp.

◆ sampleRate

uint32_t utility::sound::DecodedAudio::sampleRate = 0

Audio sample rate in hertz.

Definition at line 57 of file audio_decoder.hpp.

◆ samples

std::vector<std::byte> utility::sound::DecodedAudio::samples

Raw PCM sample data.

Definition at line 52 of file audio_decoder.hpp.


The documentation for this struct was generated from the following file: