CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
ALSource.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "ALLoader.hpp"
11
13
14namespace CeresEngine {
15
16 class ALDevice;
17
18 class ALSource final : public AudioAPISource {
19 private:
21 ALuint sourceID;
22
23 public:
24 explicit ALSource(ALDevice& device, const AudioAPISourceDescriptor& descriptor);
25 ~ALSource() final;
26
27 public:
29 void play() final;
30
32 [[nodiscard]] bool isPlaying() const final;
33
35 void stop() final;
36
38 [[nodiscard]] bool isStopped() const final;
39
41 void pause() final;
42
44 [[nodiscard]] bool isPaused() const final;
45
47 void resume() final;
48
49 public:
51 void update(const AudioAPISourceDescriptor& descriptor) final;
52 };
53
54} // namespace CeresEngine
Definition ALDevice.hpp:18
Definition ALSource.hpp:18
bool isPlaying() const final
bool isPaused() const final
ALSource(ALDevice &device, const AudioAPISourceDescriptor &descriptor)
bool isStopped() const final
void update(const AudioAPISourceDescriptor &descriptor) final
ALuint sourceID
The OpenAL source ID.
Definition ALSource.hpp:21
A audio source is an entity that emits sounds.
Definition Source.hpp:104
Definition Application.hpp:19
A descriptor structure that describes the creation of an audio source.
Definition Source.hpp:19