group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
SoundClip Struct Reference

A decoded sound clip ready for playback. More...

#include <SfxTypes.hpp>

Public Attributes

std::vector< uint8_t > pcmData
 Original/intermediate PCM bytes while loading.
std::vector< float > samples
 Mixer-ready F32 stereo samples.
SDL_AudioSpec spec {}
 Format descriptor matching pcmData, or mixer format after conversion.
float durationSeconds = 0.0f
 Total playback duration in seconds.
std::size_t frameCount = 0
 Number of interleaved stereo frames in samples.
SfxCategory category = SfxCategory::Weapons
float defaultGain = 1.0f
 Base volume for this clip.
float minCooldown = 0.05f
 Minimum seconds between repeated plays.
bool loaded = false
 True when the clip was decoded successfully.

Detailed Description

A decoded sound clip ready for playback.

Member Data Documentation

◆ category

SfxCategory SoundClip::category = SfxCategory::Weapons

◆ defaultGain

float SoundClip::defaultGain = 1.0f

Base volume for this clip.

◆ durationSeconds

float SoundClip::durationSeconds = 0.0f

Total playback duration in seconds.

◆ frameCount

std::size_t SoundClip::frameCount = 0

Number of interleaved stereo frames in samples.

◆ loaded

bool SoundClip::loaded = false

True when the clip was decoded successfully.

◆ minCooldown

float SoundClip::minCooldown = 0.05f

Minimum seconds between repeated plays.

◆ pcmData

std::vector<uint8_t> SoundClip::pcmData

Original/intermediate PCM bytes while loading.

◆ samples

std::vector<float> SoundClip::samples

Mixer-ready F32 stereo samples.

◆ spec

SDL_AudioSpec SoundClip::spec {}

Format descriptor matching pcmData, or mixer format after conversion.


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