Unravel Engine C++ Reference
Loading...
Searching...
No Matches
audio_system.h
Go to the documentation of this file.
1#pragma once
2#include <engine/engine_export.h>
3
4#include <audiopp/device.h>
5#include <base/basetypes.hpp>
6#include <context/context.hpp>
7
8namespace unravel
9{
10
16{
17public:
23 auto init(rtti::context& ctx) -> bool;
24
30 auto deinit(rtti::context& ctx) -> bool;
31
32private:
38 void on_frame_update(rtti::context& ctx, delta_t dt);
39
44 void on_play_begin(rtti::context& ctx);
45
50 void on_play_end(rtti::context& ctx);
51
56 void on_pause(rtti::context& ctx);
57
62 void on_resume(rtti::context& ctx);
63
68 void on_skip_next_frame(rtti::context& ctx);
69
71 std::shared_ptr<int> sentinel_ = std::make_shared<int>(0);
73 std::unique_ptr<audio::device> device_;
74};
75
76} // namespace unravel
Manages the audio operations and integrates with the audio backend.
auto init(rtti::context &ctx) -> bool
Initializes the audio system with the given context.
auto deinit(rtti::context &ctx) -> bool
Deinitializes the audio system with the given context.
std::chrono::duration< float > delta_t