Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
audio.hpp File Reference

Audio output: sounds loaded once, then played on a channel, on top of SDL3. More...

#include <aegis2d/audio/export.hpp>
#include <aegis2d/core/math.hpp>
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <memory>
#include <stdexcept>
#include <utility>

Go to the source code of this file.

Classes

class  aegis2d::audio::AudioError
 Thrown when the audio device cannot be opened or a sound cannot be loaded. More...
 
class  aegis2d::audio::AudioDevice
 The default audio output and the sounds it plays. More...
 

Namespaces

namespace  aegis2d
 Root namespace of the engine.
 
namespace  aegis2d::audio
 Sound effects and music on top of SDL3 (client only).
 

Typedefs

using aegis2d::audio::SoundId = std::size_t
 Identifier of a sound loaded by an AudioDevice, given by AudioDevice::load().
 

Enumerations

enum class  aegis2d::audio::Channel : std::uint8_t { aegis2d::audio::Effects , aegis2d::audio::Music }
 Group of sounds whose volume is set together. More...
 

Functions

std::pair< float, float > aegis2d::audio::positional (Vec2 position, Vec2 camera_center, float view_half_width) noexcept
 Stereo pan and distance gain for a world-space sound relative to a camera view.
 

Detailed Description

Audio output: sounds loaded once, then played on a channel, on top of SDL3.