Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
iaudiointerface.h
Go to the documentation of this file.
1/* Conquer Space
2 * Copyright (C) 2021-2025 Conquer Space
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
18
19#include <hjson.h>
20
21#include <string>
22
24
25namespace cqsp {
26namespace engine {
27namespace audio {
30 public:
31 virtual ~IAudioInterface() = default;
32 virtual void Pause(bool to_pause) = 0;
33 virtual void PauseMusic(bool to_pause) = 0;
34 virtual std::string GetAudioVersion() = 0;
35 virtual void Initialize() = 0;
36 virtual void Destruct() = 0;
37 virtual void StartWorker() = 0;
38 virtual void RequestPlayAudio() = 0;
39 virtual void SetMusicVolume(float volume) = 0;
40 virtual void PlayAudioClip(cqsp::asset::AudioAsset *asset, int channel) = 0;
41 virtual void SetChannelVolume(int channel, float gain) = 0;
42 virtual void OnFrame() = 0;
43
44 virtual void AddAudioClip(const std::string &key, cqsp::asset::AudioAsset *asset) = 0;
45 virtual void PlayAudioClip(const std::string &key) = 0;
46};
47} // namespace audio
48} // namespace engine
49} // namespace cqsp
Definition: audioasset.h:23
Definition: iaudiointerface.h:29
virtual void PlayAudioClip(const std::string &key)=0
virtual void SetChannelVolume(int channel, float gain)=0
virtual void PlayAudioClip(cqsp::asset::AudioAsset *asset, int channel)=0
virtual void SetMusicVolume(float volume)=0
virtual void Pause(bool to_pause)=0
virtual void AddAudioClip(const std::string &key, cqsp::asset::AudioAsset *asset)=0
virtual std::string GetAudioVersion()=0
virtual void PauseMusic(bool to_pause)=0
ChannelType
Definition: iaudiointerface.h:28
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:22