Mountain  1.0.0
Simple C++ 2D Game Framework
audio_device.hpp
1 #pragma once
2 
3 #include <string>
4 
5 #include "Mountain/core.hpp"
6 
7 // ReSharper disable once CppInconsistentNaming
8 struct ALCdevice;
9 
10 namespace Mountain
11 {
13  {
14  public:
15  MOUNTAIN_API static bool_t CheckError(const AudioDevice* device = nullptr);
16 
17  [[nodiscard]]
18  MOUNTAIN_API explicit AudioDevice(std::string&& name);
19 
20  MOUNTAIN_API ~AudioDevice();
21 
22  DELETE_COPY_MOVE_OPERATIONS(AudioDevice)
23 
24  MOUNTAIN_API void Reopen(const std::string& newName);
25 
26  [[nodiscard]]
27  MOUNTAIN_API std::string GetName() const;
28 
29  private:
30  ALCdevice* m_Handle = nullptr;
31  std::string m_Name;
32 
33  // AudioContext needs to access the handle of this class
34  friend class AudioContext;
35  };
36 }
Contains all declarations of the Mountain Framework.
Definition: audio.hpp:22